@@ -165,6 +165,12 @@ Show the mappings: `g?`
165165`Y` Copy Relative Path | nvim_tree.api.fs.copy.relative_path() |
166166`<2-LeftMouse> ` Open | nvim_tree.api.node.open.edit() |
167167`<2-RightMouse> ` CD | nvim_tree.api.tree.change_root_to_node() |
168+
169+ `m ` Toggle Bookmark | nvim_tree.api.marks.toggle_visual() |
170+ `d ` Delete | nvim_tree.api.fs.remove_visual() |
171+ `D` Trash | nvim_tree.api.fs.trash_visual() |
172+ `c ` Copy | nvim_tree.api.fs.copy.visual() |
173+ `x ` Cut | nvim_tree.api.fs.cut_visual() |
168174
169175==============================================================================
170176Quickstart: Custom Mappings *nvim-tree-quickstart-custom-mappings*
@@ -458,6 +464,12 @@ You are encouraged to copy these to your {on_attach} function. >lua
458464 vim.keymap.set("n", "Y", api.fs.copy.relative_path, opts("Copy Relative Path"))
459465 vim.keymap.set("n", "<2-LeftMouse> ", api.node.open.edit, opts("Open"))
460466 vim.keymap.set("n", "<2-RightMouse> ", api.tree.change_root_to_node, opts("CD"))
467+
468+ vim.keymap.set("x", "m", api.marks.toggle_visual, opts("Toggle Bookmark"))
469+ vim.keymap.set("x", "d", api.fs.remove_visual, opts("Delete"))
470+ vim.keymap.set("x", "D", api.fs.trash_visual, opts("Trash"))
471+ vim.keymap.set("x", "c", api.fs.copy.visual, opts("Copy"))
472+ vim.keymap.set("x", "x", api.fs.cut_visual, opts("Cut"))
461473 -- END_ON_ATTACH_DEFAULT
462474<
463475Alternatively, you may apply these default mappings from your
@@ -2461,6 +2473,9 @@ copy.relative_path({node}) *nvim_tree.api.fs.copy.relative_path()*
24612473 Parameters: ~
24622474 • {node} (`nvim_tree.api.Node?` )
24632475
2476+ copy.visual() *nvim_tree.api.fs.copy.visual()*
2477+ Copy all visually selected nodes to the nvim-tree clipboard.
2478+
24642479create({node} ) *nvim_tree.api.fs.create()*
24652480 Prompt to create a file or directory.
24662481
@@ -2479,6 +2494,9 @@ cut({node}) *nvim_tree.api.fs.cut()*
24792494 Parameters: ~
24802495 • {node} (`nvim_tree.api.Node?` )
24812496
2497+ cut_visual() *nvim_tree.api.fs.cut_visual()*
2498+ Cut all visually selected nodes to the nvim-tree clipboard.
2499+
24822500paste({node} ) *nvim_tree.api.fs.paste()*
24832501 Paste from the nvim-tree clipboard.
24842502
@@ -2496,6 +2514,9 @@ remove({node}) *nvim_tree.api.fs.remove()*
24962514 Parameters: ~
24972515 • {node} (`nvim_tree.api.Node?` )
24982516
2517+ remove_visual() *nvim_tree.api.fs.remove_visual()*
2518+ Delete all visually selected nodes, prompting once.
2519+
24992520rename({node} ) *nvim_tree.api.fs.rename()*
25002521 Prompt to rename by name.
25012522
@@ -2532,6 +2553,9 @@ trash({node}) *nvim_tree.api.fs.trash()*
25322553 Parameters: ~
25332554 • {node} (`nvim_tree.api.Node?` )
25342555
2556+ trash_visual() *nvim_tree.api.fs.trash_visual()*
2557+ Trash all visually selected nodes, prompting once.
2558+
25352559
25362560==============================================================================
25372561API: git *nvim-tree-api-git*
@@ -2609,6 +2633,9 @@ toggle({node}) *nvim_tree.api.marks.toggle()*
26092633 Parameters: ~
26102634 • {node} (`nvim_tree.api.Node?` ) file or directory
26112635
2636+ toggle_visual() *nvim_tree.api.marks.toggle_visual()*
2637+ Toggle mark on all visually selected nodes.
2638+
26122639
26132640==============================================================================
26142641API: node *nvim-tree-api-node*
0 commit comments