Files
nvim-tree.lua/plugin/tree.vim
kiyan42 e0bfcb4a6f Refacto: rewrite everything
- The tree is created with libuv functions, which makes it blazingly fast.
- The tree may now be faster than any other vim trees, it can handle directories with thousands of files without any latency at all (tested on 40K files, works flawlessly).
- More solid logic for opening and closing the tree.
- tree state is remembered (closing / opening a folder keeps opened subdirectories open)
- detection of multiple git projects in the tree
- more icon support
- smart rendering
- smart updates
- ms windows support
- gx replacement function running xdg-open on linux, open on macos
2020-05-29 15:33:47 +02:00

28 lines
719 B
VimL

if has('win32') || exists('g:loaded_tree') | finish | endif
let s:save_cpo = &cpo
set cpo&vim
let g:loaded_netrw = 1
let g:loaded_netrwPlugin = 1
hi def link LuaTreePopup Normal
augroup LuaTree
au BufWritePost * lua require'tree'.refresh()
au BufEnter * lua require'tree'.buf_enter()
au VimEnter * lua require'tree'.on_enter()
au ColorScheme * lua require'tree'.reset_highlight()
augroup end
command! LuaTreeOpen lua require'tree'.open()
command! LuaTreeClose lua require'tree'.close()
command! LuaTreeToggle lua require'tree'.toggle()
command! LuaTreeRefresh lua require'tree'.refresh()
command! LuaTreeFindFile lua require'tree'.find_file()
let &cpo = s:save_cpo
unlet s:save_cpo
let g:loaded_tree = 1