Re: Caps Lock
> I don't think there is a way to do that. However you could[snip]
> avoid CAPS LOCK all together...
> mpWell, there's also visually highlighting the text and pressing
> TYPE TEXT
"U" to force the selected text to be highlighted.
Additionally, if it's all a paragraph (delineated by blank lines
above and below), you can use
to uppercase the entire paragraph. If it's just a sentence
(":help sentence"), you can use
Or for that matter, any other text object or motion should do
just fine with the "gU" command.
for some pointers on these.
- Hi Rob,
I usually disable Caps Lock altogether, in the OS. (Windows, OS X, Amiga
Or remap Caps Lock to Control.
Or use a Happy Hacking Keyboard Lite 2 (USB).
- On 01/11/05, Keith W. Roberts <keithr@...> wrote:
> ----Original Message----Ah `[ and `].
> From: Dominic Evans [mailto:oldmanuk@...]
> Sent: Tuesday, November 01, 2005 2:43 AM
> To: r.cussons@...
> Cc: vim@...
> Subject: Re: Caps Lock
> > I don't think there is a way to do that. However you could avoid CAPS
> > LOCK all together...
> > I don't know if there is already a mark for where insert mode was
> > started (instead of the manual mp here).
> '[,'] is the range for the most recent insertion (or yank, whichever is
> later). These maps will let you upcase the prior (or current) insertion:
> nnoremap <F12> `[gU`]
> inoremap <F12> <ESC>`[gU`]
However, the latter one seems to be non-inclusive and miss off the
last typed character. The following worked:
- On Tue, 1 Nov 2005 at 12:49pm, Moshe Kaminsky wrote:
> * Robert Cussons <r.cussons@...> [01/11/05 12:29]:
> > Hi all,
> > don't know how difficult or possible this is to do, but here goes!
> > I sometimes want to write a large amount of test in capitals so I turn on
> > Caps Lock, but then I want to use commands and forget that Caps Lock is on
> > and obviously get unexpected results. Is there a way to get Vim to ignore
> > Caps Lock when in command mode, but still allow me to press <shift> + o for
> > example to get O in command mode, with Caps Lock on. Example to clarify the
> > above:
> > I am typing away with Caps Lock on, then I enter command mode and want to
> > in a blank line above the one I am on, so I want the command for this toYep, that is what came into my mind too. You should really use a "soft"
> > still be <shift> + o, even though I have Caps Lock turned on.
> > Hope at least someone can understand what I mean!
> Maybe instead of pressing Caps, you should :imap any non capital letter
> to a capital one. Then, when you are done, unmap it. All this should be
> done by a suitable command, of course.
version of capslock, implemented in Vim. Something like to start with:
let g:capslock = 0
let diff=lc - char2nr('A')
let c = lc
while c < (lc+26)
exec 'inoremap' nr2char(c) nr2char(c-diff)
exec 'iunmap' nr2char(c)
let c = c + 1
let g:capslock = !g:capslock
nnoremap <silent> \cl :call ToggleCaps()<CR>:echo "Caps lock is
Extending this to all keys would require more sohisticated mapping.
Yahoo! Mail - PC Magazine Editors' Choice 2005