repeat-an-edit-on-multiple-lines
2024-01-15
softwares-and-tools
vim-cheatsheat
https://stackoverflow.com/questions/355907/how-do-i-repeat-an-edit-on-multiple-lines-in-vim1for the text:abc123abc
def456def
ghi789ghiyou do:Ctrl - v
jj # select 3 lines
Shift - I
, # insert a comma
Esc # at this moment, three commas gonna be addedyou get:abc,123abc
def,456def
ghi,789ghi2use ctrl + v to and move cursor, you'll select several lines, you can do operations in normal mode, for example x to delete a character