Movatterモバイル変換


[0]ホーム

URL:


じゃあ、おうちで学べる

本能を呼び覚ますこのコードに、君は抗えるか

俺のvimrc 2020

概要

PCを開くと、同時にターミナルが開く。そのタイミングでtmux のセッションがなけれな起動してアタッチする用に設定してある。僕のPCでは、ファイルを編集したい時には、必ずと言っていいほど、vimを使う。vim は生涯の友である。また、最近はtmuxで作業を分割することも増えたため、vim だけに収まらない環境構築男になった。2017年の1月 のあの頃よりやりたいことも増えた。まだまだ、素人の私は、玄人感の演出に余念がない。私は.vimrcを編集して更なる玄人感の演出に成功したといっても過言ではない。

一旦、当時のブログを貼っておく。syu-m-5151.hatenablog.com

では、刮目せよ 俺のvimrc 2020 を

set fenc=utf-8set nobackupset noswapfileset autoreadset hiddenset showcmdset numberset cursorlineset cursorcolumnset virtualedit=onemoreset smartindentset visualbellset showmatchset laststatus=2set wildmode=list:longestnnoremap j gjnnoremap k gkset titleset listset listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:%set list listchars=tab:\▸\-set expandtabset tabstop=4set shiftwidth=4set showmatchset ignorecaseset smartcaseset incsearchset wrapscanset hlsearchnmap<Esc><Esc> :nohlsearch<CR><Esc>set noautoindentset smartindentset viminfo='20,\"1000syntax enable" Note: Skip initialization for vim-tiny or vim-small.if 0 | endifif &compatible  set nocompatible               " Be iMprovedendif" Required:set runtimepath+=~/.vim/bundle/neobundle.vim/" Required:call neobundle#begin(expand('~/.vim/bundle/'))" Let NeoBundle manage NeoBundle" Required:NeoBundleFetch'Shougo/neobundle.vim'" Add or remove your Bundles here:" Using RustNeoBundle'rust-lang/rust.vim'NeoBundle'Shougo/neosnippet.vim'NeoBundle'Shougo/neosnippet-snippets'NeoBundle'tpope/vim-fugitive'NeoBundle'ctrlpvim/ctrlp.vim'" terraform and AnsibleNeoBundle'flazz/vim-colorschemes'NeoBundle'mrk21/yaml-vim'NeoBundle'hashivim/vim-terraform'NeoBundle'vim-syntastic/syntastic'NeoBundle'juliosueiras/vim-terraform-completion'" Using CNeoBundle'kana/vim-operator-user'NeoBundle'rhysd/vim-clang-format'" Using GoNeoBundle'fatih/vim-go'" NeoBundle'neoclide/coc.nvim'let g:go_highlight_functions = 1let g:go_highlight_methods = 1let g:go_highlight_structs = 1let g:go_highlight_operators = 1let g:go_highlight_build_constraints = 1let g:go_fmt_fail_silently = 1let g:go_fmt_autosave = 0syntax onautocmd FileType c ClangFormatAutoEnable" My Bundles here:" Refer to |:NeoBundle-examples|." Note: You don't set neobundle setting in .gvimrc!call neobundle#end()" Required:filetype plugin indent on" If there are uninstalled bundles found on startup," this will conveniently prompt you to install them.NeoBundleCheckhighlight Pmenu ctermbg=4highlight PmenuSel ctermbg=1highlight PMenuSbar ctermbg=4" 補完ウィンドウの設定set completeopt=menuone" 補完ウィンドウの設定set completeopt=menuone" rsenseでの自動補完機能を有効化let g:rsenseUseOmniFunc=1" let g:rsenseHome = '/usr/local/lib/rsense-0.3'" auto-ctagsを使ってファイル保存時にtagsファイルを更新let g:auto_ctags=1" 起動時に有効化let g:neocomplcache_enable_at_startup = 1" 大文字が入力されるまで大文字小文字の区別を無視するlet g:neocomplcache_enable_smart_case=1" _(アンダースコア)区切りの補完を有効化let g:neocomplcache_enable_underbar_completion = 1let g:neocomplcache_enable_camel_case_completion  =  1" 最初の補完候補を選択状態にするlet g:neocomplcache_enable_auto_select=1" ポップアップメニューで表示される候補の数let g:neocomplcache_max_list = 20" シンタックスをキャッシュするときの最小文字長let g:neocomplcache_min_syntax_length=3" 補完の設定autocmd FileType ruby setlocal omnifunc=rubycomplete#Completeif !exists('g:neocomplete#force_omni_input_patterns')  let g:neocomplete#force_omni_input_patterns = {}endiflet g:neocomplete#force_omni_input_patterns.ruby = '[^.*\t]\.\w*\|\h\w*::'if !exists('g:neocomplete#keyword_patterns')        let g:neocomplete#keyword_patterns = {}endiflet g:neocomplete#keyword_patterns['default'] = '\h\w*'inoremap { {}<Left>inoremap {<Enter> {}<Left><CR><ESC><S-o>inoremap ( ()<Left>inoremap (<Enter> ()<Left><CR><ESC><S-o>inoremap [ []<Left>inoremap [<Enter> []<Left><CR><ESC><S-o>inoremap ( ()<ESC>iinoremap"""<ESC>iinoremap'''<ESC>iautocmd FileType go :highlight goErr cterm=bold ctermfg=214autocmd FileType go :match goErr /\<err\>/" Golang Serverif executable('gopls')    au User lsp_setup call lsp#register_server({        \'name':'gopls',        \'cmd': {server_info->['gopls','-mode','stdio']},        \'whitelist': ['go'],        \ })    autocmd BufWritePre *.go LspDocumentFormatSyncendifif executable('go-langserver')    au User lsp_setup call lsp#register_server({        \'name':'go-langserver',        \'cmd': {server_info->['go-langserver','-gocodecompletion']},        \'whitelist': ['go'],        \ })    autocmd BufWritePre *.go LspDocumentFormatSyncendif" vim-lspif executable('golsp')  augroup LspGo    au!    autocmd User lsp_setup call lsp#register_server({        \'name':'go-lang',        \'cmd': {server_info->['golsp','-mode','stdio']},        \'whitelist': ['go'],        \ })    autocmd FileType go setlocal omnifunc=lsp#complete  augroup ENDendifcall plug#begin('~/.vim/plugged')Plug'prabirshrestha/async.vim'Plug'prabirshrestha/vim-lsp'Plug'prabirshrestha/asyncomplete.vim'Plug'prabirshrestha/asyncomplete-lsp.vim'Plug'prabirshrestha/async.vim'Plug'prabirshrestha/vim-lsp'Plug'junegunn/fzf', {'do': { -> fzf#install() } }Plug'junegunn/fzf.vim'Plug'natebosch/vim-lsc'Plug'Shougo/defx.nvim'Plug'roxma/nvim-yarp'Plug'roxma/vim-hug-neovim-rpc'Plug'SirVer/ultisnips'Plug'honza/vim-snippets'Plug'junegunn/fzf'Plug'autozimu/LanguageClient-neovim', {    \'branch':'next',    \'do':'bash install.sh',    \ }let g:lsp_async_completion = 1call plug#end()" Track the engine." Snippets are separated from the engine. Add this if you want them:" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.let g:UltiSnipsExpandTrigger="<tab>"let g:UltiSnipsJumpForwardTrigger="<c-b>"let g:UltiSnipsJumpBackwardTrigger="<c-z>"" If you want :UltiSnipsEdit to split your window.let g:UltiSnipsEditSplit="vertical"

このvimrc はvimrc だけでは完結せずプラグインなどが入っているため入れる必要があるが何を入れればいいのかはよく分からんので適当にこの辺を読んでくれ。

github.com

🔍 Search
🦹‍♂️ Featured

引用をストックしました

引用するにはまずログインしてください

引用をストックできませんでした。再度お試しください

限定公開記事のため引用できません。

読者です読者をやめる読者になる読者になる

[8]ページ先頭

©2009-2025 Movatter.jp