Thursday, March 4, 2010

Insert an ASCII Character With Vim

 
Vim is a handy tool for inserting
an ASCII character into a file. Of
course, most characters are easily
entered by just simply typing them.

For example, Capital-A is
entered into a file by typing a
Capital-A while in Insert Mode.
It's easy to enter a number, a character
of the alphabet, or punctuation.

In life, it is often helpful to have
more than one way to get there. If
a landslide has blocked one road, you
can use another.

In Vim, the alternative way to insert
an ASCII character is to type CNTRL-V
while in insert mode. This will cause you
to be prompted for the ASCII code for
that character.

You terminate the prompt but either typing
something other than a number or by hitting
the ESC key. After you've terminated the
prompt, the character, whose ASCII code you
just typed, appears.

Ed Abbott

No comments:

Post a Comment