On 03/08/12 11:43, Juanjo Gomez Navarro wrote:
Hi, I would like to create a map which removes all sort of indent
within a selected text. I have tried this:
vnoremap<BS> s/^ *//
But when I select the text (with "V") and then press backspace, I get
the whole line replaced by the text "/^*//"
In addition to Ben's answer, you might consider using the :left
command which was made to do this :-)
:vnoremap <bs> :left<cr>
which I find to be a bit clearer in the intention when I go back
and look at it later.
:help :left
-tim
--
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