user2693928
user2693928

Reputation:

Vim normal mode in command pallete

When i write / or : vim opens command mode - i can write command like:

vimgrep /abc/

If i click shift+p it fill the previous command.

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

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

Upvotes: 0

Views: 313

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172590

Yes, Vim's command-line has limited editing capabilities; 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. Here's just a quick guide:

  • If you already know this is going to be a complex edit, open via q: / q/ instead of : / /.
  • If you only realize this while editing, you can switch via <C-f>.

Upvotes: 1

romainl
romainl

Reputation: 196566

  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 <C-p>?
  3. How large is your keyboard for your arrow keys to be "far away"?
  4. See :help cmdline-editing.

Upvotes: 1

Related Questions