Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " vim preserve function
- if !exists('*Preserve')
- function! Preserve(command)
- try
- let l:win_view = winsaveview()
- "silent! keepjumps keeppatterns execute a:command
- silent! execute 'keeppatterns keepjumps ' . a:command
- finally
- call winrestview(l:win_view)
- endtry
- endfunction
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement