Skip to content

Commit

Permalink
feat(options): update scrolloff (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
n3wborn authored Jun 10, 2024
1 parent 074277c commit a353752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lua/custom/autocommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ vim.api.nvim_create_autocmd('VimLeavePre', {
vim.api.nvim_create_autocmd({ 'BufEnter', 'WinEnter', 'WinNew', 'VimResized' }, {
group = vim.api.nvim_create_augroup('VCenterCursor', { clear = true }),
pattern = { '*', '*.*' },
command = 'let &scrolloff=(winheight(win_getid())/2) + 1',
callback = function()
vim.o.scrolloff = 999
end,
})

vim.opt.updatetime = 100
2 changes: 0 additions & 2 deletions lua/custom/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ vim.opt.shortmess = 'filnxtToOFWIcC'
vim.opt.hidden = true
vim.opt.ignorecase = true
vim.opt.joinspaces = false
vim.opt.scrolloff = 8
vim.opt.sidescrolloff = 8
vim.opt.shiftround = true
vim.opt.smartcase = true
vim.opt.splitbelow = true
Expand Down

0 comments on commit a353752

Please sign in to comment.