首页 > 解决方案 > 在 vim 命令行中移动

问题描述

我成为 vim 用户已有一段时间了,我知道如何在文件中移动,但无论如何都可以在编辑器命令行本身上这样做(有名称吗?)。

例如,我输入:vimgerp /sometext/ files/*.js并意识到我拼写:vimgrep错误,我只想跳到该行的开头并修复它。这里的任何其他类型的小技巧(在单词之间跳转——w、e 和 alt+left/right 似乎都不起作用)也很受欢迎。

标签: vim

解决方案


http://vimdoc.sourceforge.net/htmldoc/usr_20.html

<Left>          one character left
<Right>         one character right
<S-Left> or <C-Left>    one word left
<S-Right> or <C-Right>  one word right
CTRL-B or <Home>    to begin of command line
CTRL-E or <End>     to end of command line

推荐阅读