-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual cue to distinguish modes #13
Comments
Hey, and thanks for the feedback! I also find the difference between the two modes too hard to notice and often try to run commands in normal mode and vice-versa. However anything that changes settings is slow, and not the best user experience (in some cases it will create a FYI changing the color of the status bar is possible, but also requires changing user preferences, so it has the problems I cited above. |
Good to know I'm not the only one suffering to remember in which mode I'm working 😆 The difference between a thin and a thick cursor line is too subtile indeed. Let's not go that way. For my understanding:
|
Another idea:
|
Any change to the user preferences (e.g changing the theme, changing the accent color of the status bar) is slow. However we can apply "decorations" to the editor, which are somewhat limited but much faster. Those can be used to change the background or border color of a line, for instance.
It is possible by using decorations. But we'd need a subtle, yet clear color to distinguish the two modes.
It looks like changing the blinking mode will also slow things down. |
I think the only way we can choose a subtle, yet clear colour is to use one of the predefined theme colours. I'd say we just decorate the current line with the theme background colour Or use |
I tested this with a few colors:
|
Then Do you think it is better to have a highlighted background during normal mode or insert mode? My first thought was during insert mode, because selections would pop out more. |
Oh, you're right about that! I personally went with the highlight on normal mode because IMO, insert mode is closer to "normal editing" and therefore should have a color scheme closer to "normal VS Code," but making selections pop out more by inverting this choice is a very good alternative. |
For me I'll try to push a change that goes in your way. A preference could be added for this too. |
Making this a preference is fine with me. About the |
Would it make sense to use a Ie. use a block cursor as a pseduo-selection. The main problem I can see with this is deciding how commands should interact with empty selections. Eg. should |
Using a block cursor would imply that there is always a selection of 1 character, which does not fit nicely with the VSCode of working.
We still could try to swap from a thick line in normal mode to a thin line cursor in insert mode. Although it is subtiel, I found out my eyes notice the difference quickly. Sent with GitHawk |
I mocked up a prototype: hedning@9c78ba5 (here's a compiled version: dance-0.1.6.vsix) To be clear, I'm suggesting only using a block cursor when there's no selection. Ie. the case where it's currently not clear if you're in insert or normal mode.
Yes, and there's certainly a few edge cases which are trickier with that model. Eg. should The upshot is two visually distinct modes, insert and selection. That might just be me though, I'm really accustomed having line cursor mean insert mode, and doubt any coloring etc. will do as good as showing a selection/block.
In that case there's a non-empty selection, so a line cursor would be used.
I'd guess implementation wise it's easiest to treat it as a selection of the newline char, so eg.
We'd get a selection, so would use a line cursor after |
About using a block character -- why not, but I want this behind an optional preference, and this isn't high priority for me (but I'll try to accept a PR that implements it if you want to submit one). It will definitely require some changes in the existing code, but something nice about this is that this is the way Kakoune originally works, so this option will increase compatibility with Kakoune, and any of the choices we make regarding its implementation can be made by looking at the way Kakoune does it. Regarding the line highlight -- I've been using the current config for a few days now as a long time Vim user (so I'm used to looking at the cursor to find out if I'm in normal or insert), and I no longer confuse the two modes. I do understand your preference, and suggest putting this behind a user preference. How about adding |
I like your suggestion on the Sent with GitHawk |
Thanks for implementing this! I'm using it with the options:
and I really like the outcome. Selections are clear in normal mode, and switching to insert mode gives me cues of where my cursors are. Awesome! |
Note: |
In vanilla Kakoune and also in Dance I tend to mix up which mode I'm in. I know the status bar shows me "Normal" or "Insert", but it is usually far away from the cursor, where my eyes are, and I have to search for the text between all the other information VSCode shows in the status bar.
I love how in Vim you can spot the difference just by looking at the cursor: a block for normal mode, and a line for insert mode. However, this is not an option for Dance, because of the (very well founded!) choice to support zero width selections.
I was thinking about other ways to visually distinguish normal mode and insert mode. Till now, I've come up with two ideas:
"editor.renderLineHighlight": "line"
"editor.renderLineHighlight": "none"
What do you think of these options?
The text was updated successfully, but these errors were encountered: