I often do some operations on set of string and generally I it works well with a regex in Notepad++. A long time ago I remember using some tool which could record an action and perform same operation. For example lets say I have this string . Please keep in mind this is just an example.
First Name,Last Name,Social Security
I want to convert it to the following:
first_name("First Name"),last_name("Last Name"),social_security("Social Security")
Is there any way to do this using some text editor? I have these type of requirements too often. I remember using vim for something similar.
It can be accomplished using vim macros, but a “simple” substitution fits better
Or you can use
awk(sed, whatever) for this from withinvim, like:With macro, something like qayt,Pi("ESCf,i")ESCF2SPACEr_l~0~q
But this only partially works… (for the first column) Basically:
aregister,(", then leaves insert mode")beforespacebackwards, and replaces with_Then run your macro from normal mode via @a.
Vim is very capable.