Skip to content

Instantly share code, notes, and snippets.

@leif81
Last active December 16, 2015 00:39
Show Gist options
  • Save leif81/5349107 to your computer and use it in GitHub Desktop.
Save leif81/5349107 to your computer and use it in GitHub Desktop.
My ~/.vimrc
set sw=4
set ts=4
set expandtab
filetype plugin indent on
" Source vimrc from git project root
" https://gist.github.com/leif81/4617337
let project_root = system("git rev-parse --show-toplevel")
let chomped_project_root = project_root[:-2]
let project_vimrc = chomped_project_root."/.vimrc"
if filereadable(project_vimrc)
execute "source" project_vimrc
endif
" Highlight trailing whitespace
" http://stackoverflow.com/questions/4617059/showing-trailing-spaces-in-vim
:highlight ExtraWhitespace ctermbg=red guibg=red
:match ExtraWhitespace /\s\+$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment