Vim: Simple way to edit several lines at once at the same cursor position

Posted . Visible to the public.

Within Vim do the following:

  • Move cursor to the first starting line where you want to start editing
  • ctrl + v to enter select mode to select all characters in one column
  • Move the cursor vertically down until you selected the last line
  • shift + i to got into "multiple" insert mode
  • Do all the required editings
  • Use the ESC-character exit insert mode
  • Press ESC-character to apply all changes

Hint

This does not work with deleting and editing at once

  • If you first want to delete the content, can also use the select mode of ctrl + v to select the content to delete
  • Delete the selected box by pressing d
Profile picture of Felix Eschey
Felix Eschey
Last edit
Felix Eschey
License
Source code in this card is licensed under the MIT License.
Posted by Felix Eschey to makandra dev (2023-07-20 15:02)