Vim logo vim online Vim Book Ad

basic Tip #281: Stateful zz

 tip karma   Rating 10/4, Viewed by 871 

created:   July 11, 2002 11:51      complexity:   basic
author:   Bob van Manen      as of Vim:   5.7

Do you find yourself hitting 'zz' all the time in order to see some context of what you're
currently working on? If so, then this tip might be for you. If you add the following line
in your vimrc, you can toggle zz mode by pressing <Leader>zz.

" maintain a constant zz state, second call will toggle it back off
map <Leader>zz :let &scrolloff;=999-&scrolloff;<CR>



 rate this tip  Life Changing Helpful Unfulfilling 

<<Integration with PyUnit testing framework | Folding with Regular Expression >>

Additional Notes

feline, July 12, 2002 2:46
try
:help scrolloff

with this you can always have some context when scrolling through files.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
SourceForge Logo