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

> > 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)
> 
> Generally, folks would get fired for writing stunts like the 
> following, so read with caution...
> 
> Archived here:
> http://permalink.gmane.org/gmane.editors.vim/38930
> 
> you'll find these two lines from my post:
> 
> nnoremap / :exec('cnoremap <'.'cr> <'.'cr>:exec("cunmap 
> <"."cr>")<'.'cr>:call HighlightCurrentSearch()<'.'cr>')<cr>/
> 
> nnoremap ? :exec('cnoremap <'.'cr> <'.'cr>:exec("cunmap 
> <"."cr>")<'.'cr>:call HighlightCurrentSearch()<'.'cr>')<cr>?
> 
> They are hideous monstrosities, that don't quite do all that I
> described in my previous post. The basic gist is that you want to
> remap the "/" and "?" keys so that when you press them, you
> create a cnoremap mapping that maps the <cr> (and, unimplemented
> in this example, also <esc> and <c-c>) to perform the action
> "cunmap the <cr> mapping, and then do my custom action".
> 
> In this case, the custom action was to call the
> HighlightCurrentSearch() function defined in the post, as desired
> by the OP.  In your case, you'd want to tweak it to do a "zz"
> instead.
> 
> Caveat Vimtor...if it breaks, you get to keep both pieces.  If it
> kicks your dog, drinks your beer, steals your girlfriend, wrecks 
> your pickup-truck, or any other tragedy found in country-music, I 
> take no responsibility...it's an ugly hack.  YMMV.
> 
> -tim

Hi Tim,

 thanks a lot for the secrets ! :)))

 I really enjoyed reading your mail -- not only for the vimy stuff but
 also for the words as such... :O)

 Keep hacking !
              ^
              !
 mcc


Reply via email to