forked from openshift/rhc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
16 lines (14 loc) · 637 Bytes
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" Some basic vim options to make it work better
set nocompatible
syntax on
filetype on
filetype plugin indent on
" Set tabbing options
autocmd FileType ruby,yaml setlocal expandtab autoindent shiftwidth=2 softtabstop=2
" Trim trailing whitespace from Ruby and Yaml files
autocmd BufWritePre *.rb,*.yml,*.yaml :%s/\s\+$//e
"flag problematic whitespace (trailing and spaces before tabs)
"Note you get the same by doing let c_space_errors=1 but
"this rule really applies to everything.
highlight RedundantSpaces term=standout ctermbg=red guibg=red
match RedundantSpaces /\s\+$\| \+\ze\t/ "\ze sets end of match so only spaces highlighted