I know I can apply changes to multiple lines by selecting the lines in visual mode (I use ctrl-v) and defining the set of actions and the mode to start in (e.g. norma A, will add a comma at the end of all selected lines).I was wondering how can I go back to normal mode after using something like A (which goes to insert mode). I'm not familiar with the terminology enough to google it properly.I want to add a comma at the end of each line and then join all lines together. I assumed something like the following (not correct, obviously) should do it:ctrl-v, G, :, normal A, normal J RETBut obviously this appends , normal J to each line.I know there are plenty of other ways to do it (regular expressions, macros ...) so I don't need alternatives, that's not my question.
Applying changes to lines in alternating modes
insert mode;normal mode;range
Well actually you can use a litteral <ESC> character to chain commands like you would do normally::'<,'>norm! A,^II+This will insert a , at the end of each line, and a + at the start.To add the special ^I char, press C-v and ESC.