Useful Vim commands
May 1st, 2021
In this article, I am going to show you commands that I've found useful and some new ones I found writing this article that might help you become better at using Vim.
I am also writing it for future reference when I need to remind myself of some of these commands.
Text manipulation
Delete single line dd
Copy (yank) single line yy
Paste yanked code p
Undo changes u
Orientation
Go to the end of a line Shift + $
Go at the beginning of a line 0
Go at the end of a file Shift + g
Go at the beginning of a file gg
Search
Basic search
/ <search pattern> + Enter
Backward search
? <search pattern> + Enter
Case insensitive search
/\c <search pattern> + Enter
Exit (save)
Save and quit ESC + :wq + Enter
Force quit without saving
ESC + :qa! + Enter