简体   繁体   中英

Can the cursor in vim be changed to an underscore?

Is there a way to make the cursor be an underscore -> _ instead of a box?

I've looked over this thread and tried the commands, but nothing changed. I know there is a set cursorline option, but that is not what I'm looking for.

Brownie points if you can tell me how to make it blink too.

This can influenced by the 'guicursor' option, cp. :help 'guicursor' for details. The following gets you a blinking underline cursor in all modes:

:set guicursor=a:hor20-Cursor

This mostly only works for GVIM. In the terminal, you have to find proper ANSI escape sequences to switch the cursor shape, or better just reconfigure the cursor in the Terminal's settings.

(In Ubuntu) Definitely, you can change Cursor Shape to I-Beam, Underscore or Block (Default) in VIM :

Step 1: Go the Edit menu in terminal
Step 2: Select the 'Profile Preferences' Option.
A window window will appear...

Step 3: Select 'General' tab into the opened window.
At the bottom of the tab you can find 'Cursor Shape' option.
From here you can change Cursor Shape to I-Beam, Underscore or Block.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM