How to make the vim cursor in the shell have different shapes in different states
曾经蜡笔没有小新2017-05-16 16:42:34
0
2
875
For example, when inserting, "|" is displayed, and when in command mode, a square is displayed?
In macvim, the shape will be changed by default, but not in the shell. How to configure it?
You can use guicursor to set the cursor of Gvim. For example, if you only set the cursor to '|' in insert mode, you can use the following configuration:
set guicursor=i:ver1
The reason why the cursor shape will definitely not change in the shell is because the cursor in the shell is the setting of the shell (gnome-terminal). The reason why cursor is set to guicursor means that this setting is only for gvim (g in gvim means gui)
You can use
guicursor
to set the cursor of Gvim. For example, if you only set the cursor to '|' in insert mode, you can use the following configuration:The reason why the cursor shape will definitely not change in the shell is because the cursor in the shell is the setting of the shell (gnome-terminal). The reason why cursor is set to guicursor means that this setting is only for gvim (g in gvim means gui)
if $TERM_PROGRAM =~ "iTerm"
let &t_SI = "\]50;CursorShape=1\x7"
let &t_EI = "\]50;CursorShape=0\x7"
endif