Friday, November 25, 2011

strip whitespace and carriage returns from end of file

I have the following shortcut to strip whitespace from the end of a file:
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>

How can I have that command also strip all trailing carriage returns?

c
--
Chris Lott

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: