Tuesday 10 October 2017

Vim - Is Capslock on?

When I work with Vim I almost never look at my keyboard (like it should be!) and this is great, but sometimes, unknowingly I hit the CapsLock key and causes me to yell at my screen.


Because, you know, j is not the same as J in normal mode (and so on).


So instead or mapping CapsLock to say Ctrl I want to display an error message that will warn me in normal mode if this is the case.


Is there a way for Vim to tell if you have CapsLock enabled?


Note: I prefer a VimScript/VimL solution for portability and because I want Vim to notify me and not depend on the actual system.

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...