Closed TeoDev1611 closed 3 years ago
A: You can use autocmd for it. But no official guarantee. Because it may
break other plugins behavior. >
autocmd BufEnter,VimEnter,BufNew,BufWinEnter,BufRead,BufCreate
\ * if isdirectory(expand('<amatch>'))
\ | call s:browse_check(expand('<amatch>')) | endif
function! s:browse_check(path) abort
if bufnr('%') != expand('<abuf>')
return
endif
" Disable netrw.
augroup FileExplorer
autocmd!
augroup END
execute 'Defx' a:path
endfunction
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
Hi How I open defx in the current directory when i run
nvim .
I try this but not work only open netrwExpected
Open Defx in the current directory
Environment Information
OS: Windows
neovim/Vim version: NVIM v0.5.0-dev
:checkhealth
or:CheckHealth
result(neovim only):Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
https://pastebin.com/BJEcpJAq