Why lowercase [i] does not work in visual block mode?

后端 未结 2 596
小鲜肉
小鲜肉 2021-01-13 21:34

I often forget how to insert in visual block mode and read again the answer Shift+i.

As Honghe.Wu wonders in his comment:

Why lowercase i

2条回答
  •  我在风中等你
    2021-01-13 22:03

    The i command inserts before the cursor position. In visual block mode, the cursor position (usually) represents the bottom right corner of the selection, and the cursor position is included in the block.

    So, the semantics of i wouldn't match, and that's why it was left out of the Vim implementation (adding that would probably be a simple one-line change to the source code). The semantics do match for I (insert before any text) and A (insert after any text), that's why those are available in visual block mode.

提交回复
热议问题