add LuaTreeFindFile, doc and option

This commit is contained in:
kyazdani42
2020-02-28 17:24:08 +01:00
parent b9398b285d
commit daff837b23
5 changed files with 83 additions and 8 deletions

View File

@@ -12,6 +12,10 @@ au BufWritePost * lua require'tree'.refresh()
au BufEnter * lua require'tree'.check_windows_and_close()
au VimEnter * lua require'tree'.check_buffer_and_open()
if get(g:, 'lua_tree_follow') != 0
au BufEnter * :LuaTreeFindFile
endif
" TODO: WinEnter is not the right autocommand for this task,
" but we do not have LayoutChange or WinMove kind of option atm,
" so this is deactivated by default to avoid messing up users workflows
@@ -20,6 +24,7 @@ au VimEnter * lua require'tree'.check_buffer_and_open()
command! LuaTreeToggle lua require'tree'.toggle()
command! LuaTreeRefresh lua require'tree'.refresh()
command! LuaTreeFindFile lua require'tree'.find()
let &cpo = s:save_cpo
unlet s:save_cpo