Skip to content

Keep Focus On Tree After Opening File #1589

@austinliuigi

Description

@austinliuigi

Is your feature request related to a problem? Please describe.

I personally find it unintuitive for the cursor to jump to a file after opening it in the tree.

Describe the solution you'd like

A setting to keep the focus on the tree after opening a file via actions such as edit, vsplit, split, etc.

or

Separate actions similar to preview, but for vsplit, split, etc.

Describe alternatives you've considered

I have implemented a simple action_cb to focus on NvimTree after opening a file, but I'm not sure how to implement the window picker that the default actions have.

For example:

function(node)
  vim.cmd("vsplit" .. node.absolute_path .. " | wincmd L | NvimTreeFocus")
end

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