Skip to content

tabnew should focus existing tab if file already opened #1687

Closed
@thanhtran-ct

Description

@thanhtran-ct

Currently, every time I execute tabnew on a file node, nvim will open a new tab regardless that file is already opened in another tab. I think it's likely a mistake that user open a file which is already opened and NVimTree should gracefully switch to the tab opening that file.

To avoid disruptive behavior, I think it can be done like NERDTree in which an additional option like 'reuse': 'all' can be supplemented to the mappings config.

With this additional option, users not only apply for tabnew but can choose to apply for open action as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR pleasenvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatedQOLQuality Of Life Improvementfeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions