Closed roachsinai closed 4 years ago
how do you open vim, by opening that file, or you open it without providing any file? I'm using neovim, not sure if you use it also or vim.
Yeah, I use Vim open that file.
I'm not sure why that happens. For me in neovim it opens it just fine. Try playing with those options in the defx_open and see why it's like that.
So, you just use neovim open a fine, and directly press <Leader>hf
to toggle defx and find that file?
yeah, without any issues. Can you post me two fullscreen screenshots to see the difference between working and non-working?
Hi, I so sorry maybe there is something wrong in my vimrc. Cause I've removed all my vimrc then paste your defx.vim into it, then no bugs. I'll check it.
<leader>n
, which works screenshot:
<leader>hf
, which not work screenshot:
first <leader>hf
, then <leader>n
to close defx, leaves an new unnamed buffer.
I can't find it...
I have resize the winwidth.
If you can, try with neovim and see if it happens. If it doesn't, than it's issue with vim.
Found it, it was cause by let g:indent_guides_enable_on_vim_startup=1
. Auto start setting for vim-indent-guides plugin.
If I comment that variable, everything is OK. So maybe something wierd happened.
Great! I'm not using indent guides, that's why it's not happening to me.
Maybe initialize indent guides manually after defx is opened.
Yeah, then the trigger of
By the way, did you try open defx under a pyenv
virtual environment? GOT ERROR!!!
[defx] [yarp] [defx] job is dead. failed establishing channel for ['python3', '-u', '/home/roach/.vim/plugged/nvim-yarp/pythonx/yarp.py'
, '/tmp/vQT9JgM/8', 2, 'defx']
[defx] function defx#util#call_defx[2]..defx#start[1]..defx#initialize[1]..defx#init#_initialize[5]..defx#init#_channel[18]..yarp#core#r
equest[1]..yarp#core#wait_channel,第 13 行
Problems come one by one, lol. Maybe I should make an issue to defx repo.
I'm not developing in python, and not using pyenv. This looks like an issue for defx.
Ok, thanks for your help!
I found your config about defx.vim, it helps a lot! Thanks!! But I get a problem with defx_open and find_current_file.
https://github.com/kristijanhusak/neovim-config/blob/aa8a2d4fab4d7eea0efa0572c5b336781320dc17/nvim/partials/defx.vim#L7 https://github.com/kristijanhusak/neovim-config/blob/aa8a2d4fab4d7eea0efa0572c5b336781320dc17/nvim/partials/defx.vim#L8
If I first pressn then press n again to hide defx, then press hf, everything is great.
As above defx found the file tt.cpp, and I have resize the winwidth it works.
But if I presshf directly after run Vim, got lots of trailing spaces, and winwidth is not as what I set.
It hides the buffer of file
tt.cpp
.The
RED
blocks is highlight of trailing spaces.