130 lines
3.8 KiB
Plaintext
130 lines
3.8 KiB
Plaintext
*nvim-tree.lua* A file explorer written in lua
|
|
|
|
Minimum version of neovim: 0.4.0
|
|
|
|
Author: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
|
|
|
|
==============================================================================
|
|
INTRODUCTION *nvim-tree-introduction*
|
|
|
|
==============================================================================
|
|
QUICK START *nvim-tree-quickstart*
|
|
|
|
open the tree with :LuaTreeToggle
|
|
>
|
|
nnoremap <C-n> :LuaTreeToggle<CR>
|
|
lua require 'tree'.toggle()
|
|
<
|
|
|
|
==============================================================================
|
|
COMMANDS *nvim-tree-commands*
|
|
|
|
|:LuaTreeToggle| *:LuaTreeToggle*
|
|
|
|
open or close the tree
|
|
|
|
|:LuaTreeRefresh| *:LuaTreeRefresh*
|
|
|
|
refresh the tree
|
|
|
|
|:LuaTreeFindFile| *:LuaTreeFindFile*
|
|
|
|
The command will change the cursor in the tree for the current bufname.
|
|
|
|
It will also open the leafs of the tree leading to the file in the buffer
|
|
(if you opened a file with something else than the LuaTree, like `fzf`)
|
|
|
|
==============================================================================
|
|
OPTIONS *nvim-tree-options*
|
|
|
|
|g:lua_tree_size| *g:lua_tree_size*
|
|
|
|
width of the window (default to 30)
|
|
|
|
|g:lua_tree_side| *g:lua_tree_side*
|
|
|
|
where the window will open (default to 'left')
|
|
- 'left' or 'right'
|
|
|
|
|g:lua_tree_ignore| *g:lua_tree_ignore*
|
|
|
|
An array of strings that the tree won't display.
|
|
Each pattern is passed into the 'ls' function as `--ignore=PATTERN`
|
|
>
|
|
example: let g:lua_tree_ignore = [ '.git', 'node_modules' ]
|
|
|
|
|g:lua_tree_show_folders| *g:lua_tree_show_folders*
|
|
|
|
Can be `0` or `1`. When `0` it will not show the folder icons
|
|
Default is 1
|
|
|
|
|g:lua_tree_show_git_icons| *g:lua_tree_show_git_icons*
|
|
|
|
Can be `0` or `1`. When `0` it will not show git icons.
|
|
Default is 1
|
|
|
|
|g:lua_tree_follow| *g:lua_tree_follow*
|
|
|
|
Can be `0` or `1`. When `1`, will bind |:LuaTreeFindFile| to |BufEnter|
|
|
Default is 0
|
|
|
|
|g:lua_tree_auto_open| *g:lua_tree_auto_open*
|
|
|
|
Can be `0` or `1`. When `1`, will bind |VimEnter| to automatically
|
|
open tree on startup if no files are specified.
|
|
Default is 0
|
|
|
|
|g:lua_tree_auto_close| *g:lua_tree_auto_close*
|
|
|
|
Can be `0` or `1`. When `1`, will bind |BufEnter| to automatically
|
|
close the tree if it's the last window.
|
|
Default is 0
|
|
|
|
==============================================================================
|
|
INFORMATIONS *nvim-tree-info*
|
|
|
|
|KeyBindings| *nvim-tree-keybindings*
|
|
|
|
- move around like in any vim buffer
|
|
- '<CR>' on '..' will cd in the above directory
|
|
- typing '.' will cd in the directory under the cursor
|
|
|
|
- type 'a' to add a file
|
|
- type 'r' to rename a file
|
|
- type 'd' to delete a file (will prompt for confirmation)
|
|
|
|
- if the file is a directory, '<CR>' will open the directory
|
|
- otherwise it will open the file in the buffer near the tree
|
|
- if the file is a symlink, '<CR>' will follow the symlink
|
|
- type '<C-v>' will open the file in a vertical split
|
|
- type '<C-x>' will open the file in a horizontal split
|
|
- type '<C-t>' will open the file in a new tab
|
|
|
|
- Double left click acts like '<CR>'
|
|
- Double right click acts like '.'
|
|
|
|
|Features| *nvim-tree-features*
|
|
|
|
File icons with vim-devicons.
|
|
|
|
Uses other type of icons so a good font support is recommended.
|
|
If the tree renders weird glyphs, install correct fonts or try to change
|
|
your terminal.
|
|
|
|
Syntax highlighting uses g:terminal_color_ from colorschemes, fallbacks to
|
|
ugly colors otherwise.
|
|
|
|
Git integration tells when a file is:
|
|
- ✗ unstaged or folder is dirty
|
|
- ✓ staged
|
|
- ★ new file
|
|
- ✓✗ partially staged
|
|
- ✓★ new file staged
|
|
- ═ merging
|
|
- ➜ renamed
|
|
|
|
Mouse support defined in |KeyBindings|
|
|
|
|
vim:tw=78:ts=8:noet:ft=help:norl:
|
|
|