Substitute partial line in vim using only substitute command -
I am editing a file with the same lines as:
{ "a_function", A_function}, {"a_second_function", a_second_function}, I would like to change the underscore to blank space, but only within quotation marks. Is this a way to do this using the : substitute command? I know I can do this by recording a macro and maybe there are plugins that can do this, but for cleverness I want to do it with a : substitute command in a shot.
You should do this command:
:% s / v (". {-}") / \ = option (constraint (1), "_", "", "g") I add quotation marks to the first pair on each line I remove all as a replacement with underscores.
Comments
Post a Comment