How can I format string concatenations ("abc" + "def") as I format paragraph in Vim? -


suppose have piece of code

var t = "abc abc abc abc abc abc abc abc abc abc " +         "abc abc abc abc abc abc abc abc abc"; 

i edit first line exceeds 80 columns in editor

var t = "abc abc abc abc abc abc abc abc abc abc abc abc abc" +         "abc abc abc abc abc abc abc abc abc"; 

i don't have in code, need format lines

var t = "abc abc abc abc abc abc abc abc abc " +         "abc abc abc abc abc abc abc abc abc " +         "abc abc abc abc"; 

there possible solve using gq} or know plugin me?

until find plugin, record macro qq, go right 80 times 80l, go end of word before ge, append a " + <enter> "<esc>, save macro q.

then join following lines j , delete unwanted " + " patterns.

you can play macro again @q.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -