" he_the_great's vim settings " Retrieved from http://nascent.freeshell.org/programming/vim.php " Note: Bitman was the original author, http://bitman.freeshell.org/ " C programming autocommands augroup cprog " Remove all cprog autocommands au! " When starting to edit a file: " For C and C++ files set formatting of comments and set C-indenting on. " For other files switch it off. " Don't change the order, it's important that the line with * comes first. autocmd FileType * set formatoptions=tcql nocindent comments& autocmd FileType c,cpp,cxx,h,hxx,d set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,:// ff=unix cino=g0,t0,(0 autocmd FileType html,htm,php set tw=78 autoindent autocmd FileType txt set tw=78 augroup END " Quick CTRL-F braces imap {}O " Quick make with CTRL-m map :make " Used for ZZT help files autocmd FileType hlp set tw:42 et sw:5 " General options behave xterm set tabstop=3 set fdm=indent "Fold type set nohls "No highlight on search set so=5 "Scroll 5 blocks before top or bottom set nocompatible "Don't need VI compatibility set shiftwidth=3 "cindent should move 3 blocks set history=50 "Save 50 commands in history set ruler " Use highlighting syntax on " Map Q for formatting " This will word wrap long lines to tw (textwidth) map Q gq no N "no T no H 8 no T 8 no D " Color scheme colorscheme ron " Setup Spellchecking map :setlocal spell spelllang=en_us map :setlocal nospell " Make save. map :w " Dvorak it! no d h no h j no t k no n l no s : no S : no j d no l n no L N " map - to end of line and _ to the beginning no - $ no _ ^ " Make make work in DOS "set shell=C:\programs\devel\djgpp\bin\bash.exe "set shellpipe=2>