Top 10 things to remember for text manipulation in Vim

Vim Shortcuts for text manipulations

·

1 min read

Vim has been my favorite editor for a long and here I am going to post some of the cool shortcuts that you can use for Text Manipulation.

Text Manipulation

  1. Pressing gg goes to the top of the file.

  2. G moves to the bottom of the file.

  3. Pressing `u` will do the UNDO action when you are in NORMAL mode.

  4. cc will delete the current line and go to the INSERT MODE.

  5. 0 takes you to the beginning of the line, the total beginning and not the start of the text.

  6. _ takes you to the beginning of the nonwhite space character.

  7. $ takes you to the end of the line

  8. d$ will delete everything from the cursor toward the right. This is the same as hitting D .

  9. <num>dd will delete that many lines of code, like 9dd will delete 9 lines of code and 120dd will delete and hitting dd for 1 line of code.

  10. s deletes the single character and gets you into the INSERT mode while just like how you use x to delete a single character in NORMAL mode.