From dbc8bfc9cc6f878469db90b159419b7bb476bd94 Mon Sep 17 00:00:00 2001 From: shmibs Date: Tue, 25 Mar 2014 18:32:28 -0700 Subject: incremental updates, mostly nothing too exciting --- .vimrc | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 0f247da..e6ef45f 100644 --- a/.vimrc +++ b/.vimrc @@ -2,19 +2,31 @@ syntax on filetype plugin on set autoindent +"colours! +colorscheme calmar256-dark +set background=dark + "tab controls to match pentadactyl map :tabn map :tabp map :tabnew "insert lines above and below with (=|+) -nnoremap = Oj -nnoremap + O +"very hackish, but i couldn't think of a better way +nnoremap = Oaj +nnoremap + oak "disable auto session save/load let g:session_autosave = 'no' let g:session_autoload = 'no' +"folds! +map fo zO +map fc zC +map fm zM +map fr zR + + "copy words from above and below the cursor inoremap pumvisible() ? "\" : matchstr(getline(line('.')-1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') inoremap pumvisible() ? "\" : matchstr(getline(line('.')+1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') @@ -37,22 +49,24 @@ if &term != "linux" xnoremap P (v:register ==# '"' ? '"+' : '') . 'P' end -"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. +"annoying syntax-related values that need to be set before files are +"opened +let g:c_no_comment_fold = 1 +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() function! Settings_c() - "i want autoindent as the default, and doing that along with - "filetype indent on yields wonky results setlocal cindent + set foldmethod=syntax endfunction function! Settings_perl() - "i want autoindent as the default, and doing that along with - "filetype indent on yields wonky results setlocal smartindent endfunction -- cgit v1.2.3