Published on

Vim Insert at the Beginning/End of Lines

Beginning

  • Press Esc to enter command mode
  • Use Ctrl + v to enter visual block mode
  • Move Up/Down to select the columns of text in the lines you want to comment
  • Then hit Shift + i and type the text you want to insert.
  • Then hit Esc

End

Insert * at the end of each line.

:%s/$/\*/g

References