Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 09-02-2007, 04:21 AM   #1
Registered: Jan 2006
Location: Lithuania
Distribution: CentOS, Debian
Posts: 185

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

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 ?

Old 09-02-2007, 04:38 AM   #2
Registered: May 2001
Posts: 29,335
Blog Entries: 55

Rep: Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535Reputation: 3535
Any particular reason *why* you would want to do that?
Old 09-02-2007, 08:46 AM   #3
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,669

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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 08:47 AM.
Old 11-12-2007, 07:44 PM   #4
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.)



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

Rep: Reputation: 55

with one hand

Will put you out of a saved document


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 On
HTML code is Off

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

All times are GMT -5. The time now is 01:33 PM.

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