On Wed, Feb 2, 2011 at 10:12 PM, Israel Chauca F. <israelvarios@fastmail.fm> wrote:
This gives me
:%s/^word\ze => ,/& => &,/
On Feb 2, 2011, at 11:37 PM, Colin Beighley wrote:
> Hello,
>
> I want to do something like this
>
> word => ,
>
> becomes
>
> word => word,
>
% => whole file
^ => Beginning of line
\ze => end of text to be replaced
& => matched text
Replace 'word' with '\w\+' or '\a\+', see :h \w for more options.
Israel
--
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
word => word, => ,
Any way to do it without the trailing \s=>, ?
Colin
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:
Post a Comment