[lug] Few vi problems
S. Luke Jones
luke at frii.com
Tue Mar 27 06:52:48 MST 2001
John Starkey wrote:
> I need to yank x chars from some code. yw isn't gonna work because of
> the chars. Optimally I'd like to be able to grab:
>
> <td bgcolor=" <.?php $bgcolor ?> ">
> ^ ^
> The spaces between the carrots is what i need to yank and paste.
In the specific example you could go to the 1st caret (via ^f2g)
and then do y$ to get everything left on the line but it isn't
as cool as using the 'f' movement command:
go to the last caret and do yFg (yank to the backwards-searched-first
'g'). ('f' = forward search, 'F' = backwards search, f by itself means
first, but 7f or 3F mean 7th forward or 3rd in reverse as usual.) f/F
and the similar 't/T' commands are one of the coolest things this
convert to vi has come across. In my 20 years using emacs I would have
done a zillion ^F's instead, aggravating my carpal tunnel syndrome
further with every keypress.
> The next question: I'm on a remote FreeBSD virtual server. I've tried
> every .* file I could think of (.vimrc, .virc, .exrc) and couldn't get
> it to load in my vimrc. Is there a way to specify the rc file path in
> vi? And on a related note, is there a way to specify the syntax file
> path?
I don't use *BSD but you might try using the VIM and/or VIMRUNTIME
environment variables. Do :help VIMRUNTIME
--
Luke Jones = luke/vortex/frii/fullstop/com
More information about the LUG
mailing list