syntax on filetype plugin indent 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 below nnoremap ++ == nnoremap = Oaj "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 tex call Settings_tex() 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() autocmd FileType zsh call Settings_script() function! Settings_asm() "settings setlocal foldmethod=syntax "mappings nnoremap -- A; endfunction function! Settings_c() "settings setlocal foldmethod=syntax "mappings nnoremap c :!make nnoremap -- O*/hhi/* endfunction function! Settings_cpp() "settings setlocal foldmethod=syntax setlocal shiftwidth=4 setlocal tabstop=4 "mappings nnoremap c :!make nnoremap -- O*/hhi/* endfunction function! Settings_haskell() "settings "mappings nnoremap -- O-- endfunction function! Settings_script() "settings setlocal shiftwidth=4 setlocal tabstop=4 "mappings nnoremap -- O# endfunction function! Settings_tex() "settings setlocal shiftwidth=4 setlocal tabstop=4 "mappings nnoremap -- O% nnoremap c :!latex -output-format=pdf % nnoremap C :!latex -output-format=pdf % endfunction function! Settings_vim() "settings "mappings nnoremap -- O" endfunction