我发现自己经常在Vim(通过<n>action
)重复一些动作。很多时候我设法错误输入一个数字。因为Vim没有显示我输入的数字,所以只有在我运行命令后才会发现我的错误。所以,我想要一种方法来显示数字,同时我输入它们。是否可能,最好的方法是什么?
答案 0 :(得分:4)
使用:set showcmd
数字将显示在右下角。来自:h showcmd
'showcmd' 'sc' 'noshowcmd' 'nosc'
'showcmd' 'sc' boolean (Vim default: on, off for Unix, Vi default:
off)
global
{not in Vi}
{not available when compiled without the
+cmdline_info feature}
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.
If the number of bytes is different it is also displayed: "2-6"
means two characters and six bytes.
- When selecting more than one line, the number of lines.
- When selecting a block, the size in screen characters:
{lines}x{columns}.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.