aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/filter.vim
blob: f499f4324582d1544a4769c1fda8c3f1d8bf82b5 (plain)
1
2
3
4
5
6
7
" Run a filter over the entire buffer, but save the window position and
" restore it after doing so
function! filter#Stable(command) abort
  let l:view = winsaveview()
  execute '%' . a:command
  call winrestview(l:view)
endfunction