第一次使用2V时,Vim会在视觉模块中选择2行,正如我所料.当我清除选择并再次执行2V时,它再次选择2行.凉.
但是当我做2V,然后用y猛拉时,接下来的2V将选择4行.如果我保持在2V和y之间交替,则2V将使每次选择的行数加倍.
为什么会这样?我假设它与寄存器有关,但我找不到直接的答案…为什么寄存器的内容会影响V?
这是
vim中的特殊行为.它在帮助中记录:
If Visual mode is not active and the “v”,“V” or CTRL-V is preceded with a
count,the size of the prevIoUsly highlighted area is used for a start. You
can then move the end of the highlighted area and give an operator. The type
of the old area is used (character,line or blockwise).
- Linewise Visual mode: The number of lines is multiplied with the count.