Sublime Forum

Color of caret as language indicator

#1

Is it possible to make a different color of caret for the foreign languages than english? For example, default color for english (and coding) and when we change language to another one then caret change their color too. I think this is the best indicator of language when typing, which is lacking in the system. But since this is not in the system, it may be possible in our favorite editor?

0 Likes

#2

First, sorry for my bad English.

I mean, for example in my case, that would be great to have a different color of the caret for english and russian.

Other users can have second language in the system, for example — german, chinese, polish, does not matter. That is, when you have english selected, then the default color of caret. And when you selected is not english, the other color of caret.

It is very clear and comfortable when you type and constantly switch from one language to another.

0 Likes

#3

Good night!

PS: One of my friends already half a year living in Australia :smile:

Returning to the topic. This is just an indicator. Just to reduce the frequent errors when you forget to switch the language back and start typing abracadabra in a different layout.


0 Likes

#4

usually Left-Alt + Left-Shift is used to switch between layouts

0 Likes

#5

Yes. Now it left Alt + Shift.

Yes.

Yes. Something like that:

0 Likes

#6

And I badly explain what I want to say because I speak bad English :laughing:

[quote=“sublimator”]Ideally, you’d just swap layout/language with same key as before as it is an ingrained habit yeah?
It’s a matter of having Sublime know somehow when you changed layout.
If it’s stored in the registry, which it likely is, maybe you can use _winreg python
module (std lib comes with Sublime) to look in registry for current language.
But how often to poll the registry so as not to effect performance?[/quote]

It is incomprehensible to me. :frowning:

Maybe Jon know some magic about? :unamused:

0 Likes

#7

[quote]It’s the same concept as I think would be good for the snippet fields; a color to
remind you where you are always looking and can easily see it.

The status bar isn’t looked at often enough. It’s probably same reason why Vim
has different cursors for the different modes.[/quote]

+1 :smile:

0 Likes

#8

It sounds like this should be possible by writing a plugin that periodically calls GetThreadUILanguage to get the current language, and changes the color scheme based on the result.

It may be that there’s too much of a perf hit from changing the color scheme, in which case I can look at providing a finer grained method for changing the cursor color, but try it and see imo.

0 Likes