Re: automatic uppercase in insert mode
- On Mon, Nov 03, 2003 at 12:15:36AM +0100, Antoine J. Mechelynck wrote:
>There are advantages and disadvantages to using a keymap.
> I don't know if this exists, but if it doesn't, it looks to me like the
> ideal thing to be solved by a keymap, as follows:
> a A
> b B
> c C
> y Y
> z Z
> A a
> B b
> Y y
> Z z
> The ... are not to be entered literally, they mean "and so on".
> :help language-mapping
> :help mbyte-keymap
> :help keymap-file-format
Advantages: you get a reminder in the status line, it works with my
script word_complete.vim , others?
Disadvantages: it also applies in search commands, etc., which I would
find confusing. (YMMV) It will not work with any other keymaps you may
have (as someone else already pointed out, I think).
The attached script defines :inoremap's to accomplish much the same
thing. You can turn caps lock on or off, or toggle it or just ask for
the status with
(The usual abbreviation rules apply, so you can probably use "Caps", or
maybe just "C", instead of "CapsLock".)
In the comments at the top, I have left the "Maintainer" line
empty. If anyone likes this and wants to adopt the script and post it,
be my guest.
HTH --Benji Fisher