LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 09-02-2007, 05:21 AM   #1
Vilius
Member
 
Registered: Jan 2006
Location: Lithuania
Distribution: CentOS, Debian
Posts: 175

Rep: Reputation: 15
Leave vi mode without pressing enter ?


Hi,
I found vi mode useful fom me(I used 'set -o vi'), but I want to leave it without pressing enter key(entering current command). How do I do that ?

thanks
Vilius
 
Old 09-02-2007, 05:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 20,982
Blog Entries: 44

Rep: Reputation: 1235Reputation: 1235Reputation: 1235Reputation: 1235Reputation: 1235Reputation: 1235Reputation: 1235Reputation: 1235Reputation: 1235
Any particular reason *why* you would want to do that?
 
Old 09-02-2007, 09:46 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,089

Rep: Reputation: 227Reputation: 227Reputation: 227
If you want to leave the insert mode, just press the "escape" key, like with the vi editor.

If you want to abort the current command edition, the simpler way is to press "Control-C".

Last edited by jlliagre; 09-02-2007 at 09:47 AM.
 
Old 11-12-2007, 08:44 PM   #4
Solmoeban
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Rep: Reputation: 0
Escaping command line in linux terminal

12/11/07 20:20p
I have Ubuntu fawn(7.04) command lines in bash are by default in emacs mode
( use 'set -o emacs') to go to start of the command line use Ctrl-a
to the end Ctrl-e. To escape the command line without executing
use Ctrl-c in 'emacs' as well as in 'vi' additionally
Ctrl-x Ctrl-c also exits command(it's normal exit from emacs editor
don't forget save buffer Ctrl-x Ctrl-s.)

Cheers,

Solmoeban.

Last edited by Solmoeban; 11-12-2007 at 09:12 PM.
 
Old 11-13-2007, 05:12 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 50
Esc
ZZ

with one hand

Will put you out of a saved document
 
  


Reply

Tags
commandline, vi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enter execute mode..? amit_linux Linux - Software 2 05-31-2007 04:19 AM
Mandrake 10 doesnt install after pressing enter subliminal Mandriva 9 06-17-2004 04:04 PM
can no enter rescue mode entirely pandachina Linux - Software 0 09-07-2003 08:56 PM
Howto leave vncviewer -fullscreen mode Consystor Linux - Software 2 07-20-2003 09:04 AM
I did the following program and get blank line after pressing <ENTER> purpleburple Programming 5 08-21-2002 01:00 PM


All times are GMT -5. The time now is 03:57 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration