Saturday, July 15, 2017

How to continue the map when an error come out?

nnoremap <leader>k :%s/\v^\s+//g<CR>:sort u<CR>:xa<CR>


This is my map. When there is no match to the "^\s+", an error will come out, and the map will pause, the sort u, and the xa will not be executed. So how to continue the map when there is an error come out?

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment