add some search related settings

This commit is contained in:
hukl 2012-05-08 21:59:39 +02:00
parent 53f6cef498
commit ec86f9452b

7
.vimrc
View file

@ -39,6 +39,13 @@ fun! <SID>StripTrailingWhitespaces()
endfun endfun
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces() autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
" Search related settings
set incsearch
set hlsearch
" Map Ctrl+l to clear highlighted searches
nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l>
" Highlight characters behind the 80 chars margin " Highlight characters behind the 80 chars margin
:au BufWinEnter * let w:m2=matchadd('ColumnMargin', '\%>80v.\+', -1) :au BufWinEnter * let w:m2=matchadd('ColumnMargin', '\%>80v.\+', -1)