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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -