3

Vim基础用法

 2 years ago
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.
neoserver,ios ssh client
28 3月 2022 •

Vim基础用法

作为一名程序员,怎么能不会用Vim!【对不起,我就不会的那一个。。。我只知道 idd/还有:wq:q! 😂 】

废话不多,先上图

vim

  • <C-]> 跳转到当前标识符的定义位置 (相当于在当前光标位置的单词上按住ctrl用鼠标点击)
  • <C-o> 回退一步 (go back)
  • <C-i> 前进一步 (go forward)
  • '. 跳转到之前修改位置
  • '' 在前一次跳转位置与当前位置间切换
  • 行号 G:行号<回车> 跳转到某一行
  • gg 跳转到文件开头
  • G 跳转到文件末尾
  • H 跳转到屏幕顶端(如果设置了set so=n,则跳转到第n行)
  • L 跳转到屏幕底端(如果设置了set so=n,则跳转到倒数第n行)
  • M 跳转到屏幕中间
  • fF 跳转到本行某个字符,小写f向右查找,大写F向左查找。用;,在匹配间切换
  • tT 跳转到本行某个字符之前,小写t向右查找,大写T向左查找。用;,在匹配间切换
  • /正则表达式 跳转到下一个匹配。用nN在匹配间切换。
  • ?正则表达式 跳转到上一个匹配。用nN在匹配间切换。

vim2


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK