Skip to content

Add option to make cursor fixed relative to text and not to screen #5116

@yousef8192

Description

@yousef8192

In tmux copy mode if you set keybinds to scroll using "scroll-up" or "scroll-down" what happens when you scroll is that the cursor position is fixed relative to the screen. However in vim the behavior is that the cursor position is fixed relative to the text itself. I hope the demonstration below makes it more clear.

Tmux
Image

Vim
Image

Furthermore, having scroll behavior as described in this issue implies an important yet simple option to be added too to make the experience similar to vim. This option is called "scrolloff" and it determines how many lines the cursor should be away from the top/bottom end of the screen during scrolling. For example if scrolloff is set to 5 then there must be at least 5 lines between the cursor and the top/bottom end when scrolling as follows:
Image

Tmux is one of my favorite tools and I use it daily. This option makes the experience be consistent for people like me who use vim or in general are used to scrolling with the behavior described above so without this option it is becomes very uncomfortable to have different scrolling mechanisms to get used to simultaneously. I opened an issue similar to this earlier with an assumption that vim motions are familiar but apparently more clarification was needed so sorry for the inconvenience. If there are any further clarifications needed please do let me know. Thanks a lot for your time and effort!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions