Skip to content

Window behavior with vertical split #476

@haoming-li-ling

Description

@haoming-li-ling

If I toggle Neotree in a tab with a vertical split, the following happens:

  1. If I issue the toggle command in the left window, the Neotree window opens in on the left, leaving the right window size unchanged. If I then toggle the Neotree window closed, the cursor goes to the left window.
  2. If I issue the toggle command in the right window, the Neotree window opens in a vsplit on the left, leaving the right window size unchanged. If I then toggle the Neotree window closed, the cursor goes to the left window, instead of the right window (where the toggle command was initially issued).

I think the following behaviors (in fact, default behaviors of nvim-tree.lua) would be better:

  1. Adjust the size of both the windows on the left and on the right when a Neotree window is opened, so they retain their original proportions (windows of equal size remain equal in size with a Neotree window open)
  2. Return the cursor to the window where the toggle command is issued when a Neotree window closes, instead of always to the window on the left

If these behaviors are already available from the configurations, it would be best if someone can show me how.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions