Skip to content

Add support for gg/G #23

Open
Open
@ouuan

Description

@ouuan

I added these in my config:

t['gg']    = {'scroll', {'1 - vim.api.nvim_win_get_cursor(0)[1]', 'true', '1', '5', e}}
t['G']     = {'scroll', {'vim.api.nvim_buf_line_count(0) - vim.api.nvim_win_get_cursor(0)[1]', 'true', '1', '5', e}}

And it turns out that it doesn't work well when there are wrapped lines, because neoscroll uses gj and gk, which is good for other commands like <c-u>/<c-d> but bad for gg and G.

Or is there any way to get the display line number? I didn't find it in help or online.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions