" 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 " Enable autoselect (i.e. copy-on-highlight) " Disable extraneous GUI options like scrollbars and toolbars set guioptions=aegim " Disable hiding the mouse cursor set nomousehide 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 " 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('g:my_email') if exists('$USER') let user = $USER elseif exists('$USERNAME') let user = $USERNAME else let user = 'dustin' endif let g:my_email = user . '@' . hostname() unlet user endif if !exists('g:my_name') let my_name = 'Dustin C. Hatch' endif iab #d "# " . g:my_name . " <" . g: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