[You may want to input text in all uppercase letters - maybe for a FORTRAN program. Using CAPS LOCK in vi can be a pain because you have to release CAPS LOCK almost every time you want to type a vi command. Here's a nice way to type lowercase letters during input and ex modes; they'll be mapped to uppercase automatically. -JP]
Try putting this in yourfile:
map! a A map! b B map! c C ... map! z Z
Anytime you type (during text-input mode) an
a, the editor will map it into
What's that you say? You don't want this all the time?
Just put it in a file called .f (for FORTRAN), and type:
when you want FORTRAN mode.
Of course, you can
[After that, anywhere you want a lowercase letter, type CTRL-v first
to temporarily cancel the map.
For example, to type the command
You can also go into the ex command mode by typing
the vi command
That takes you to the ex colon (
:) prompt - where the
map! macros won't affect what you type.
To return to vi mode from ex command mode, type
:vi. -JP ]
- in net.unix on Usenet, 9 October 1986