在控制台 vim 中输入时显示命令?

Ste*_*ven 16 linux vim gvim

例如,在 gvim 中,如果我处于正常模式,然后我按“ayiw 将一个单词拉入寄存器 a,gvim 会在我在右下角附近键入时显示“ayi。是否可以在控制台 vim 中获得此实时显示,如果可以,如何获得?

小智 28

只需将此行添加到您的.vimrc

set showcmd
Run Code Online (Sandbox Code Playgroud)

来自 Vim 帮助:

Show (partial) command in the last line of the screen.  Set this
option off if your terminal is slow.
In Visual mode the size of the selected area is shown:
- When selecting characters within a line, the number of characters.
- When selecting more than one line, the number of lines.
- When selecting a block, the size in screen characters:
  {lines}x{columns}.
Run Code Online (Sandbox Code Playgroud)