sponsor Vim development Vim logo Vim Book Ad

hlcontext.vim : based on VIMTIP#548: Using H and L keys as context sensitive pagedown/pageup

 script karma  Rating -1/3, Downloaded by 1149  Comments, bugs, improvements  Vim wiki

created by
Robert KellyIV
 
script type
utility
 
description
This is based on VIMTIP #548: Using H and L keys as context sensitive pagedown/pageup by Usman Latif (original tip) and johann-guenter.simon's scrolloff fix/tip

All I have done is stuff the above in a script and add <plug> and (possible) a little clean up. Original tip is included in script file.

In short this makes H and L context sensitive; If H is invoked when cursor is not at the top of the window it will be placed at the top of the window, if it is at the top of the window <pageup> and keep cursor at top of window. Same idea for L (save go down)

If you like you can remap <plug>HLContextPlug_H and <plug>HLContextPlug_L to different keys

Comments and whatnot welcome of course.
 
install details
Drop in plugin directory, i.e. "~/.vim/plugin/"
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
hlcontext.vim 0.1 2003-09-08 6.0 Robert KellyIV Initial upload
ip used for rating: 18.97.9.175

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 the maillist. Help Bram help Uganda.
   
Vim at Github