johtela / vscode-modaledit

Configurable Modal Editing in VS Code
https://johtela.github.io/vscode-modaledit/docs/README.html
Other
89 stars 8 forks source link

Stronger visual indication of Normal mode in status bar #13

Closed kedashoe closed 4 years ago

kedashoe commented 4 years ago

Hi @johtela , really enjoying vscode-modaledit :)

I'm just getting started with vscode after using vim for the past however many years, so apologies if this is something I should be able to do myself..

In vim, the different modes have very different colors in the status bar. I think it would help if this extension did something similar. Would it be possible to add something like modaledit.statusBar.normalBackgroundColor and modaledit.statusBar.normalForegroundColor? Maybe the same for insert?

Thanks!

HactarCE commented 4 years ago

Changing the caret color is another possibility (not sure how hard this is to do though).

Delapouite commented 4 years ago

We have to be careful about changing the color of the status bar. As stated in the vim extension:

There are performance implications to using this plugin. In order to change the status bar, we override the configurations in your workspace settings.json which results in increased latency and a constant changing diff in your working directory

More details here: https://github.com/VSCodeVim/Vim/issues/2124

johtela commented 4 years ago

This is definitely a worthwhile idea, but requires some investigation. I don't know how easy/difficult it would be to change the color of the cursor(s), status bar or other elements of the UI. Indeed, one must be careful not to adversely impact the performance.

Another concern regarding using colors is the theme support. The highlight colors should definitively be customizable and off by default. It is impossible to automatically pick a color that would be good in both light and dark themes.

I will explore what possibilities there are, and get back to this. Meanwhile, any ideas are welcome.

johtela commented 4 years ago

Cursor color seems to be easy to change. So if no objections arise, I'll add in the configuration three new options:

All of these are null by default, which means that default cursor color is used.

haberdashPI commented 4 years ago

Doesn't the linked solution have the same problem as modifications to the status bar? It changes the workspace configuration which is persistent across sessions no? Meaning that every time you switch between normal and inset mode the workspace settings.json file will change??

johtela commented 4 years ago

Yes it does. I tried that approach in this commit and reverted back to a different solution.

In upcoming version 2.0, there is a configuration option to change both status bar text (including icons) and color in each mode. Hopefully this will be strong enough indication of current mode. Only status bar text color can be changed without changing the static configuration. Background cannot be changed.

johtela commented 4 years ago

Implemented in version 2.0. See documentation for details.