简体   繁体   English

命令面板中的Vim正常模式

[英]Vim normal mode in command pallete

When i write / or : vim opens command mode - i can write command like: 当我写/: vim打开命令模式-我可以这样写命令:

vimgrep /abc/

If i click shift+p it fill the previous command. 如果我单击shift + p,则填充上一个命令。

In this case if i want to change only letter a to b I should use arrow key until i get to the letter and then rename it 在这种情况下,如果我只想将字母a更改为b ,则应使用箭头键,直到找到该字母,然后将其重命名

abc -> bbc.

Is there any faster way - arrow keys are far away and slower to write. 有没有更快的方法-箭头键距离较远且书写较慢。

Can I use normal mode when I im in the command pallete(bottom place where i write the commands). 我在命令面板(我写命令的底部)时可以使用普通模式吗?

Thank you 谢谢

  1. You are confusing "command mode" (another name for normal mode) with "command-line mode". 您将“命令模式”(普通模式的另一个名称)与“命令行模式”混淆了。
  2. Shift+P (or simply P should insert P . Did you mean <Cp> ? Shift+P (或简单地说, P应该插入P您是说<Cp>吗?
  3. How large is your keyboard for your arrow keys to be "far away"? 您的键盘有多大,箭头键才能“远离”?
  4. See :help cmdline-editing . 参见:help cmdline-editing

Yes, Vim's command-line has limited editing capabilities; 是的,Vim的命令行具有有限的编辑功能。 for complex edits there, you'd have to use cursor keys. 对于那里的复杂编辑,您必须使用光标键。 Fortunately, there's a command-line window , which allows edits just like in any other buffer. 幸运的是,有一个命令行窗口 ,它允许像在其他缓冲区中一样进行编辑。

You'll find the complete explanation at :help command-line-window . 您可以在:help command-line-window找到完整的说明。 Here's just a quick guide: 这只是一个快速指南:

  • If you already know this is going to be a complex edit, open via q: / q/ instead of : / / . 如果你已经知道这将是一个复杂的编辑,通过开放式q: / q/而不是: / /
  • If you only realize this while editing, you can switch via <Cf> . 如果仅在编辑时才意识到这一点,则可以通过<Cf>进行切换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM