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




Reply via email to