-
Notifications
You must be signed in to change notification settings - Fork 258
Tips
Kerem Bozdas edited this page Apr 8, 2022
·
5 revisions
This page is for smaller "tips and tricks" that users want to share with others. This is where to put information that, while technically documented, you feel is not obvious and should be highlighted for others to find.
Discussion #249 answered by @cseickel
["<tab>"] = function(state)
state.commands["open"](state)
vim.cmd("Neotree reveal")
end,
Discussion #163 answered by @bennypowers
["h"] = function(state)
local node = state.tree:get_node()
if node.type == 'directory' and node:is_expanded() then
require'neo-tree.sources.filesystem'.toggle_directory(state, node)
else
require'neo-tree.ui.renderer'.focus_node(state, node:get_parent_id())
end
end,
["l"] = function(state)
local node = state.tree:get_node()
if node.type == 'directory' then
if not node:is_expanded() then
require'neo-tree.sources.filesystem'.toggle_directory(state, node)
elseif node:has_children() then
require'neo-tree.ui.renderer'.focus_node(state, node:get_child_ids()[1])
end
end
end,