save and restore the search highlight

This commit is contained in:
Scott Bronson
2010-09-15 12:45:39 -07:00
parent e10ca02d0d
commit c5f1e9298f

View File

@@ -7,5 +7,5 @@ autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
" Run :FixWhitespace to remove end of line white space.
command! -range=% FixWhitespace silent! keepjumps <line1>,<line2>substitute/\s\+$//
command! -range=% FixWhitespace silent! let savesearch = @/ | keepjumps <line1>,<line2>substitute/\s\+$// | let @/ = savesearch | unlet savesearch