syntax on execute pathogen#infect() """"""""" dark mode "set background=dark ""colorscheme odyssey "highlight CursorLine cterm=none ctermbg=23 "highlight CursorLineNr cterm=bold ctermbg=23 "highlight CursorColumn cterm=none ctermbg=23 "highlight ColorColumn cterm=none ctermbg=23 " light mode "set background=light "colorscheme shirotelin ""highlight CursorLine cterm=none ctermbg=7 ""highlight CursorLineNr cterm=bold ctermbg=7 ""highlight CursorColumn cterm=none ctermbg=7 ""highlight ColorColumn cterm=none ctermbg=7 ""highlight trailing whitespace, markers if line goes past screen, special " marker for tab characters set list set listchars=trail:-,extends:>,precedes:<,tab:>- " Line numbers, highlight current line set number set cursorline set cursorcolumn " Autoindentation set autoindent " Turn off line wrapping set nowrap set colorcolumn=+1 " Use 4 spaces instead of tabs set shiftwidth =4 set tabstop =4 set expandtab " uncomment for stupid backspace "set softtabstop =4 " NERD tree nnoremap :NERDTreeToggle " Show filename in mode line set laststatus =2 "" Window switching commands noremap :wincmd h noremap :wincmd j noremap :wincmd k noremap :wincmd l " highlight when searching set hlsearch " Uncomment the following to have Vim jump to the last position when " reopening a file if has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif endif " tab navigation " From https://vim.fandom.com/wiki/Using_tab_pages cabbrev te tabedit nnoremap :tabp nnoremap :tabn nnoremap :tabedit . nnoremap :set number! nnoremap :set cursorline!:set cursorcolumn! nnoremap :set paste! " read modelines set modeline " copy to system clipboard (from grok) vnoremap :w !xclip -sel clip " the practical effect of this augroup thing is that we avoid " non-idempotency problems with autocmd (specifically the autocmd! " inside, which resets all the settings in the group) augroup foo autocmd! " overrides file type plugins that think they know what i want " and i don't " -t = don't do auto line wrapping in insert mode " +q = do on gqq " +n = handle numbered lists automagically " +j = handle comment delimiters on J " +c = autowrap in insert mode only in comments autocmd FileType * setlocal formatoptions-=t formatoptions+=qnjc autocmd FileType * setlocal textwidth=69 " markdown: 2 space indent autocmd FileType markdown setlocal shiftwidth=2 autocmd FileType markdown setlocal tabstop=2 " python: pep8 says best textwidth is 80 chars but fuck pep8 " but only gently. we'll go with 79 autocmd FileType python setlocal textwidth=79 " xml turn off line wrapping autocmd FileType xml setlocal formatoptions-=t " Erlang handle comments beginning with %% | %%% etc autocmd FileType erlang setlocal comments=:%%%%%,:%%%%,:%%%,:%%,:% "autocmd FileType erlang setlocal textwidth=55 autocmd FileType erlang setlocal formatoptions-=t " handle numbered lists properly in markdown "autocmd FileType markdown setlocal formatoptions+=n " ignore all prior tabs=4spaces settings but only in makefiles autocmd FileType make setlocal noexpandtab augroup END