# nvim-tree
[toc]
## nvimTree使用
:::success
* :NvimTreeToggle Open or close the tree. Takes an optional path argument.
* :NvimTreeFocus Open the tree if it is closed, and then focus on the tree.
* :NvimTreeFindFile Move the cursor in the tree for the current buffer, opening folders if needed.
* :NvimTreeCollapse Collapses the nvim-tree recursively.
:::
## nvimTree Usage
:::success
* [nvimtree](https://docs.rockylinux.org/books/nvchad/nvchad_ui/nvimtree/)
```
require'nvim-tree'.setup {
auto_close = true, git = {enable=false}
} 或是如下的設定值
M.nvimtree = {
git = { enable = true, },
renderer = {
highlight_git = true,
icons = { show = { git = true }, },
},
view = { side = "right" },
}
```
:::
### hotkeys
:::success
* R (refresh) to perform a reread of the files contained in the project
* H (hide) to hide/display hidden files and folders (beginning with a dot .)
* E (expand_all) to expand the entire file tree starting from the root folder (workspace)
* W (collapse_all) to close all open folders starting from the root folder
* \- (dir_up) allows you to go back up folders. This navigation also allows you to exit the root folder (workspace) to your home directory
* s (system) to open the file with the system application set by default for that file type
* f (find) to open the interactive file search to which search filters can be applied
* F to close the interactive search
* Ctrl + k to display information about the file such as size, creation date, etc.
* g + ? to open the help with all the predefined shortcuts for quick reference
* q to close the file explorer
:::