vim编辑器视图模式
Because Vim is focused on changing existing code just as much as writing new code, it is split into several modes that each have different purposes.
由于Vim与编写新代码一样专注于更改现有代码,因此Vim分为几种模式,每种模式都有不同的用途。
正常模式 (Normal Mode)
By default, Vim starts in “normal” mode. Normal mode can be accessed from other modes by pressing Esc
or <C-[>
.
默认情况下,Vim以“普通”模式启动。 通过按Esc
或<C-[>
可以从其他模式访问普通模式。
In Normal mode key presses don’t work as one would expect. That is, they don’t insert text into the document; instead, certain key presses can:
在正常模式下,按键不像人们期望的那样工作。 也就是说,他们不会在文档中插入文本。 相反,某些按键可以:
移动光标 (Move the cursor)
h move one character left
h向左移动一个字符
j move one row down
j下移一排
k move one row up
k向上移动一排
l move one character right
我向右移动一个字符
As many vim commands, row movement can be prefixed by a number to move s everal lines at a time:
与许多vim命令一样,行移动可以以数字作为前缀,以一次移动几行:
4j move 4 rows down
4j下移4行
6k move 6 rows up
6k向上移动6行
6k move 6 rows up
6k向上移动6行
Basic word movements:
基本的单词动作:
w move to beginning of next word
w移至下一个单词的开头
b move to previous beginning of word
b移至上一个单词的开头
e