Revert "nvim: plugin: Add a simple whitespace plugin"

This reverts commit 891fae907b.

Now that we have mini.trailspace enabled by default, drop this
whitespace plugin.
This commit is contained in:
Sanchayan Maity 2023-06-07 14:14:56 +05:30
parent 4468c8b0c1
commit b6243f2a9a
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
1 changed files with 0 additions and 12 deletions

View File

@ -1,12 +0,0 @@
" https://vi.stackexchange.com/questions/454/whats-the-simplest-way-to-strip-trailing-whitespace-from-all-lines-in-a-file
function! Preserve(command)
" Preparation: save window state
let l:saved_winview = winsaveview()
" Run the command:
execute a:command
" Clean up: restore previous window position
call winrestview(l:saved_winview)
endfunction
nnoremap <unique> <silent> <Leader>ws :call Preserve("%s/\\s\\+$//e")<CR>
xnoremap <unique> <silent> <Leader>ws :call Preserve("%s/\\s\\+$//e")<CR>