I am unable to exit from vi to the linux command prompt.

This is a discussion on I am unable to exit from vi to the linux command prompt. within the Linux Security forums, part of the System Security and Security Related category; vi has taken over the computer when I ran it. I do not know how to shut it down. CTRL-...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-22-2005
MLH
 
Posts: n/a
Default I am unable to exit from vi to the linux command prompt.

vi has taken over the computer when I ran it.

I do not know how to shut it down. CTRL-C
doesn't do anything. Neither does ESC or
CTRL-BREAK. I can't seem to get colon q
to do what I expect.

What happens if I just turn off the power?
Reply With Quote
  #2 (permalink)  
Old 03-22-2005
Bit Twister
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

On Mon, 21 Mar 2005 23:30:52 -0500, MLH wrote:
> vi has taken over the computer when I ran it.
>
> I do not know how to shut it down. CTRL-C
> doesn't do anything. Neither does ESC or
> CTRL-BREAK. I can't seem to get colon q
> to do what I expect.


Esc <--- escape key to get vi's attention
:w <--- writes changes to disk
Esc
:q <--- quit vi

>
> What happens if I just turn off the power?


Bad juju. Depends on how mad Murphy is at you.
Reply With Quote
  #3 (permalink)  
Old 03-22-2005
MLH
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

One more thing... something at the bottom of the screen
says "E37 No write since last change..." whenever I press
:q and hit RETURN.
Nothing I do seems promising. I don't there's a way out of the
vi program.
Reply With Quote
  #4 (permalink)  
Old 03-22-2005
Greg
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

per the vimtutor, listed below is how to exit vi.

Greg


Lesson 1.2: ENTERING AND EXITING VIM


!! NOTE: Before executing any of the steps below, read this entire
lesson!!

1. Press the <ESC> key (to make sure you are in Normal mode).

2. Type: :q! <ENTER>.

---> This exits the editor WITHOUT saving any changes you have made.
If you want to save the changes and exit type:
:wq <ENTER>

Reply With Quote
  #5 (permalink)  
Old 03-22-2005
MLH
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

When I hit ESC, :q - something at the bottom of the screen
says "E37 No write since last change..." vi acts as if I must
do something else before allowing me to exit.

Depending on what I press (and I've pressed several
key combos hoping for an exit strategy) sometimes it
says RECORDING at the bottom of the screen. I have
no idea what effect my keystrokes are having. I don't
want to hit the big switch.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


On Mon, 21 Mar 2005 22:35:29 -0600, Bit Twister
<BitTwister@mouse-potato.com> wrote:

>On Mon, 21 Mar 2005 23:30:52 -0500, MLH wrote:
>> vi has taken over the computer when I ran it.
>>
>> I do not know how to shut it down. CTRL-C
>> doesn't do anything. Neither does ESC or
>> CTRL-BREAK. I can't seem to get colon q
>> to do what I expect.

>
>Esc <--- escape key to get vi's attention
>:w <--- writes changes to disk
>Esc
>:q <--- quit vi
>
>>
>> What happens if I just turn off the power?

>
>Bad juju. Depends on how mad Murphy is at you.


Reply With Quote
  #6 (permalink)  
Old 03-22-2005
Bit Twister
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

On Tue, 22 Mar 2005 00:09:51 -0500, MLH wrote:
> When I hit ESC, :q - something at the bottom of the screen
> says "E37 No write since last change..."


Indicats change to file and you have not saved your changes.

Reply With Quote
  #7 (permalink)  
Old 03-22-2005
Keith Keller
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

On 2005-03-22, MLH <CRCI@NorthState.net> wrote:
> vi has taken over the computer when I ran it.


In the future, please 1) keep your posts on-topic (use of vi
has nothing to do with security), and 2) do not top-post when
composing a followup. In regards to 1), there are many other
groups in comp.os.linux.* where your questions would be more
appropriate (c.o.l.misc, c.o.l.admin, for starters). In regards
to 2), you should delete anything that's not appropriate to
your followup.

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

Reply With Quote
  #8 (permalink)  
Old 03-22-2005
jayjwa
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

On 2005-03-22, MLH <CRCI@NorthState.net> wrote:
> One more thing... something at the bottom of the screen
> says "E37 No write since last change..." whenever I press
>:q and hit RETURN.
> Nothing I do seems promising. I don't there's a way out of the
> vi program.


lol It's got you! I thought that too, when I started with it ;)

That's telling you "you made some changes but you didn't bother to save them
and now your work is going to get erased, that's an Error to me"

vi has two modes, command mode and input mode. Depending on which vi clone
you're using, it might even say the mode in the lower right corner (I know
Elvis does). Just keep hitting Esc. a few times to be sure you're in Command
mode.

How to get into Input mode? When in *Command Mode*, hit "i" (insert text) or
"a" (append text). One moves the curse over one spot the other doesn't.

How to get out of Input mode? Hit Esc, once, twice doesn't hurt.

I'm done. Now now what?

Go to Command Mode -> Hit Esc. Press ":" now you can enter file commands.

:x Save my work to the file I was editing and Exit. (Most Vi's support "x")

:w Save my work to the file I was editing. That's all.

:w <some file name> Save my work to this file, instead.

:q Quit Vi (*after* I've saved my work, or I get an error)

:q! Quit Vi. Do it now, I don't care about saving anything.


Most often I use "Hit Esc, hit ":" then "x", ENTER", with Elvis or Vim.

Vi is actually a powerful editor when you learn it. Elvis and Vim are two good
ones that I have here, both can work in console or X11 with graphics.


--
Why do people continue to pay real money
for a laughable attempt at an OS??
Micro$oft: How Can We Control You Today?
Educate yourself: http://www.microsuck.com/
Reply With Quote
  #9 (permalink)  
Old 03-22-2005
unruh-spam@physics.ubc.ca
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

MLH <CRCI@NorthState.net> writes:

>vi has taken over the computer when I ran it.


>I do not know how to shut it down. CTRL-C
>doesn't do anything. Neither does ESC or
>CTRL-BREAK. I can't seem to get colon q
>to do what I expect.


>What happens if I just turn off the power?


If you told us the symptoms more clearly we might help.

Ar you in X or in a console? Have you tried atl-ctrl-bksp in the former
case or alt-ctrl-F2 in the latter?

Reply With Quote
  #10 (permalink)  
Old 03-22-2005
unruh-spam@physics.ubc.ca
 
Posts: n/a
Default Re: I am unable to exit from vi to the linux command prompt.

MLH <CRCI@NorthState.net> writes:

>One more thing... something at the bottom of the screen
>says "E37 No write since last change..." whenever I press
>:q and hit RETURN.
>Nothing I do seems promising. I don't there's a way out of the
>vi program.


:q!
(ie put the exclamation point after the q)

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:23 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0