You should be able to move the cursor freely about the screen by using combinations of the up, down, right, and left arrow keys. If your machine is equipped with arrow keys, try these now. The same command typed in lowercase and uppercase characters might have different effects. Certain letter keys, the arrow keys, and the Return key, Back Space (or Delete) key, and the Space Bar can all be used to move the cursor when you're in command mode. In command mode, you can move the cursor with a number of keyboard commands. When you start vi, the cursor is in the upper left corner of the vi screen. Open your practice file now, and try each of the commands that are discussed in this section. Now that you have created a file, you'll need to understand the concepts that are required to navigate within it.
#Vi page down shortcut key how to
In the previous sections you learned how to create, save, print, and exit a vi file. You’ll be amazed with the capabilities of Vim editor.The following sections explain the following categories of vi commands. Even if you’ve been using Vi and Vim Editors for several years and have not read this book, please do yourself a favor and read this book. Based on my Vim editor experience, I’ve written Vim 101 Hacks eBook that contains 101 practical examples on various advanced Vim features that will make you fast and productive in the Vim editor.
#Vi page down shortcut key code
Several years back, when I wrote lot of C code on Linux, I used to read all available Vim editor tips and tricks. So, naturally I’m a huge fan of Vi and Vim editors. In the following example, it will open the README file and jump to the last occurrence of the word “bug”. 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.
WORD – WORD consists of a sequence of non-blank characters, separated with white space. You may want to do several navigation in relation to the words, such as: `^ – Go to the position where you were in INSERT MODE while last closing the file.
`” – Go to the position where you were in NORMAL MODE while last closing the file.N% – Go to the Nth percentage line of the file.You may want to do some special navigation inside a file, which are: ctrl+u – Jump back (up) one half screen.ctrl+d – Jump forward (down) a half screen.
#Vi page down shortcut key full
ctrl+b – Jump backwards one full screen.L – Go to the last line of current screen.M – Go to the middle line of current screen.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.