小智 36
如果您希望加快到达特定地点的时间,请拥有许多页面。这些命令支持在需要时按住按键以提高速度:
ctrl+ f(向下翻页)
ctrl+ b(向上翻页)
ctrl+ d(向下滚动窗口,通常是半屏)
ctrl+ u(向上滚动窗口,通常是半屏)
Ser*_*ujo 16
还有其他不错的跳跃
} .......... jump paragraph forward
{ .......... jump paragraph above
H .......... top of the window
M .......... middle of the window
L .......... bottom of the window
Run Code Online (Sandbox Code Playgroud)
如果您使用搜索进行跳转,则/pattern可以使用
Ctrl-o ...... jump to the last position (jump list)
Ctrl-i ...... jump to the next position (jump list)
Run Code Online (Sandbox Code Playgroud)
为了使我的搜索更快,因为我的笔记本电脑很难到达,/我有这个映射:
nnoremap <space> /
Run Code Online (Sandbox Code Playgroud)
为了在最后一个插入点开始输入,您可以输入:
gi
Run Code Online (Sandbox Code Playgroud)
您可以重新选择并跳转到最后一个视觉选择
gv
Run Code Online (Sandbox Code Playgroud)
有了选择后,您可以使用字母o跳过选择边缘,并可能增加或减少选择的距离。
还有“更改列表”
g; ................ goes to the older cursor position on the changlist
g, ................ goes to the newer cursor postion on the change list
Run Code Online (Sandbox Code Playgroud)
有时您处于正确的位置,但您想在不移动光标的情况下滚动寡妇。
zt ............ puts the current line at the top
zz ............ puts the current line at the middle
zb ............. puts the current line at the bottom
Run Code Online (Sandbox Code Playgroud)
如果你想在 vim 上打开你最后编辑的文件,你应该设置一个这样的别名:
alias lvim='vim -c "normal '\''0"'
Run Code Online (Sandbox Code Playgroud)
我过去遇到的一件烦人的事情是我的速度有多快Ctrl-d。为了解决这个问题,我现在有了“ vim-smoothie ”插件。
一个有趣的插件可以帮助您更快地跳转到文件中,它是vim-sneak,它重新映射您的普通s键并向您显示您键入两个键的提示,它会跳转到它允许您使用;跳转到下一个。(它有一个口号:vim 的缺失动作)。
我相信您正在寻找一种更好的方式来在代码块或类似部分之间进行导航,而不必执行递归j或k。这些是我个人的最爱:
如果您仍然想探索更多导航技巧和命令,我强烈建议您观看这个精彩的演讲。