sponsor Vim development Vim logo Vim Book Ad

halfmove : Move the cursor half way up or down the screen

 script karma  Rating 0/0, Downloaded by 454  Comments, bugs, improvements  Vim wiki

created by
Andy Spencer
 
script type
utility
 
description
Vim script to move the cursor half way down/up the screen. This can be
thought of as a binary search for a line that is visible in the window by
either moving up or down.

Created: 2007 Aug 05
Last Change: 2007 Aug 05
Author: Andy Spencer <andy753421 at gmail dot com>
Thanks To: #vim@irc.freenode.net

Usage:
  Press <C-K> to jump half way to the top of the screen
  Press <C-J> to jump half way to the bottom of the screen
  Pressing <C-[KJ]> several times in a row will jump halfway to the
  top/bottom or half way to a previous jump location.
  Example: To jump 3/8 of the way to the bottom of the screen press
    <C-J><C-K><C-J>
  
Customization:
  map <silent> <YOUR-DOWN-KEY> :call HM_Move("down")<CR>
  map <silent> <YOUR-UP-KEY>   :call HM_Move("up")<CR>

Problems:
  <C-J> and <C-K> will not be mapped over existing mappings. If other
  scripts map <C-J> or <C-K> then you will need to manually override those.
 
install details
Add this file to $RUNTIME/plugins
 

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
halfmove.vim 1.0 2007-08-04 7.0 Andy Spencer Initial upload
ip used for rating: 3.138.105.31

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