-
Notifications
You must be signed in to change notification settings - Fork 251
Is there expand_all_subnodes? #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
there is one in the wiki under https://github.com/nvim-neo-tree/neo-tree.nvim/wiki/Recipes#emulating-vims-fold-commands |
Hi, @ghostbuster91 suggested solution didn't work exactly as intended for me. I had keep pressing the corresponding key to expand the node one extra level each time while I wanted all the sub directories to be expanded at once. Looking into the code to debug it I found that the implementation already exists. Here is my solution for those coming around here before this makes its way into the plugin: local function open_all_subnodes(state)
local node = state.tree:get_node()
local filesystem_commands = require("neo-tree.sources.filesystem.commands")
filesystem_commands.expand_all_nodes(state, node)
end
require("neo-tree").setup({
window = {
mappings = {
["O"] = open_all_subnodes,
},
},
}) |
@paulroseau Sorry, I forgot to follow up here. Yes that solution got broken at some point. I then fixed it in #957 |
I have seen the built-in action
close_all_subnodes
, but theexpand_all_subnodes
seems to be missing. How can we expand one directory recursively?The text was updated successfully, but these errors were encountered: