Last active
May 19, 2023 02:49
-
-
Save zenixls2/5b1eeb41f52ea13c9f62e1b145ad3c9d to your computer and use it in GitHub Desktop.
vimrc for c++/golang/rust
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| runtime! debian.vim | |
| if has("syntax") | |
| syntax on | |
| endif | |
| if filereadable("/etc/vim/vimrc.local") | |
| source "/etc/vim/vimrc.local" | |
| endif | |
| call plug#begin() | |
| Plug 'rhysd/vim-clang-format' | |
| Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } | |
| Plug 'editorconfig/editorconfig-vim' | |
| Plug 'rust-lang/rust.vim' | |
| Plug 'mattn/webapi-vim' | |
| call plug#end() | |
| let g:go_def_mode='gopls' | |
| let g:go_info_mode='gopls' | |
| let g:rustfmt_autosave = 1 | |
| " :RustPlay on selected range | |
| " :RustTest on cursor pointed tests | |
| let g:clang_format#enable_fallback_style=0 | |
| let g:clang_format#auto_format_git_diff=1 | |
| autocmd FileType c,cpp setlocal ts=4 sw=4 expandtab | |
| autocmd FileType c,cpp ClangFormatAutoEnable | |
| autocmd FileType json setlocal ts=4 sw=4 expandtab | |
| autocmd FileType yaml setlocal ts=2 sw=2 expandtab | |
| autocmd BufWinLeave *.* mkview | |
| autocmd BufWinEnter *.* silent loadview |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment