From b77c909e0c03638004ba2e04f283934da8058d37 Mon Sep 17 00:00:00 2001 From: shmibs Date: Sat, 3 May 2014 20:45:29 -0700 Subject: added easy comment bindings per-file type commenting with one simple keybinding --- .vimrc | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index d1b1a63..266093a 100644 --- a/.vimrc +++ b/.vimrc @@ -57,15 +57,38 @@ let g:c_no_if0_fold = 1 "other filetype-specific settings. i can't figure out how to stick all "the FileTypes in one list (mostly because i have no idea what i'm "doing with viml), so separate lines it is. -autocmd FileType c call Settings_c() -autocmd FileType cpp call Settings_c() -autocmd FileType perl call Settings_perl() +autocmd FileType asm call Settings_asm() +autocmd FileType c call Settings_c() +autocmd FileType cpp call Settings_c() +autocmd FileType haskell call Settings_haskell() +autocmd FileType make call Settings_script() +autocmd FileType perl call Settings_script() +autocmd FileType sh call Settings_script() +autocmd FileType vim call Settings_vim() + +function! Settings_asm() + setlocal cindent + set foldmethod=syntax + map \\ A; +endfunction function! Settings_c() setlocal cindent set foldmethod=syntax + map \\ A/**/hhi +endfunction + +function! Settings_haskell() + setlocal smartindent + map \\ A-- +endfunction + +function! Settings_script() + setlocal smartindent + map \\ A# endfunction -function! Settings_perl() +function! Settings_vim() setlocal smartindent + map \\ A" endfunction -- cgit v1.2.3