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 (=|+) "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\+\\|.\)') "use the X clipboard for things when running in a virtual terminal, because yes if &term != "linux" nnoremap y (v:register ==# '"' ? '"+' : '') . 'y' nnoremap Y (v:register ==# '"' ? '"+' : '') . 'Y' xnoremap y (v:register ==# '"' ? '"+' : '') . 'y' xnoremap Y (v:register ==# '"' ? '"+' : '') . 'Y' nnoremap d (v:register ==# '"' ? '"+' : '') . 'd' nnoremap D (v:register ==# '"' ? '"+' : '') . 'D' xnoremap d (v:register ==# '"' ? '"+' : '') . 'd' xnoremap D (v:register ==# '"' ? '"+' : '') . 'D' nnoremap p (v:register ==# '"' ? '"+' : '') . 'p' nnoremap P (v:register ==# '"' ? '"+' : '') . 'P' xnoremap p (v:register ==# '"' ? '"+' : '') . 'p' xnoremap P (v:register ==# '"' ? '"+' : '') . 'P' end "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() setlocal cindent set foldmethod=syntax endfunction function! Settings_perl() setlocal smartindent endfunction