That file name worked for me.

To copy into vi, there are two ways.

If you have your mouse working, just highlight the text with the mouse,
go to vi, go into the insert mode, and right click or double click the
stuff in.

If no mouse, then, save your text to a file, go to vi:
:r file

If you are new to vi, you will find a lot of frustration at first, but, now,
I prefer vi to anything else for text editing.

There are a numerous short cuts which get around vi's seeming clumsiness.
For example, to close up all those lines when you have to edit things and
the lines are all ragged, the command
:1,$ ! fmt
is nice. Of course, you can map that to a function key. And it can be
customized to do just what you want to do.

If you are good at sed, you can use sed to filter your files while in vi:
:1,$ ! sed "s/Find/Replace/"
for example. If you mess up, u undoes any number of edits. [Cntrl]R undoes
the undos.

If you don't use vi, you are missing 1/2 the benefit of linux!

Joel


On Sun, May 12, 2002 at 08:31:11PM +0700, Brian Durant wrote:
> On Sunday 12 May 2002 20:17, Joel Hammer wrote:
> - I don't know what is causing this error. I just cut and pasted your script
> - into vi and it saved without trouble.
> - What command are you using to save the script?
> - Have you tried to remove some offending trailing charcters (invisible) from
> - the end of your file?
> 
> Maybe the first problem is that I have not found out how to copy the lines of 
> text from something else into vi yet. I did warn that I was a newbie ;-) I 
> have been writing this by hand and the possibilitiy is of course, that I 
> added or subtracted a <space> somewhere. How would I copy something from 
> KMail into vi? Assuming I get this far, can I save the first file with the 
> command :w /usr/local/bin/newsbody-ispell ?
> 
> Cheers,
> 
> Brian

Reply via email to