Skip to content

Open file again in current split instead of switching to existing split #1444

@dexgs

Description

@dexgs

I often like to use a split view in vim to view multiple regions of the same file at once. Sometimes I switch one of the splits to a different file. I would like to use nerdtree to switch back to the same file, but when I select a file in nerdtree that is already open in another split, it simply focuses that split instead of opening the file in the split I was last using.

What is currently happening:

  • I Open 2 splits ("split 1" and "split 2")
  • I Open the same file ("file A") in both splits
  • I Open a different file ("file B") in "split 2"
  • I select "file A" in nerdtree after focusing "split 2"
  • "split 1" (which still has "file A" open) is focused, "split 2" still shows "file B"

What I would like to happen:
After I select "file A" in nerdtree, I would like it to open in "split 2" instead of focusing "split 1"

Is there any configuration option to make nerdtree behave this way?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions