" enable syntax highlighting syntax on " enble modelines (i.e. `# vim: set ft=rst`, etc.) set modeline " Need line numbers, of course set number " Incremental search (i.e. find-as-you-type) set incsearch " Big fat red bar telling you your lines are too long if version >= 703 set colorcolumn=80 endif " Open windows with `:vsplit` on the right instead of the left set splitright " Backups are annoying. Use Mercurial! set nobackup if has('gui_running') " For the GUI, use a lower contrast theme from " http://dengmao.wordpress.com/2007/01/22/vim-color-scheme-wombat/ colorscheme wombat else " Use a dark theme for console editing colorscheme torte endif " Set GUI size for side-by-side editing autocmd GUIEnter * set lines=60 columns=169 " The ESC key is way out of the way. Use jj to switch to normal mode inoremap jj " Shift+Tab to un-indent inoremap " Bash-like tab completion set wildmode=longest,list " Replace #d with a signature comment line if !exists('my_email') if exists('$USER') let user = $USER elseif exists('$USERNAME') let user = $USERNAME else let user = 'dustin' endif let my_email = user . '@' . hostname() unlet user endif iab #d "# Dustin C. Hatch <" . my_email . "> (" . strftime("%d %b %Y") . ")" " Platform specific stuff if has('win32') " Windows has a different font naming pattern " Also, Consolas is more widely available than Luxi set guifont=Consolas:h9:cANSI " Store swap files together in the user's temp directory set directory^=$TEMP// elseif has('unix') " Nice font and size (escape spaces) (GUI only) set guifont=Luxi\ Mono\ 9 " Store swap files together in the user's cache directory set directory^=~/.cache/vim// endif " Open all folds by default set foldlevelstart=99