On Fri, Mar 20, 1998 at 07:09:19PM -0500, Scott McDermott wrote:
> Paul F Almquist <[EMAIL PROTECTED]> on Fri, Mar 20, 1998 at 08:39:11AM
>-0600:
> > set -o vi
> >
> > you can also use / N & n to search the command history
>
> What sucks is that you can't `/' the current command line, but must move
> with `w' or the char-wise movements.
within a line use the "fx" where "x" is the character to find going forward
(to the right) from the current cursor location
fa finds the next occurence of "a" on the current line
within a line use the "Fx" where "x" is the character to find going backward
(to the left) from the current cursor location
use ";" to repeat the find in the starting direction
user "," to repeat the find in the opposite direction
both F and f may be preceded with a repeat count.
there is also a "t" and "T", similar to "f" and "F" but stops one character
short of the target character.
think: f = find, t = toward
f ; and , are analogous to / n and N
F is analogous to ?
the search target is saved until another find is done so you can
do a find on a line, make a change (e.g. replace one character (r))
go to another line repeat the find with ";" and repeat the change
with ".". I do this frequently. a real time saver.
paul
--
/-------------------\\ //---------------------------/
/ C h i p p e w a \\ // alley Technical College /
/ 620 W. Clairemont Ave \// Eau Claire, WI 54701 USA /
/-----------------------------------------------------/
/ Paul F. Almquist, Instructor - DBMS,OS,Networking /
/ Computer Information Systems Dept HP-UX/Linux!! /
/ [EMAIL PROTECTED] Voice:715-833-6386 /
/ http://cis.chippewa.tec.wi.us/~almquipf /
/-----------------------------------------------------/
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.