vi insertion question

Ralph W. Reid rreid at sunset.net
Tue Mar 22 18:31:33 EST 2005


Pressing the escape extra times will not generally do any harm--it
will just back you out of insert mode and into command mode, and the
extra escape key presses will only keep you in command mode.  Some
versions of vi (and vim) can be set up to beep the speaker if the
escape key is pressed once the editor is already in command mode.
Therefore, pressing the escape key several times should insure that
you are in command mode, and you can continue working from there.  I
am not sure why you should have to jump out and back into insert mode
for every line of text--I always simply hit the enter key to get to
the next line.

As for inserting a line at the top of a file, go to the top of the
file while in command mode with ':1', and then press a capital 'O' to
put a line above the current line.

HTH and have a _great_ day.

On Mon, Mar 21, 2005 at 01:28:48PM -0700, Ned wrote:
> HI list,
> 
> I am trying to insert a line in a document with vi.
> Precisely, I need to insert that line to be the first one in the document.
> How can I turn on/off the insertion mode in vi?
> Acording to instructor, we have to use the escape key to get out of the insert mode for every new line.
> How can I switch btw the modes in vi and how can I know in what mode is the program at?
> 
> Many thanks!
> Ned
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

-- 
Ralph.  N6BNO.  Wisdom comes from central processing, not from I/O.
rreid at sunset.net  http://personalweb.sunset.net/~rreid
...passing through The City of Internet at the speed of light!
SEC (x) / COSEC (x) = (TAN (x) / COTAN (x)) ^ 2




More information about the Speakup mailing list