yep, that helps,
just did the map, exactly what i was looking for, thanks
shawn
On 5/4/07, Tim Chase <[EMAIL PROTECTED]> wrote:
> i really dig the zz function to get me in the middle of the screen.
> i was wondering if there were an insert mode ability to do the same thing.
> So if i am writing a long function and get to the bottom of the screen
> i can move where i am at to the middle of the screen while still in
> insert mode?
You can use control+o (that's an "oh" not a "zero") followed by
zz which will enter normal-mode for one command (your "zz") and
then return you to where you were in insert mode. I do exactly
this on a regular basis. I started with the old-school "z." (in
original vi) instead of "zz" (a vim extension) and was irked that
it didn't keep my position...until I learned of zz. I now
regularly use zz/zt/zb instead of the old z./z<enter>/z- commands.
The above can be mapped if you do it often enough to warrant a
single keypress...something like
:inoremap <f4> <c-o>zz
If you want to read about this "temporary normal mode", you can
read the scant details at
:help i_ctrl-o
HTH,
-tim