Home Download Buy Blog Forum Support

Color of caret as language indicator

Color of caret as language indicator

Postby ilya on Wed Oct 21, 2009 12:34 pm

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?
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Color of caret as language indicator

Postby ilya on Wed Oct 21, 2009 12:53 pm

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.
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Color of caret as language indicator

Postby ilya on Wed Oct 21, 2009 1:33 pm

sublimator wrote:Good night for now! It's late in Australia.

Good night!

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


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.
Attachments
screen.png
screen.png (89.08 KiB) Viewed 2241 times
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Color of caret as language indicator

Postby vim on Wed Oct 21, 2009 1:50 pm

usually Left-Alt + Left-Shift is used to switch between layouts
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: Color of caret as language indicator

Postby ilya on Wed Oct 21, 2009 1:53 pm

sublimator wrote:Do you have to use a global hotkey to change inbetween the two languages?

Yes. Now it left Alt + Shift.

sublimator wrote:A `system` windows setting?

Yes.

sublimator wrote:Is it a different keyboard layout?

Yes. Something like that:
Image
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Color of caret as language indicator

Postby ilya on Wed Oct 21, 2009 2:17 pm

sublimator wrote:Ok, I misunderstood you b4. Us stupid 1 language english speaking people live in a bubble LOL

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

sublimator wrote: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?

It is incomprehensible to me. :(

sublimator wrote:I'm pretty sure something can be done.

Maybe Jon know some magic about? :roll:
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Color of caret as language indicator

Postby EJ12N on Wed Oct 21, 2009 2:28 pm

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.

+1 :)
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Color of caret as language indicator

Postby jps on Wed Oct 21, 2009 8:44 pm

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.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests