Skip to content

Scroll past the end of file just like scrolloff option

License

Notifications You must be signed in to change notification settings

Aasim-A/scrollEOF.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

scrollEOF.nvim

A simple and lightweight plugin to make scrolloff go past the end of the file. It uses the value of scrolloff to determine the amount of blank space to mimic the behaviour of scrolloff.

scrollEOF-demo.mp4

Getting started

Install

Using lazy

{
  'Aasim-A/scrollEOF.nvim',
  event = { 'CursorMoved', 'WinScrolled' },
  opts = {},
}

Using packer:

use('Aasim-A/scrollEOF.nvim')

Using vim-plug:

Plug 'Aasim-A/scrollEOF.nvim'

Setup

Quick start

Make sure that you set the scrolloff setting then add the following line to your Neovim config:

Lua:

require('scrollEOF').setup()

Vimscript:

lua require('scrollEOF').setup()

Settings

These are the default settings. Any changes can be made in the call to setup.

-- Default settings
require('scrollEOF').setup({
  -- The pattern used for the internal autocmd to determine
  -- where to run scrollEOF. See https://neovim.io/doc/user/autocmd.html#autocmd-pattern
  pattern = '*'
  -- Whether or not scrollEOF should be enabled in insert mode
  insert_mode = false,
  -- Whether or not scrollEOF should be enabled in floating windows
  floating = true,
  -- List of filetypes to disable scrollEOF for.
  disabled_filetypes = {},
  -- List of modes to disable scrollEOF for. see https://neovim.io/doc/user/builtin.html#mode()
  disabled_modes = {},
})

About

Scroll past the end of file just like scrolloff option

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages