Open file without lost nvimtree focus #2505
Answered
by
alex-courtis
sajadspeed
asked this question in
Q&A
-
I want to open a file without focusing on it. |
Beta Was this translation helpful? Give feedback.
Answered by
alex-courtis
Nov 5, 2023
Replies: 1 comment 1 reply
-
Try this custom mapped function. It will behave a bit like preview: local function nt_open_no_focus()
api.node.open.edit()
api.tree.focus()
end In your vim.keymap.set("n", "N", nt_open_no_focus, opts("Open: No Focus")) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sajadspeed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this custom mapped function. It will behave a bit like preview:
In your
on_attach
: