simple movement commands in vim

VIM has many movement commands that help you to navigate in your text editor so that you can write and edit the contents of your file.

The real power of Vim shines when you get familiar with the movement commands used in Vim. If you are using other text editors, you will use your mouse to move from one place to another, reducing your efficiency.

Knowing the different movement commands of VIM will make your text editing easy, fast, and enjoyable.

We will not dive deep into these commands because learning VIM in small steps is easy and you can concentrate well.

VIM Command to move to the top of the document

You can be at any place in your document and if you want to go to the top of the page.

gg

You can also use the below command to move to the top of the document

[[

VIM Command to move to the end of the document

You can be at any place in your document and want to go to the end of the document.

  • First press Shift
  • Then press g
Shift + g

You can also use the below command to move to the end of the document

]]

VIM Command to move one line down

If you want to move one line down from your current cursor position.

j

VIM Command to move one line up

If you want to move one one up from your current position.

k

VIM Command to move one character left

If you want to move one character left from the current cursor position.

h

VIM Command to move one character right

if you want to move one character right from the current cursor position.

l

These are some basic commands to navigate your document using VIM. we will have another post for some more commands.

References

Read About VIM

Leave a Reply

Your email address will not be published. Required fields are marked *