Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art, started 12 Feb 1996.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
working with the escape character

working with the escape character

alt.ascii-art · 2 messages · 12 Feb 1996 - 16 Feb 1996
Greetings all...

I have had a couple of requests for info on how to use ascii value 027 (escape) into vi, pico, etc. What follows is an EXTREMELY ugly hack to at least enable for use the escape character in vi and pico.

the below assumes you're on a UNIX platform (I can come up with VMS instructions as well)

1. use this command to dump an escape character into a file named ec (you can name it anything you like):

echo (esc) > ec

note that (esc) means the escape key, not the ^ character followed by the the bracket [.

you can then use this small file as a convienient way to pull an escape character into an editor.

this gives you a file named ec with 3 characters in it: the escape character, and ascii newline, and an eof character. You can then edit out the newline (if you really want) and just leave the escape character and the eof (can't get rid of the eof). In fact, you can dump as many escape characters in a file as you wish (I personally have a file named ec with two escape characters separated by a space for greater convienience).

that's it,

2a (vi)
in vi, while working on your art, go to command mode, enter a : (appears at the bottom of the screen), then type a lower case r (to retrieve a file) followed by a space and then the actual name of the file (in this case, the file with your ascii escapes), e.g.

~
~
~
~
:r ec

that will put the escape on the line below the current position of the cursor before you went into command mode. 

2b(pico)
in pico, use ^R (ctrl+r) to retrieve the escape.

I don't know how to retieve in emacs...

please refer to the VT100 escape sequence list I posted here a little while ago. I also have the wyse 50 set (not nearly as interesting as the VT100)

Allen

asantora@phosphorus wrote:
>Greetings all...
>
>I have had a couple of requests for info on how to use ascii value 027 (escape)
[proceeds to explain how to get an <escape> into a file]

Oh yes, inventive. And quite unnecessary.

As one of the vi gurus who hangs around comp.editors, I can
tell you that learning how to put type escape in vi is one
of the most important things to learn for using macros.

To type escape in vi, hit <ctrl>-V, then hit escape.
Here are some great vi macros for editing art in Replace
mode:
	map <up> ^[klR
	map <down> ^[jlR
	map <left> ^[R
	map <right> ^[llR

To use these, put them in a file called .exrc in your home
directory. The ^[ in each is the escape character. The
strings "<up>", "<down>", etc must be replaced by the key
sequence of your arrow keys. To get that type <ctrl>-V and
then hit the correct key.

If you don't want to have those around all the time, you
can put them in a different file. Then when you want to
use them type ":source file" in vi.

Elijah
------
feel free to ask me or the newsgroup comp.editors about
any other vi problems

Related ASCII art in the Gallery

Explore these categories from our collection of 11,000+ artworks:

About this thread. These messages were posted publicly to the newsgroup alt.ascii-art in 1996 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post