Wednesday, February 3, 2010

Recording a sequence which doesn't terminate on a search and replace failure

I was wondering if there was a simple way to define a recorded
sequence in vim which doesn't terminate if a :s command doesn't
find any matches. Basically, I'm converting blocks of C++ code
to C++ strings, with things like
:'a,'bs/"/\\:/g
. Except that not all of the blocks contain strings, so
sometimes, this search and replace will fail. I'd like the
recorded sequence to continue in such cases.

--
James Kanze

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: