Closed oblitum closed 5 years ago
@oblitum I have the same problem. Here is my work around
nnoremap <silent> <F3> :call DefxDrawerToggle()<CR>
" nnoremap <silent> <F3> :Defx -columns=git:mark:filename:type -toggle -split=vertical -winwidth=60 -direction=botright<CR>
fun! DefxDrawerToggle()
if bufwinnr('defx') > 0
execute "bd! " . bufnr('defx')
else
rightbelow vert split
Defx `expand('%:p:h')`
vert resize 60
endif
endfun
@sandangel thanks! though this makes things way more complicated to have a simple split as most file browsers provide...
Looks like the cause is the fix for issue #60. Not sure how :Defx -split=vertical -winwidth=50 -direction=topleft -columns=icons:filename:type
should be translated to the new way of doing the same, if there's one.
OK, looks like I just needed to:
call defx#custom#option('_', {
\ 'columns': 'icons:filename:type',
\ 'direction': 'topleft',
\ 'split': 'vertical',
\ 'winwidth': 50
\ })
And :Defx
would open as :Defx -split=vertical -winwidth=50 -direction=topleft -columns=icons:filename:type
by default.
This will be enough for me but, I was initially using the command as a mapping:
nnoremap <silent> <leader>D :Defx -split=vertical -winwidth=50 -direction=topleft -columns=icons:filename:type<cr>
And I could have a variation of different mappings with custom settings, this seems not possible anymore as straightforward as it was before.
Confirmed. It is the bug of defx.
Please update it.
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
Command for vertical split not working anymore:
It's just opening full window.
Expected
Open a sidebar as it worked previously
Environment Information
defx version(SHA1): 8cb96ac
OS: ArchLinux
neovim/Vim version: NeoVim 0.3.2
:checkhealth
or:CheckHealth
result(neovim only):Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
The reproduce ways from neovim/Vim starting (Required!)
:Defx -split=vertical -winwidth=50 -direction=topleft -columns=icons:filename:type
Extra
Bad commit: https://github.com/Shougo/defx.nvim/commit/bf78fd809fc8a95d045046617fc6c42cc83eade9