64 lines
1.7 KiB
VimL
64 lines
1.7 KiB
VimL
" 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 <esc><right>
|
|
" Shift+Tab to un-indent
|
|
inoremap <S-TAB> <C-D>
|
|
|
|
" 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 <expr> #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
|
|
" The default directory setting uses C:\tmp and C:\temp, neither of which
|
|
" are valid on Windows 6.0 and later
|
|
set directory=.,$TEMP,
|
|
elseif has('unix')
|
|
" Nice font and size (escape spaces) (GUI only)
|
|
set guifont=Luxi\ Mono\ 9
|
|
endif
|