From: Tim Chase <[EMAIL PROTECTED]>
Subject: Re: glued Cursor trick anyone ?
Date: Thu, 21 Sep 2006 05:35:54 -0500

> > So "nzz" and "Nzz" is more what I want than to "solder" the
> > cursor onto the screen "forever and ever" with "set
> > scrolloff=1000". Ah, by the way: The initial /<pattern> still
> > jumps to a place whereever it wants to. Is there also a neat
> > trick to "zz" the "/" ("Are you talking vim?", hihihihi ).
> 
> 
> Well, though it's a horrible hack, you could do something like
> 
>       :cnoremap <cr> <cr>zz
> 
> which will center the line after *every* ex command...not 
> necessarily a bad thing, just an odd thing.
> 
> To make it selective for only searches may take a lot more work 
> (I'm not on vim7 at home yet, and vim7 might have a mapping 
> specific to searching, rather than applying to all 
> command-lines).  I've done them before, where pressing "/" or "?" 
> creates a pair of command-mode mappings, one that maps <cr> to do 
> what I want, as well as then unmap the <cr>; the other mappings 
> dealing with <c-c> and <esc> which would cancel the command-line 
> mode, and thus need to unmap the <cr> as well.  It's a horribly 
> ugly and opaque hack, and I might be able to dig up a previous 
> post from the list archives that demonstrates some of this. 
> However, I'd avoid it if not absolutely necessary.
> 
> Just my 0.02 of local currency.
> 
> -tim

Hi Tim,

 thank you very much for your reply.

 If it is not too much effort to you I would like to know these "bad
 hacks" -- just to learn a little more about "hacking vim" and not
 necessaryly (ough, this world looks also very "hackish"...german
 English....)  to make them the base of all my later VIMy programming.

 Generally I think one can learn a lot about using technique in 
 ways, no one else has thought about before..... ;O)

 Thanks a lot for your help, Tim ! :)))

 Keep hacking! (YES!)
 mcc

Reply via email to