Show :tree view of selected directory in second pane
Necrom4 opened this issue · 2 comments
Necrom4 commented
Just as you can show a file/directory's information in the second pane using :view, it'd be great to do the same with :tree, which is easier to view due to the icons and others..
I tried doing it my own way but it's surely not the best
" repeated code for hjkl
nnoremap h :view!<CR>:view<CR>h:if filetype('.') != 'dir' | view! | else | :sync %c<CR>:winrun , tree | endif<CR>
yusufaktepe commented
xaizek commented
As was noted on Reddit, using :tree
as a preview is a weird way to go about it which results in complicated mappings. Making preview of directories look more like a tree-view would be a saner approach.
By the way, you can also try:
:set milleroptions+=rpreview:all,lsize:0 millerview
:only
It doesn't look like a tree, but otherwise formatting is consistent with file views.