diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-06-20 15:40:57 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-06-20 15:40:57 +0200 |
| commit | 64a1e8466b6281674afecdf67b959fb594884d85 (patch) | |
| tree | e7da8d30312e28f968b6c4f2848d92804dae65b1 /vimrc | |
| parent | 2950b43b044107d5856cae68bc75d0db7ddfa30d (diff) | |
| download | dotfiles-64a1e8466b6281674afecdf67b959fb594884d85.tar.gz | |
Update vimrc
Diffstat (limited to 'vimrc')
| -rw-r--r-- | vimrc | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -21,6 +21,10 @@ autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4 | |||
| 21 | autocmd Filetype c,cpp,lua,zig setlocal expandtab tabstop=4 shiftwidth=4 | 21 | autocmd Filetype c,cpp,lua,zig setlocal expandtab tabstop=4 shiftwidth=4 |
| 22 | autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2 | 22 | autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2 |
| 23 | 23 | ||
| 24 | " External auto-formatters. | ||
| 25 | autocmd FileType c,cpp setlocal formatprg=clang-format | ||
| 26 | autocmd FileType go setlocal formatprg=gofmt | ||
| 27 | |||
| 24 | " Code commenting - https://stackoverflow.com/a/1676672. | 28 | " Code commenting - https://stackoverflow.com/a/1676672. |
| 25 | augroup CodeCommenting | 29 | augroup CodeCommenting |
| 26 | autocmd! | 30 | autocmd! |
| @@ -33,10 +37,6 @@ augroup END | |||
| 33 | noremap <silent> cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR> | 37 | noremap <silent> cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR> |
| 34 | noremap <silent> cu :<C-B>silent <C-E>s/^\(\s*\)\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR> | 38 | noremap <silent> cu :<C-B>silent <C-E>s/^\(\s*\)\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR> |
| 35 | 39 | ||
| 36 | " External auto-format programs. | ||
| 37 | autocmd FileType c,cpp setlocal formatprg=clang-format | ||
| 38 | autocmd FileType go setlocal formatprg=gofmt | ||
| 39 | |||
| 40 | " FZF fuzzy finder integration. | 40 | " FZF fuzzy finder integration. |
| 41 | function! FZF() | 41 | function! FZF() |
| 42 | let t=tempname() | 42 | let t=tempname() |
