diff options
author | shmibs <shmibs@gmail.com> | 2014-06-24 09:47:56 -0700 |
---|---|---|
committer | shmibs <shmibs@gmail.com> | 2014-06-24 09:47:56 -0700 |
commit | c6c2695b03dcc98c5a9fb2e8b2622e4e5685a63b (patch) | |
tree | c43d6fe31b7fe18b091a896f37777523af22bef0 /.vimrc | |
parent | 66cd3a6d36d5fe66984259fa726e54c512e7bf3c (diff) | |
download | dotfiles-c6c2695b03dcc98c5a9fb2e8b2622e4e5685a63b.tar.gz |
updated vim tab / buffer management
things are super easy now =D
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 40 |
1 files changed, 23 insertions, 17 deletions
@@ -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 <C-n> <Esc>:bn<CR> -noremap <C-p> <Esc>:bp<CR> -noremap <C-t> <Esc>:badd<Space> -noremap <C-g> <Esc>:buffers<CR>:b<Space> +"buffer / tab controls +nnoremap <C-j> :bn<CR> +nnoremap <C-k> :bp<CR> +nnoremap <C-g> :buffers<CR>:b<Space> +nnoremap <C-n> :tabn<CR> +nnoremap <C-p> :tabp<CR> +nnoremap <C-t> <C-w>s<C-w>T "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<Tab>;<Space> + setlocal foldmethod=syntax + nnoremap -- A<Tab>;<Space> endfunction function! Settings_c() setlocal cindent - set foldmethod=syntax - noremap -- A<Space>/*<Space><Space>*/<Esc>hhi + setlocal foldmethod=syntax + nnoremap -- O<Space>*/<Esc>hhi/*<Space> +endfunction + +function! Settings_cpp() + setlocal cindent + setlocal foldmethod=syntax + setlocal shiftwidth=4 + setlocal tabstop=4 + nnoremap -- O<Space>*/<Esc>hhi/*<Space> endfunction function! Settings_haskell() setlocal smartindent - noremap -- A<Space>--<Space> + nnoremap -- O--<Space> endfunction function! Settings_script() setlocal smartindent - noremap -- A<Space>#<Space> + nnoremap -- O#<Space> endfunction function! Settings_vim() setlocal smartindent - noremap -- A<Space>" + nnoremap -- A<Space>" endfunction |