File tree Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -774,4 +774,35 @@ on_folder_removed({handler})
774
774
{handler} (function) Handler function, with the
775
775
signature `function (payload)` .
776
776
777
+ ==============================================================================
778
+ MARKS *nvim-tree-marks*
779
+
780
+ | nvim-tree.marks | *nvim-tree.marks*
781
+
782
+ You can toggle marks on file/folders to batch a function on multiple
783
+ nodes with the `marks ` module.
784
+
785
+ >
786
+ local nvim_tree_marks = require "nvim-tree.marks"
787
+ local marks = nvim_tree_marks.get_marks()
788
+ <
789
+
790
+ toggle_mark() *nvim-tree.marks.toggle_mark()*
791
+
792
+ Toggle a mark on a file or folder under the cursor.
793
+ Mapped to `m ` by default.
794
+
795
+ get_marks() *nvim-tree.marks.get_marks()*
796
+
797
+ Get the list of current marked files/folders.
798
+ Returns a list of nodes.
799
+
800
+ disable_all() *nvim-tree.marks.disable_all()*
801
+
802
+ Remove all marks currently enabled.
803
+ Mapped to `M` by default.
804
+
805
+ You can highlight | NvimTreeMarkedFile | to override the default highlight
806
+ for files and folders with marks.
807
+
777
808
vim:tw=78:ts=8:noet:ft=help:norl:
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ local function iterate_toggle_off(node)
42
42
end
43
43
end
44
44
45
- function M .toggle_all_off ()
45
+ function M .disable_all ()
46
46
iterate_toggle_off (lib .Tree )
47
47
if view .win_open () then
48
48
renderer .draw (lib .Tree , true )
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ M.View = {
77
77
{ key = " q" , cb = M .nvim_tree_callback (" close" ) },
78
78
{ key = " g?" , cb = M .nvim_tree_callback (" toggle_help" ) },
79
79
{ key = ' m' , cb = " :lua require'nvim-tree.marks'.toggle_mark()<cr>" },
80
- { key = ' M' , cb = " :lua require'nvim-tree.marks'.toggle_all_off ()<cr>" },
80
+ { key = ' M' , cb = " :lua require'nvim-tree.marks'.disable_all ()<cr>" },
81
81
}
82
82
}
83
83
You can’t perform that action at this time.
0 commit comments