summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-12 09:19:23 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-12 09:19:23 +0200
commit75e9983518085dd05d351d5da316d580be3d93a9 (patch)
treeccd3a46f82d4b7112362035479c97e3853d90a80
parentcb82c9dc34bd8ea40b1660adfd8b403ab86d268a (diff)
downloaddotfiles-75e9983518085dd05d351d5da316d580be3d93a9.tar.gz
dotfiles-75e9983518085dd05d351d5da316d580be3d93a9.tar.bz2
dotfiles-75e9983518085dd05d351d5da316d580be3d93a9.zip
vimrc: Highlight trailing spaces
-rw-r--r--.config/vim/vimrc13
1 files changed, 9 insertions, 4 deletions
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
index 09e72c8..a0d8ae7 100644
--- a/.config/vim/vimrc
+++ b/.config/vim/vimrc
@@ -23,8 +23,8 @@ else
set autoindent " auto indents next new line
endif
-set cinoptions=t0,g0,(0,:0
-
+set cinoptions=t0,g0,(0,:0
+
" searching
set nohlsearch " dont highlight all search results
set incsearch " increment search
@@ -51,7 +51,7 @@ set tags=./tags;
" syntax highlighting
syntax on " enable syntax highlighting
-" set templatepath .vim/plugin/templates.vim
+" set templatepath .vim/plugin/templates.vim
let g:templatePath = "~/.config/vim/templates"
" highlight redundant whitespaces and tabs.
@@ -92,7 +92,7 @@ autocmd BufRead /tmp/mutt-* set tw=72 spell
" load build-in man page viewer command
runtime ftplugin/man.vim
-" set bash syntax - pressed v in bash-vi mode
+" set bash syntax - pressed v in bash-vi mode
au BufRead,BufNewFile /tmp/bash-* let is_bash=1|setfiletype sh
" mesa project specific settings
@@ -130,3 +130,8 @@ autocmd FileType tex colorscheme delek
autocmd FileType asciidoc colorscheme inkpot
set spellfile=$XDG_DATA_HOME/vim/spell.de.add,$XDG_DATA_HOME/vim/spell.en.add
+
+highlight ExtraWhitespace ctermbg=red guibg=red
+autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
+" Show trailing whitespace and spaces before a tab:
+match ExtraWhitespace /\s\+$\| \+\ze\t/