Thursday, December 13, 2018

Re: query about vim replacement

2018-12-13 16:08 GMT+01:00, Kumar Vaddi <kumar.vsrp@gmail.com>:
> Hi,
> I want to replace syntax in files like below in gvim. The file has 90000
> lines. manually replacing is very tough.
>
> 1) -from { replaced with -from {abc.abc_core.
> 2) -from [a-z]+ replaced with -from abc.abc_core.[a-z]+
> 3) -from [A-Z]+ replaced with -from abc.abc_core.[A-Z}+
> 4) -from * replaced with -from abc.abc_core.*
>
> can you please help me in this regard.
> Thanks,
> Kumar

:%s/-from {/-from {abc.abc_core./g
:%s/-from \([A-Za-z*]\+\)/-from abc.abc_core.\1/g
--
Kit

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