On 03/11/2011 04:26 AM, H Xu wrote:
Is it possible to reverse uppercase letter and lowercase letter when Caps Lock is on? Sometimes normal mode commands are uncomfortable to use when Caps Lock is on. When Caps Lock is on, For example, Shift + I would lead to the effect of 'i', which makes me very uncomfortable.
To make this useful, I suspect Vim would have to be able to detect when Caps Lock is toggled on vs. off. As far as I know, there's no way to do this short of OS keyboard-remapping so that it sends something other than Caps that Vim can detect the keypress. That said, unless you have some pressing need to use caps-lock, I tend to disable it (or rather, I make it my Compose key on X). Additionally, unless you're using Caps outside of Vim, I'd not bother using Caps at all within Vim given the ease with which textual transformations can be performed (":help gU"). As a final resort if your text requires all caps all the time, (such as FORTRAN, IIUC) you might do a bunch of mappings like
:inoremap a A :inoremap b B ... :inoremap z Z -tim the Caps-lock hater :) -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
