No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help
View Responses


Grex Info Item 23: vi's versa
Entered by carl on Wed Feb 17 22:13:50 UTC 1993:

Since there wasn't a place to ask specific questions about vi and
(hopefully) have them answered, I hereby dedicate this item to
those of us who are new to vi or still learning as they go.

In fact, come to think of it, I've got a few questions:

24 responses total.



#1 of 24 by carl on Wed Feb 17 22:15:11 1993:

Is there a spell checker on this system?  If so, how can I use it?
Is it accessible from within vi?


#2 of 24 by kentn on Wed Feb 17 22:53:33 1993:

What would account for the ESC key working on some systems as a swithc
between command and insert modes in vi, and totally failing to work on
other systems (so that I have to use ctrl-c)?
  (I don't recall changing anything about the terminal or the comm
program that would cause this.)


#3 of 24 by davel on Thu Feb 18 01:46:02 1993:

Carl, for basic information on the spell checker, try man spell from a shell
prompt (or !man spell  from Picospan).  Its default behavior is, I believe,
to check words read from the standard input or named files, check them against
its list, and regurgitate the ones it doesn't like.

I think I know how to use it from vi in a kludgy way, but I'm sure there's
a real way, & I trust someone who really knows will jump in.


#4 of 24 by power on Thu Feb 18 23:49:14 1993:

   Carl: not to start an editor war, but have you tried using Jove?  It's
much easier to use, at least IMHO... And it can be fairly easily configured
to run almost as if it were an editor actually running on your Laser!
do a 'cp /u/power/.joverc /u/carl/.joverc' and fire up Jove to give it a
try....


#5 of 24 by carl on Fri Feb 19 12:10:30 1993:

re #2:  with my program, I have to use open-apple-ESC to send an ESC
to the host.  Just using ESC takes me to the menu of the term software.
Is your term doing something like that?


#6 of 24 by carl on Fri Feb 19 12:11:55 1993:

re #3  Thanks!  I'll give it a try.


#7 of 24 by carl on Fri Feb 19 12:16:32 1993:

re #5:  Hmm.  Jove does sound interesting--just when vi is beginning to
make sense.  Russ, do you think you could give a short description of
it, including how to get help?  (It could have it's own item, since this
is about vi ;-)


#8 of 24 by carl on Fri Feb 19 12:20:21 1993:

Okay, one for the vi gurus:

is there a way to get in "overstrike" mode?  That's when what I type
replaces what's already there.  I know that "r" allows one character
to be typed over--I'm just hoping there's a way to do that without
pushing "r" before each character...


#9 of 24 by danr on Fri Feb 19 12:47:01 1993:

Well, you can sort of do this.  The command "ncw" will allow you to
change n number of words.  The string can be longer or shorter than
the words you replace.  When you hit the ESC key, the text will be
adjusted accordingly.


#10 of 24 by remmers on Fri Feb 19 13:09:10 1993:

Re #2:  Hmm, puzzling.  One possibility is that on some systems
you have a .exrc file (vi initialization file) that maps ESC to
some other function.  If it's not your comm program that's doing
it, I can't think of any other explanation.  On every vi I've ever
use, ESC takes one from insert mode to command mode.

Re #8, #9:  Actually, there is an explicit overstrike-mode
command: "R" (upper case) will do it.


#11 of 24 by danr on Fri Feb 19 17:17:30 1993:

I like the "cw" commnd, though.  That way you can control exactly
how much you want to replace.


#12 of 24 by davel on Fri Feb 19 21:44:26 1993:

I like cw when in many cases, & use it much more often than R.  But it can
be a pain when there are more than a few words or when there are punctuation
marks (which tend to get counted as 1 word each).


#13 of 24 by power on Sat Feb 20 00:07:11 1993:

  To get help with Jove, type 'teachjove' at a command prompt (before copying
my .joverc to your directory, that will change the key bindings around, so,
for example, your arrow keys work like arrows.  This is very nice, but can
get in the way when the tutorial doesn't know about it and tells you to
press something :) )....


#14 of 24 by carl on Sat Feb 20 11:39:33 1993:

One more question.  What is the Yank command?  I've got a list of to
yank a character, a line, a paragraph; but don't know what that means.


#15 of 24 by davel on Sat Feb 20 12:04:13 1993:

It puts a copy of the specified text into a buffer; then you can move the
cursor somewhere else & use the   put   commands to put it there.  By default
yank and deleting use the same buffer, so you want to move & do your put
right away, before you overwrite your buffer without noticing it.  (I.e.,
don't stop & change something else you happen to notice.)  And each time you
issue a yank or delete command you're clearing the buffer; if you delete a
word with   dw  , you get the word in the buffer, but if you delete it one
character at a time (with   xxxxx   if it's a 5-letter word) the buffer will
contain the last-deleted single character.  So form the habit of determining
how much you want to delete (or yank) and doing it in one swell foop.

As far as put goes, I believe P puts the buffer's contents before the
cursor, p puts them after the cursor; if you've yanked or deleted a whole
line the a line will be inserted before or after your entire current line,
not in the middle where your cursor happens to be.  (Or however many lines
you've yanked or deleted in one operation.)  If you've done something like
5dw  & deleted 5 words, p will get you those 5 words immediately after your
cursor position.  (Somebody let me know if I'm wrong, OK?)

There's a way to use more buffers, but I never can remember it when I need
it, so I never use it enough to remember it.  <sigh>
I'm sure someone else will tell me now, though, right?


#16 of 24 by remmers on Sat Feb 20 14:12:52 1993:

I would if I could remember it, but I never use it enough to remember it. :)
(But I can look it up, so you may see something later...)

Re #12:  If you type cW instead of cw, vi will treat each block of
non-blank characters as a word, & thus lump a word together with
adjoining punctuation.


#17 of 24 by davel on Sat Feb 20 22:28:59 1993:

Thanks!  There are *lots* of times that would help.


#18 of 24 by carl on Sun Feb 21 13:32:49 1993:

Thanks for the info!

Next question...(gee, I'm full of them.  ;-)

Are there different versions or pathnames to vi?  I just noticed that when 
I changed my shell from bbs to sh, I lost my erase character.  Everything
else works the same, except for my favorite key to unbotch a mistake.

Oh, and while I'm at it, is there a way to "automatically" add linefeeds
to a long text file, so that a don't get a "line too long" error when
trying to edit the file?


#19 of 24 by carl on Sun Feb 21 14:11:50 1993:

I answered my own question about the erase key.  When I discovered it
didn't work outside of vi, it occured to me that I might need an
"stty erase ^?" in the .profile.  That's all it needed.


#20 of 24 by remmers on Sun Feb 21 16:39:37 1993:

Re #18, last paragraph:  Not sure if this would work, but you could
try running the file through the formatter program 'fmt':

     fmt < oldfile > newfile

where 'oldfile' is the file containing the long lines.  (Should work
unless fmt itself has a limitation on how long the input lines can be.)


#21 of 24 by popcorn on Sun Feb 21 17:40:11 1993:

This response has been erased.



#22 of 24 by popcorn on Sun Feb 21 17:44:15 1993:

This response has been erased.



#23 of 24 by tsty on Tue Feb 23 03:28:17 1993:

no error here, terminal is too dumb to make errors .........


#24 of 24 by cicero on Tue Apr 19 06:28:56 1994:

r 21

Response not possible - You must register and login before posting.

No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss