Search code examples
vim

How to disable the effect of caps lock while in normal mode in vim?


When the CAPS lock is ON in normal mode, the vim behaves in an abnormal way. Is there a way to disable this effect of CAPS lock when editing in normal mode?


Solution

  • Since the Caps Lock state is managed by your operating system, integrating from within Vim with it, while possible, is difficult and prone to break. Instead, I would recommend to implement a "soft" Caps Lock within Vim (for those RARE_CASES where this is needed), and avoid the Caps Lock key when using Vim. (Some argue that it's best remapped to Ctrl or Esc; I agree.)

    The Insert-mode only Caps Lock page on the Vim Tips Wiki lists multiple approaches for such a soft Caps Lock. (There are also pages for remapping the key.)