Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the cursor appearance in Visual Studio Code via extension API

Is it possible to change the cursor appearance in Visual Studio Code using the extensions API? Knowing that VS Code is built on top of Chromium, and that there isn't a way to style the text cursor in a browser using CSS, it wouldn't seem likely.

I'm messing around and trying to implement some simple modal editing, and I would like to create a block cursor like vim in normal mode.

like image 306
w.brian Avatar asked Nov 24 '15 06:11

w.brian


1 Answers

I'm not sure about using the extension API, but you can do it via your user preferences file (which extensions must be able to modify because the "Vim" extension does it as mentioned in my comment above):

File -> Preferences -> User Settings

Place the following in settings.json:

// Place your settings in this file to overwrite the default settings
{
    // Controls the cursor style, accepted values are 'block', 'line' and 'underline'
    "editor.cursorStyle": "block"
}
like image 191
Dan Bechard Avatar answered Nov 04 '22 09:11

Dan Bechard