diff options
author | shmibs <shmibs@gmail.com> | 2014-03-25 18:32:28 -0700 |
---|---|---|
committer | shmibs <shmibs@gmail.com> | 2014-03-25 18:32:28 -0700 |
commit | dbc8bfc9cc6f878469db90b159419b7bb476bd94 (patch) | |
tree | 3abae03519bf449bc8469f1068e740744631f3ec /.vimrc | |
parent | 1356808cc6f5a749d0d8d6e46fb417f09b9c2f5a (diff) | |
download | dotfiles-dbc8bfc9cc6f878469db90b159419b7bb476bd94.tar.gz |
incremental updates, mostly
nothing too exciting
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 32 |
1 files changed, 23 insertions, 9 deletions
@@ -2,19 +2,31 @@ syntax on filetype plugin on set autoindent +"colours! +colorscheme calmar256-dark +set background=dark + "tab controls to match pentadactyl map <C-n> <Esc>:tabn<CR> map <C-p> <Esc>:tabp<CR> map <C-t> <Esc>:tabnew<CR> "insert lines above and below with (=|+) -nnoremap = O<Esc>j -nnoremap + O<Esc> +"very hackish, but i couldn't think of a better way +nnoremap = Oa<C-u><Esc>j +nnoremap + oa<C-u><Esc>k "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 <expr> <c-y> pumvisible() ? "\<c-y>" : matchstr(getline(line('.')-1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') inoremap <expr> <c-e> pumvisible() ? "\<c-e>" : matchstr(getline(line('.')+1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') @@ -37,22 +49,24 @@ if &term != "linux" xnoremap <expr> 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 |