aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorSergey Nazaryev <sergey@nazaryev.ru>2016-12-19 17:14:50 +0300
committerSergey Nazaryev <sergey@nazaryev.ru>2016-12-19 17:14:55 +0300
commit0f9c6808dee6930440806be4af45048412524bd4 (patch)
tree03e50fa6546dd0cf322e12e74924aa47b4aa924b /vimrc
parent08b2812181e62c5df8d0607edaa2e7cad3b8a92c (diff)
downloaddotfiles-0f9c6808dee6930440806be4af45048412524bd4.zip
dotfiles-0f9c6808dee6930440806be4af45048412524bd4.tar.gz
dotfiles-0f9c6808dee6930440806be4af45048412524bd4.tar.bz2
Vimrc improvement
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc10
1 files changed, 6 insertions, 4 deletions
diff --git a/vimrc b/vimrc
index 6f6814d..084b957 100644
--- a/vimrc
+++ b/vimrc
@@ -48,7 +48,6 @@ syntax on " turn on syntax highlight
colorscheme elflord
hi Visual ctermfg=7 ctermbg=0 cterm=none
hi LineNr ctermfg=DarkGrey ctermbg=none
-match Error /\s\+$/ " match trailing whitespaces
" Mappings
let mapleader=","
@@ -85,13 +84,16 @@ if has("autocmd")
" autodetect file type for syntax highlighting
autocmd! BufEnter,InsertLeave * :filetype detect
+
+ " match trailing whitespaces
+ autocmd! BufEnter,InsertLeave * match Error /\s\+$/
endif
" Persistent undo
if has('persistent_undo')
- call system('mkdir -p ~/.vim/undo')
- set undodir=~/.vim/undo
- set undofile
+ call system('mkdir -p ~/.vim/undo')
+ set undodir=~/.vim/undo
+ set undofile
endif
" Omni-complition