
Vim +?patten filename: Go to the particular pattern’s line inside the file, first occurrence from last.

In the following example, it will open the README file and jump to the first occurrence of the word “install”. Vim +/pattern filename: Go to the particular pattern’s line inside the file, first occurrence from first. Vim +N filename: Go to the Nth line of the file after opening it. % – Go to the matching braces, or parenthesis inside code.

H – Go to the first line of current screen.g_ – go to the last non blank character of the line.įollowing are the three navigation which can be done in relation to text shown in the screen.^ – go to the first non blank character of the line.

0 – go to the starting of the current line.

Within a line if you want to navigate to different position, you have 4 other options. In this article, let us review the following 8 Vi / Vim navigation options.įollowing are the four navigation that can be done line by line.īy using the repeat factor in VIM we can do this operation for N times. To be very productive, you should be aware of all possible navigation shortcuts in your editor. Navigation is a vital part of text editing. This article is part of the ongoing Vi / Vim Tips and Tricks series. This article is written by SathiyaMoorthy.
