130

GitHub - drzel/vim-scroll-off-fraction: Scroll off as a fraction of window heigh...

 6 years ago
source link: https://github.com/drzel/vim-scroll-off-fraction
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

vim-scrolloff-fraction

scrolloff as a fraction of window height.

I don't like my cursor line getting too close to the top or the bottom of the screen. But I also don't like it being an absolutely fixed number of lines, given varying window heights, especially when splitting horizontally. This plugin allows you to set scrolloff to a fraction of the total window height.

Installation

Install with a plugin manager.

Usage

By default scrolloff will be set to 25% of the active window height. You can change it with:

let g:scrolloff_fraction = 0.25

By default quickfix windows use an absolute scrolloff value of 0. You can set an absolute scrolloff value for certain filetypes:

let g:scrolloff_absolute_filetypes = ['qf']
let g:scrolloff_absolute_value = 0

See :help 'scrolloff' for more information.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK