syntax on filetype plugin on "set omnifunc=syntaxcomplete#Complete set autoindent "colours! colorscheme anotherdark set background=dark "enable status-line set laststatus=2 "hide mode in cmd set noshowmode "allow edited background buffers set hidden "gvim-specific settings set guifont=Tamsyn\ 11 set guioptions=aegimt "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 nnoremap = Oaj nnoremap + oak "folds! nnoremap fo zO nnoremap fc zC nnoremap fm zM nnoremap 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 asm call Settings_asm() autocmd FileType c 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() autocmd FileType python call Settings_script() autocmd FileType sh call Settings_script() autocmd FileType vim call Settings_vim() function! Settings_asm() setlocal cindent setlocal foldmethod=syntax nnoremap -- A; endfunction function! Settings_c() setlocal cindent 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 nnoremap -- O-- endfunction function! Settings_script() setlocal smartindent nnoremap -- O# endfunction function! Settings_vim() setlocal smartindent nnoremap -- A" endfunction