3
Vim基础用法
source link: https://lunashu.org/vimji-basic-usage/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
28 3月 2022
•
Vim基础用法
作为一名程序员,怎么能不会用Vim!【对不起,我就不会的那一个。。。我只知道 i
、dd
和/
还有:wq
、:q
和!
😂 】
废话不多,先上图
<C-]>
跳转到当前标识符的定义位置 (相当于在当前光标位置的单词上按住ctrl用鼠标点击)<C-o>
回退一步 (go back)<C-i>
前进一步 (go forward)'.
跳转到之前修改位置''
在前一次跳转位置与当前位置间切换- 行号
G
或:
行号<回车> 跳转到某一行 gg
跳转到文件开头G
跳转到文件末尾H
跳转到屏幕顶端(如果设置了set so=n,则跳转到第n行)L
跳转到屏幕底端(如果设置了set so=n,则跳转到倒数第n行)M
跳转到屏幕中间f
或F
跳转到本行某个字符,小写f
向右查找,大写F
向左查找。用;
或,
在匹配间切换t
或T
跳转到本行某个字符之前,小写t
向右查找,大写T
向左查找。用;
或,
在匹配间切换/
正则表达式 跳转到下一个匹配。用n
或N
在匹配间切换。?
正则表达式 跳转到上一个匹配。用n
或N
在匹配间切换。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK