On 20 апр, 08:27, Sean <[email protected]> wrote:
> For example, I have a text file in which
> there are a lot of expressions in the following form:
>
>        id = number
>
> id: [a-z]+
> number: [0-9]+
>
> I want to rewrite these expressions into this form
>
>           (set id number)
>
> is it possible to do this in vim?
Yes. Something like
:%s/\([a-z]\+\)\s*=\s*\([0-9]\+\)/(set \1 \2)/g

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

Reply via email to