[lug] Few vi problems

Sean Reifschneider jafo at tummy.com
Tue Mar 27 02:50:48 MST 2001


On Tue, Mar 27, 2001 at 01:00:02AM -0700, 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 ?> ">
>                       ^                            ^

You need to yank from the "g" to something way past the end of line?
You can use yank by putting your cursor on one of the positions and using
movement keys to specify the endpoint.  If you have:

   <td bgcolor=" <.?php $bgcolor ?> ">
                 ^                ^

and your cursor is on the first carat, you can do:

   y18<space>
   yf>
   y6w

You get the idea...

>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

Maybe it's not using vim?  "vim -u ~/.vimrc" should do the trick if it's
vim, but being as how it's FreeBSD it's likely that it's using Berkeley nvi
instead.

Sean
-- 
 Brooks's Law of Prototypes: Plan to throw one away, you will anyhow.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the LUG mailing list