Comment on page
Chapter 1: Cursor Movement
Welcome to Chapter 1, this chapter will learn simple cursor movement operations.
If you already have a certain foundation, this part can be skipped, directly
Gto the end of the document according to the operation into the next chapter.
hleft one character
lright one character
Wmove right to the beginning of the word
Emove right to the end of the word
Bmove left to the beginning of the word
Note: All lowercase words are word boundaries with word boundaries, uppercase letters with spaces as boundaries
Try to feel the various movements in the following character blocks!
This project's GitHub url is https://github.com/dofy/learn-vim
Please clone it to your local folder and open the first file which is
named chapter01.md via following command "vim chapter01.md"
and welcome to https://yahaha.net :)
ggto the first line of the document
Gto the last line of the document
0to the beginning of the line (column 1)
^to the first non-whitespace character
$to the end of the line
Hmove to the top of the screen
Mmove to the middle of the screen
Lmove to the bottom of the screen
Ctrl-dmove down half a page
Ctrl-umove up half a page
Ctrl-fmove down one page
Ctrl-bmove up one page
<N>ggjump to line N
<N>jjump down N lines
<N>kjump up N lines
Note: A number N can be added before all commands, which means that the command behind it is executed N times. For example, if you want to move down 3 lines, you can use
3jto achieve the same effect. In addition, there are actually two commands above: one is executed immediately after typing, such as
gg; the other is to enter
:first (there will be a
/first), this type of command needs to be executed after the input is completed. Press Enter, which is the same in the following tutorials.
Now you can swim in the current file. When you are familiar with various movement operations, you can locate the current document to the last line by pressing
Gand enter the next chapter according to the prompt.