sponsor Vim development Vim logo Vim Book Ad

StickyCursor : remembers the cursor position relative to the window

 script karma  Rating 18/6, Downloaded by 752  Comments, bugs, improvements  Vim wiki

created by
Sply Splyeff
 
script type
utility
 
description
The default vim behavour when switching to an open buffer is to scroll the window so the cursor will be positioned at the window's center.

This script remembers the cursor position relative to the window for every visited buffer and restores it (makes proper scrolling) when switched back to the buffer.

For more pleasure you can ":set nostartofline" option.
 
install details
just place to the plugin directory
 

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
stickycursor.vim 1.1 2007-01-14 6.0 Sply Splyeff If the cursor moved after we leaved a buffer, don't try to restore in-window position.
stickycursor.vim 1 2006-03-04 6.0 Sply Splyeff Initial upload
ip used for rating: 3.133.120.10

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