Skip to content

Instantly share code, notes, and snippets.

@jangaraj
Created February 18, 2016 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jangaraj/5a6dd049a7c7215db1c1 to your computer and use it in GitHub Desktop.
Save jangaraj/5a6dd049a7c7215db1c1 to your computer and use it in GitHub Desktop.
autocmd BufWritePre *.pp :s/\s\+$//e
set tabstop=2 shiftwidth=2
set autoindent
set expandtab
set ruler
filetype plugin on
autocmd FileType python set tabstop=4 shiftwidth=4
syntax on
highlight OverLength ctermbg=darkred ctermfg=white guibg=#FFD9D9
match OverLength /\%>70v.\+/
if exists('+colorcolumn')
set colorcolumn=70
else
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>70v.\+', -1)
endif
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()
@jangaraj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment