I noticed different styles. But I cannot relate to what I typed, maybe because I have many missed key strokes.
-
We need more info to be able to help you– mattbJun 22 at 13:50
-
Welcome to Vi and Vim!– husBJun 22 at 13:56
-
Maybe my question is not clear? Maybe it's specific to the vscode vim extension?– samuelnihoulJun 22 at 13:57
-
2@samuelnihoul It's certainly unclear to me! If you can't think of any way to describe it more precisely, perhaps a screenshot might help?– RichJun 22 at 14:22
1 Answer
Vim allows the cursor shape to be customized. Depending on your system, Vim changes the cursor shape according to the mode it is in. By default, some of these are
- normal mode: a block cursor
- insert mode: a vertical bar
- operator pending mode: a "half cursor"
- replace mode: a horizontal bar (or "underscore")
To illustrate, Vim starts in normal mode. Hit i
, and vim is now in insert mode. Now, any keypress gets inserted as text. Hit <Esc>
to return to normal mode. Hit d
, and vim is in operator pending mode, waiting for a motion to specify the text that this delete operator will work on. etc.
There are other modes too, such as visual, visualLine, to name a few. For more, see
:help vim-modes
,:help mode-switching
,:help 'showmode'
.
For the vscode vim extension, the list of modes can be found here.
-
-
-
@samuelnihoul Oh, I think that half-block cursor would be when vim is in operator-pending mode (eg. after one of
c
,d
,y
is pressed, and vim is waiting for a motion/text-object). I have my edited my answer to include this detail. While I don't use the vscode vim extension, I believe this behavior work the same way in vscode vim.– husBJun 23 at 3:25