Tech Bloster logo Tech Bloster

How to Open a file in Vim?

Navigate to the directory containing the file and then use the command:

Vim Command Interface

How to Move the Cursor in Vim?

In Vim, you can move the cursor using keyboard keys. The following are the basic commands to move the cursor:

  • h - Move left
  • j - Move down
  • k - Move up
  • l - Move right

These commands are used while in normal mode. You can switch to normal mode by pressing the Esc key.

Vim Command Interface

Advanced Movements

  • w - Move to the beginning of the next word
  • b - Move to the beginning of the previous word
  • 0 - Move to the beginning of the line
  • $ - Move to the end of the line
Vim instert mode Command Interface

How to Move by Pages?

  • Ctrl + f - Move one page forward
  • Ctrl + b - Move one page backward
Add Text to a File in Vim

How to switch between open windows in Vim?

To switch between windows in Vim, press Ctrl-w followed by another w. This command moves the cursor between open windows, allowing you to switch back and forth.

Add Text to a File in Vim