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-...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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> |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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/ |
|
|||
|
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? |
|
|||
|
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) |