Loading ...
Sorry, an error occurred while loading the content.

67220Re: adding prefix

Expand Messages
  • Yakov Lerner
    Apr 3, 2006
    • 0 Attachment
      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:
      :%s/\w\+/PREFIX&/g
      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.

      Yakov

      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.
    • Show all 5 messages in this topic