Last active
December 16, 2015 00:39
-
-
Save leif81/5349107 to your computer and use it in GitHub Desktop.
My ~/.vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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