-
I want to open a bunch of files from the sidebar without losing focus. Something like this: mappings = {
["<Tab>"] = "open_nofocus",
} I read the docs but could not find something equivalent. Use case:Opening 3 adjacent files from sidebar. Expected OutcomeI'm hovering over a file and I want to open it along with the 2 files below it in the sidebar. tabj I opened 2 files without losing focus and jumped to the third one. Current Stateenterleader0 Note: leader0 is set to |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
The easiest way to do that is to create a custom mapping to your own function that calls a built-in open command, then toggles back to the tree: require("neo-tree").setup({
window = {
mappings = {
["O"] = function (state)
state.commands["open"](state)
vim.cmd("Neotree reveal")
end,
... |
Beta Was this translation helpful? Give feedback.
-
This is such a common use-case it might be default behavior IMHO. I switched from Another such feature is Navigation with HJKL. I was so happy when I found this one because it was how I expected the tree to behave. With these two, Thank you for the great plugin @cseickel! ❤️ |
Beta Was this translation helpful? Give feedback.
-
Updated Tips page so it's easier to find these. |
Beta Was this translation helpful? Give feedback.
-
I got an error everytime that I tried to use the tab key to open the files, for some reason it worked after I removed the This is the code that works for me, like I said, only removed one word but if someone wants to copy and paste it, here it is. ["<tab>"] = function(state)
state.commands["open"](state)
vim.cmd("Neotree")
end, Sidenote: The error only occurs when using |
Beta Was this translation helpful? Give feedback.
The easiest way to do that is to create a custom mapping to your own function that calls a built-in open command, then toggles back to the tree: