pub fn create_autocmd()Expand description
Creates an autocmd to update scrolloff on window events.
Registers autocmds for BufEnter, WinEnter, WinNew, and VimResized events
to recalculate and set the ‘scrolloff’ option dynamically.
§Rationale
Ensures scrolloff remains proportional to the visible window height, improving navigation UX by keeping context lines consistent relative to screen size.