" bnewbold's .vimrc " circa 2006-2010 " import stuff from ~/.vim/bundle via pathogen execute pathogen#infect() " enable plugins filetype plugin on "filetype plugin indent on if has('syntax') && (&t_Co > 2) syntax on endif set history=50 set wildmode=list:longest,full set showmode set showcmd set shiftwidth=4 set tabstop=4 autocmd FileType * set tabstop=4|set shiftwidth=4 set expandtab set shiftround set autoindent set hidden " allows modified buffers to be hidden " vtreeexplore let treeExplVertical=1 let treeExplWinSize=30 let treeExplDirSort=1 let treeExplNoList=0 "nmap :VTreeExplore nmap :Explore "let g:buftabs_in_statusline=1 "let g:buftabs_only_basename=1 "let g:buftabs_active_highlight_group="Visual" " a more readbly vertical split hi VertSplit cterm=none ctermfg=LightGray term=none gui=none " darkblue sucks in most terminals hi Comment cterm=none ctermfg=Blue term=none gui=none " firefox style ctrl-tabbing with buffers; doesn't work in xterm noremap :bprev noremap :bnext " needed for in xterm with remaping... ugh. nmap [27;6;9~ :bprev nmap [27;5;9~ :bnext map [27;6;9~ :bprev map [27;5;9~ :bnext " and for tabbing around nmap :tabN nmap :tabn map :tabN map :tabn " and between windows noremap h noremap j noremap k noremap l "For screen.vim send block to SendScreen function (eg Scheme interpreter) vmap :ScreenSend nmap vip nmap :ScreenSend " Searching stuff set incsearch set ignorecase set smartcase " this allows the arrow keys to do screen lines instead of file lines " (srapped) noremap gk noremap gj "autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class " for Project Fortress au BufNewFile,BufRead *.fsi,*.fss set ft=fortress " for previewing reStructured text (.rst) in firefox :command! Rst :!rst2html.py "%" > /tmp/rstprev.html && firefox file:///tmp/rstprev.html :nnoremap :Rst cnoremap cnoremap cnoremap cnoremap cnoremap " for encrypted files set backupskip+=*.gpg augroup encrypted au! " First make sure nothing is written to ~/.viminfo while editing " an encrypted file. autocmd BufReadPre,FileReadPre *.gpg set viminfo= " We don't want a swap file, as it writes unencrypted data to disk autocmd BufReadPre,FileReadPre *.gpg set noswapfile " Switch to binary mode to read the encrypted file autocmd BufReadPre,FileReadPre *.gpg set bin autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2 autocmd BufReadPre,FileReadPre *.gpg let shsave=&sh autocmd BufReadPre,FileReadPre *.gpg let &sh='sh' autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2 autocmd BufReadPost,FileReadPost *.gpg '[,']!gpg --decrypt --default-recipient-self 2> /dev/null autocmd BufReadPost,FileReadPost *.gpg let &sh=shsave " Switch to normal mode for editing autocmd BufReadPost,FileReadPost *.gpg set nobin autocmd BufReadPost,FileReadPost *.gpg let &ch = ch_save|unlet ch_save autocmd BufReadPost,FileReadPost *.gpg execute ":doautocmd BufReadPost " . expand("%:r") " Convert all text to encrypted text before writing autocmd BufWritePre,FileWritePre *.gpg set bin autocmd BufWritePre,FileWritePre *.gpg let shsave=&sh autocmd BufWritePre,FileWritePre *.gpg let &sh='sh' autocmd BufWritePre,FileWritePre *.gpg '[,']!gpg -q -c 2>/dev/null autocmd BufWritePre,FileWritePre *.gpg let &sh=shsave " Undo the encryption so we are back in the normal text, directly " after the file has been written. autocmd BufWritePost,FileWritePost *.gpg silent u autocmd BufWritePost,FileWritePost *.gpg set nobin augroup END " disable go error highlighting crap let go_highlight_array_whitespace_error = 0 let go_highlight_chan_whitespace_error = 0 let go_highlight_extra_types = 0 let go_highlight_space_tab_error = 0 let go_highlight_trailing_whitespace_error = 0