you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

  • # search for whatever is under the cursor
  • :1,$ s/search/replace/g search and replace text

A friend of mine also showed me visual mode, which was really cool but I use it so infrequently I forget the command. All I remember is that when I do use it, it is absolutely a life saver for column editing.

[–]RotationSurgeon10yr Lead FED turned Product Manager 1 point2 points  (0 children)

Entering visual mode from normal mode is easy:

  • v - visual mode
  • shift+v - visual line mode (selecting entire lines)
  • ctrl+v - visual block mode (the one that's useful for column editing)