LinuxQuestions.org
Register a domain and help support LQ
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
 
Search this Thread
Old 09-02-2007, 05:21 AM   #1
Vilius
Member
 
Registered: Jan 2006
Location: Lithuania
Distribution: CentOS, Debian
Posts: 185

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: 27,543
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
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, Mint, OL
Posts: 9,518

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
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: 53
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 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 11:46 AM
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
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 12:34 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 Google+: linuxquestions
Open Source Consulting | Domain Registration