sponsor Vim development Vim logo Vim Book Ad

browser-like-scrolling-for-readonly-file : convenient, browser-like scrolling for viewing readonly files

 script karma  Rating 6/4, Downloaded by 1514  Comments, bugs, improvements  Vim wiki

created by
Yakov Lerner
 
script type
utility
 
description
If, when viewing readonly files in vim, you wish that up/down arrows behaved like in web browser (each down arrow scrolls the view 1 line down, except near end of file; each arrow-up scrolls the view 1 line up, except near beginning of file)
-- then this plugin does it.

To check the difference, just source the script (':so ro_positioning.vim' if not installed) and try the help (:he) and
try arrows down. You'll notice that up/down arrows behave more conveniently.

This plugin remaps arrow-up and arrow-down in readonly files to behave more conveniently. No remappings are done for non-readonly files.

If you want to enable this mode for arbitrary writable file, do:
     :set ro
     :e
 
install details
Just copy the included file (ro_positioning.vim) into either personal plugin directory (~/.vim/plugin/.), or into global plugin directory ($VIMRUNTIME/plugin/.)

To copy into the personal plugin directory:

  mkdir -p ~/.vim/plugin; cp ro_positioning.vim ~/.vim/plugin/.

To copy into the global plugin directory:

  cp ro_positioning.vim $VIMRUNTIME/plugin/.

Parameters: no parameters.

Commands and keys: arrow up, arrow down
 

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
ro_positioning.vim 1.1 2003-07-24 6.0 Yakov Lerner fixed switch to/from readonly windows
ro_positioning.vim 1.0 2003-07-22 6.0 Yakov Lerner Initial upload
ip used for rating: 142.132.191.50

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