chadtree icon indicating copy to clipboard operation
chadtree copied to clipboard

chadtree breaks directory argument

Open GGCristo opened this issue 4 years ago • 3 comments

When you open neovim with a directory argument such as nvim . instead of opening the pertinent directory tree it starts editing a new file with the name '.'.

Expected behavior: chadtree should open as a unique panel, or at least leave the built-in file system explorer to work.

GGCristo avatar Feb 13 '21 01:02 GGCristo

oh ok, that makes sense, i will edit that

ms-jpq avatar Feb 13 '21 23:02 ms-jpq

Bump. Can you please look into this? I am also unable to Ctrl-W + F on filepaths in text files which earlier used to open the file browser (vim/neovim inbuilt or nerdtree)

surmish avatar Jul 06 '21 18:07 surmish

You can fix this behavior with the following augroup:

function! ToggleFileTree() abort
    :CHADopen
    :AirlineRefresh
endfunction


augroup OpenCHADTreeIfDirectoryArgProvided
    autocmd!
    ...
    autocmd VimEnter * if argc() == 1 && isdirectory(argv(0)) | call ToggleFileTree() | endif
augroup END

alichtman avatar Apr 10 '23 10:04 alichtman