You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting your own mapping in the configuration is deprecated, see |nvim-tree.on_attach| now.
1080
-
1081
-
You can remove default mappings with |nvim-tree.remove_keymaps|.
1082
-
1083
-
`<CR>`, `o`, `<2-LeftMouse>` open a file or folder; root will cd to the above directory
1084
-
`<C-e>` edit the file in place, effectively replacing the tree explorer
1085
-
`O` same as (edit) with no window picker
1086
-
`<C-]>`, `<2-RightMouse>` cd in the directory under the cursor
1087
-
`<C-v>` open the file in a vertical split
1088
-
`<C-x>` open the file in a horizontal split
1089
-
`<C-t>` open the file in a new tab
1090
-
`<` navigate to the previous sibling of current file/directory
1091
-
`>` navigate to the next sibling of current file/directory
1092
-
`P` move cursor to the parent directory
1093
-
`<BS>` close current opened directory or parent
1094
-
`<Tab>` open the file as a preview (keeps the cursor in the tree)
1095
-
`K` navigate to the first sibling of current file/directory
1096
-
`J` navigate to the last sibling of current file/directory
1097
-
`I` toggle visibility of files/folders hidden via |git.ignore| option
1098
-
`H` toggle visibility of dotfiles via |filters.dotfiles| option
1099
-
`U` toggle visibility of files/folders hidden via |filters.custom| option
1100
-
`R` refresh the tree
1101
-
`a` add a file; leaving a trailing `/` will add a directory
1102
-
`d` delete a file (will prompt for confirmation)
1103
-
`D` trash a file via |trash| option
1104
-
`r` rename a file
1105
-
`<C-r>` rename a file and omit the filename on input
1106
-
`x` add/remove file/directory to cut clipboard
1107
-
`c` add/remove file/directory to copy clipboard
1108
-
`p` paste from clipboard; cut clipboard has precedence over copy; will prompt for confirmation
1109
-
`y` copy name to system clipboard
1110
-
`Y` copy relative path to system clipboard
1111
-
`gy` copy absolute path to system clipboard
1112
-
`[e` go to next diagnostic item
1113
-
`[c` go to next git item
1114
-
`]e` go to prev diagnostic item
1115
-
`]c` go to prev git item
1116
-
`-` navigate up to the parent directory of the current file/directory
1117
-
`s` open a file with default system application or a folder with default file manager, using |system_open| option
1118
-
`f` live filter nodes dynamically based on regex matching.
1119
-
`F` clear live filter
1120
-
`q` close tree window
1121
-
`W` collapse the whole tree
1122
-
`E` expand the whole tree, stopping after expanding |actions.expand_all.max_folder_discovery| folders; this might hang neovim for a while if running on a big folder
1123
-
`S` prompt the user to enter a path and then expands the tree to match the path
1124
-
`.` enter vim command mode with the file the cursor is on
1125
-
`<C-k>` toggle a popup with file infos about the file under the cursor
1126
-
`g?` toggle help
1127
-
`m` Toggle node in bookmarks
1115
+
Setting your own mapping in the configuration will soon be deprecated, see |nvim-tree.on_attach| for experimental replacement.
1116
+
1117
+
The `list` option in `view.mappings.list` is a table of
1118
+
1119
+
- `key` can be either a string or a table of string (lhs)
1120
+
- `action` is the name of the action, set to `""` to remove default action
1121
+
- `action_cb` is the function that will be called, it receives the node as a parameter. Optional for default actions
1122
+
- `mode` is normal by default
1123
+
>
1124
+
local tree_cb = require'nvim-tree.config'.nvim_tree_callback
{ key = "s", cb = tree_cb("vsplit") }, --tree_cb and the cb property are deprecated
1134
+
{ key = "<2-RightMouse>", action = "" }, -- will remove default cd action
1135
+
}
1136
+
<
1137
+
Mouse support defined in |KeyBindings|
1138
+
1139
+
DEFAULT MAPPINGS *nvim-tree-default-mappings*
1140
+
1141
+
`<CR>` edit open a file or folder; root will cd to the above directory
1142
+
`o`
1143
+
`<2-LeftMouse>`
1144
+
`<C-e>` edit_in_place edit the file in place, effectively replacing the tree explorer
1145
+
`O` edit_no_picker same as (edit) with no window picker
1146
+
`<C-]>` cd cd in the directory under the cursor
1147
+
`<2-RightMouse>`
1148
+
`<C-v>` vsplit open the file in a vertical split
1149
+
`<C-x>` split open the file in a horizontal split
1150
+
`<C-t>` tabnew open the file in a new tab
1151
+
`<` prev_sibling navigate to the previous sibling of current file/directory
1152
+
`>` next_sibling navigate to the next sibling of current file/directory
1153
+
`P` parent_node move cursor to the parent directory
1154
+
`<BS>` close_node close current opened directory or parent
1155
+
`<Tab>` preview open the file as a preview (keeps the cursor in the tree)
1156
+
`K` first_sibling navigate to the first sibling of current file/directory
1157
+
`J` last_sibling navigate to the last sibling of current file/directory
1158
+
`I` toggle_git_ignored toggle visibility of files/folders hidden via |git.ignore| option
1159
+
`H` toggle_dotfiles toggle visibility of dotfiles via |filters.dotfiles| option
1160
+
`U` toggle_custom toggle visibility of files/folders hidden via |filters.custom| option
1161
+
`R` refresh refresh the tree
1162
+
`a` create add a file; leaving a trailing `/` will add a directory
1163
+
`d` remove delete a file (will prompt for confirmation)
1164
+
`D` trash trash a file via |trash| option
1165
+
`r` rename rename a file
1166
+
`<C-r>` full_rename rename a file and omit the filename on input
1167
+
`x` cut add/remove file/directory to cut clipboard
1168
+
`c` copy add/remove file/directory to copy clipboard
1169
+
`p` paste paste from clipboard; cut clipboard has precedence over copy; will prompt for confirmation
1170
+
`y` copy_name copy name to system clipboard
1171
+
`Y` copy_path copy relative path to system clipboard
1172
+
`gy` copy_absolute_path copy absolute path to system clipboard
1173
+
`[e` prev_diag_item go to next diagnostic item
1174
+
`[c` prev_git_item go to next git item
1175
+
`]e` next_diag_item go to prev diagnostic item
1176
+
`]c` next_git_item go to prev git item
1177
+
`-` dir_up navigate up to the parent directory of the current file/directory
1178
+
`s` system_open open a file with default system application or a folder with default file manager, using |system_open| option
1179
+
`f` live_filter live filter nodes dynamically based on regex matching.
1180
+
`F` clear_live_filter clear live filter
1181
+
`q` close close tree window
1182
+
`W` collapse_all collapse the whole tree
1183
+
`E` expand_all expand the whole tree, stopping after expanding |actions.expand_all.max_folder_discovery| folders; this might hang neovim for a while if running on a big folder
1184
+
`S` search_node prompt the user to enter a path and then expands the tree to match the path
1185
+
`.` run_file_command enter vim command mode with the file the cursor is on
1186
+
`<C-k>` toggle_file_info toggle a popup with file infos about the file under the cursor
1187
+
`g?` toggle_help toggle help
1188
+
`m` toggle_mark Toggle node in bookmarks
1189
+
`bmv` bulk_move Move all bookmarked nodes into specified location
0 commit comments