aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc8
1 files changed, 4 insertions, 4 deletions
diff --git a/vimrc b/vimrc
index 3b6201c..6e4080c 100644
--- a/vimrc
+++ b/vimrc
@@ -21,6 +21,10 @@ autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4
21autocmd Filetype c,cpp,lua,zig setlocal expandtab tabstop=4 shiftwidth=4 21autocmd Filetype c,cpp,lua,zig setlocal expandtab tabstop=4 shiftwidth=4
22autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2 22autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2
23 23
24" External auto-formatters.
25autocmd FileType c,cpp setlocal formatprg=clang-format
26autocmd FileType go setlocal formatprg=gofmt
27
24" Code commenting - https://stackoverflow.com/a/1676672. 28" Code commenting - https://stackoverflow.com/a/1676672.
25augroup CodeCommenting 29augroup CodeCommenting
26 autocmd! 30 autocmd!
@@ -33,10 +37,6 @@ augroup END
33noremap <silent> cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR> 37noremap <silent> cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR>
34noremap <silent> cu :<C-B>silent <C-E>s/^\(\s*\)\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR> 38noremap <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.
37autocmd FileType c,cpp setlocal formatprg=clang-format
38autocmd FileType go setlocal formatprg=gofmt
39
40" FZF fuzzy finder integration. 40" FZF fuzzy finder integration.
41function! FZF() 41function! FZF()
42 let t=tempname() 42 let t=tempname()