67221RE: adding prefix
- Apr 3, 2006Thanks for reply Yakov.
Well There are huge number of variables for which I need chages and again
lotsa variable where I don't the prfix.
Also, I don't know about the "regexp" which you mentioned.
I'm not good at script programming otherwise I thogut I can list all
variables in a file and can replce them with the prfix to the actual file.
Also I must mention I was using some library where all the variables were
with the same name, but because of some version complexity we are prefixing
every variable with the version number and so I need this facility.
I'm compiling the cpp file in gcc is there anyway I can use some compiler
facility of vim.
Looking forward to here a little more on the same.
From: Yakov Lerner [mailto:iler.ml@...]
Sent: Monday, April 03, 2006 3:24 PM
Cc: Vim mailing list
Subject: Re: adding prefix
On 4/3/06, jagpreet <jagpreetc@...> wrote:
> Is there anyway I can add prefix to some of the variables in a file with
> some specific text.
> I know the global replacement command, but the number of variables are
> really huge
If there is *small* number of variables for which you don't need
prefix, then you may consider adding prefix for all variables:
and then proceed to remove prefix where you don't need it.
Otherwise, if you can come up with regexp for those variables
which you want to replace, then its's easy too.
Otherwise you'll still need to prepare list of variables and then it's
easy to make a function that takes this list from, say,
external file, and work according to the list. I don't know
which way you choose.
and putting global replacement individually for each variable
> will take long time.
> I want to add text prefix XXX to all some variables in the file.
- << Previous post in topic Next post in topic >>