Skip to content

Instantly share code, notes, and snippets.

@EronHennessey
Created March 22, 2012 17:53
Show Gist options
  • Save EronHennessey/2161013 to your computer and use it in GitHub Desktop.
Save EronHennessey/2161013 to your computer and use it in GitHub Desktop.
Eron Hennessey's MacOSX .vimrc file.
" Eron's .vimrc settings.
" check this out: http://www.vim.org/scripts/script.php?script_id=2332
call pathogen#infect()
set ruler
set nowrap
set autoindent
set tw=120
set expandtab
set shiftwidth=3
set tabstop=3
set winheight=40
set winwidth=120
set visualbell
set t_Co=256
colorscheme vombato
filetype plugin on
" Open in Marked on Mac OS X.
command Marked silent !open -a "Marked.app" "%:p"
" Open in the Oxygen XML editor
command Oxygen silent !open -a "Oxygen.app" "%:p"
" Create an MSWord file
command ToDocx execute "!pandoc %:p -t docx -o %:p:r.docx"
" Convert the current file to WikiMedia format.
command ToWiki execute "!pandoc %:p -t mediawiki -o %:p:r.wiki"
" Validate XML
command XmLint execute "!xmllint --valid --noout %:p"
syntax on
" highlight space errors (trailing whitespace, etc.)
" from: http://vim.wikia.com/wiki/Highlight_unwanted_spaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment