?
Solved

press the escape key from a text file in vim

Posted on 2006-07-19
4
Medium Priority
?
215 Views
Last Modified: 2010-04-22
Hi,

I would like to create a text file, such that when I "cat" the file from xterm, it is as if I am pressing the <escape> button on my keyboard.  Is there a known way to do this?
0
Comment
Question by:bryanlloydharris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 500 total points
ID: 17143279
echo -e "\033" >file
cat file

or simply

echo -e  "\033"

0
 
LVL 15

Accepted Solution

by:
bpmurray earned 500 total points
ID: 17144147
Why not use vim to add the character? You need to use CTRL-V CTRL-[ to add the escape character. Of course, if you're using the windows version, you may have CTRL-V remapped to paste, in which case the default replacement is CTRL-Q, i.e. type CTRL-Q CTRL-[ to add escape to the file.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 17144560
Good point bpmurray.  I was looking at the question rather than the subject.

Just proves again that it is always better to describe the problem you are trying to solve rather than asking how to solve the way you think it should be done.
0
 
LVL 3

Author Comment

by:bryanlloydharris
ID: 17160718
Thanks!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question