Keep Focus On Tree After Opening File #1591
austinliuigi
started this conversation in
Show and tell
Replies: 1 comment
-
You can use the API to edit the file and then focus the tree. See function(node)
local nt_api = require("nvim-tree.api")
nt_api.node.open.edit(node)
nt_api.tree.focus()
end This isn't necessary as a feature as everything is present in the API. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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 forvsplit
,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:
Beta Was this translation helpful? Give feedback.
All reactions