mirror of
https://github.com/bronson/vim-trailing-whitespace.git
synced 2025-11-08 19:43:53 -05:00
save and restore the search highlight
This commit is contained in:
@@ -7,5 +7,5 @@ autocmd InsertLeave * match ExtraWhitespace /\s\+$/
|
|||||||
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
|
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
|
||||||
|
|
||||||
" Run :FixWhitespace to remove end of line white space.
|
" 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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user