From c6c2695b03dcc98c5a9fb2e8b2622e4e5685a63b Mon Sep 17 00:00:00 2001 From: shmibs Date: Tue, 24 Jun 2014 09:47:56 -0700 Subject: updated vim tab / buffer management things are super easy now =D --- .vimrc | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 1c4a8fb..0fc9402 100644 --- a/.vimrc +++ b/.vimrc @@ -16,19 +16,17 @@ set noshowmode "allow edited background buffers set hidden -"vim-latex settings -set grepprg=grep\ -nH\ $* -let g:tex_flavor="latex" - "gvim-specific settings set guifont=Tamsyn\ 11 set guioptions=aegimt -"buffer controls to match pentadactyl -noremap :bn -noremap :bp -noremap :badd -noremap :buffers:b +"buffer / tab controls +nnoremap :bn +nnoremap :bp +nnoremap :buffers:b +nnoremap :tabn +nnoremap :tabp +nnoremap sT "insert lines above and below with (=|+) "very hackish, but i couldn't think of a better way @@ -73,7 +71,7 @@ let g:c_no_if0_fold = 1 "doing with viml), so separate lines it is. autocmd FileType asm call Settings_asm() autocmd FileType c call Settings_c() -autocmd FileType cpp call Settings_c() +autocmd FileType cpp call Settings_cpp() autocmd FileType haskell call Settings_haskell() autocmd FileType make call Settings_script() autocmd FileType perl call Settings_script() @@ -83,27 +81,35 @@ autocmd FileType vim call Settings_vim() function! Settings_asm() setlocal cindent - set foldmethod=syntax - noremap -- A; + setlocal foldmethod=syntax + nnoremap -- A; endfunction function! Settings_c() setlocal cindent - set foldmethod=syntax - noremap -- A/**/hhi + setlocal foldmethod=syntax + nnoremap -- O*/hhi/* +endfunction + +function! Settings_cpp() + setlocal cindent + setlocal foldmethod=syntax + setlocal shiftwidth=4 + setlocal tabstop=4 + nnoremap -- O*/hhi/* endfunction function! Settings_haskell() setlocal smartindent - noremap -- A-- + nnoremap -- O-- endfunction function! Settings_script() setlocal smartindent - noremap -- A# + nnoremap -- O# endfunction function! Settings_vim() setlocal smartindent - noremap -- A" + nnoremap -- A" endfunction -- cgit v1.2.3