vim
or vi
is very powerful text editor used in Linux systems. As they provide a lot of features and used from command line they have a lot of commands and shortcuts. In this page we will list these commands as a cheat-sheet. We will look most used command and shortcuts in this tutorial which makes this guide as beginner guide.
Edit
Edit Current File
:edit
Edit Specific File
:edit text.txt
Insert
Append Text After Cursor
:a
Append Test At The End Of Line
:A
Insert Text Before Cursor
:i
Insert Text Before First Non-Blank In The Line
:I
Begin New Line Below And Insert Text
:o
Begin New Line Above And Insert Text
:O
Delete
Delete Character Before Cursor
:x
Delete Character After Cursor
:X
Delete Current Line
:dd
Delete Multiple Lines From Current Line
:d5d
Save
Save
:w
Save As
:w deneme.txt
Exit
Exit
:x
Save and Exit
:wq
Exit Without Saving Changes
:q!
1 thought on “Vim Editor Commands Cheat-sheet”