Defx works not so well with Recover.vim
See original GitHub issueProblems summary
Run :call execute("Defx -auto-cd -search=".fnameescape(expand('%:p'))." ".expand("~"))
when enable plugin https://github.com/chrisbra/recover.vim will get some unexpected results:
- defx shows in current window instead of a new split
- something happend let other autocmd not work
Expected
Fix listed results above, which means have same behavior as https://github.com/chrisbra/recover.vim disabled.
Environment Information
- plugin version(SHA1): e1842ae
- OS: Linux
- neovim/Vim version: gvim 8.2.2815-1
Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
let mapleader=" "
call plug#begin('~/.vim/plugged')
if has('nvim')
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/defx.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'chrisbra/recover.vim'
Plug 'ntpeters/vim-better-whitespace'
call plug#end()
augroup vimrc_defx
autocmd!
autocmd VimEnter * call Setup_Defx()
augroup END
nnoremap <silent><leader>l :call execute("Defx -auto-cd -search=".fnameescape(expand('%:p'))." ".expand("~"))<CR>
function! Setup_Defx() abort
silent! call defx#custom#option('_', {
\ 'winwidth': 30,
\ 'split': 'vertical',
\ 'direction': 'topleft',
\ 'show_ignored_files': 0,
\ 'buffer_name': 'defxplorer',
\ 'columns': 'indent:filename',
\ 'toggle': 1,
\ 'resume': 1,
\ 'listed': 1,
\ 'root_marker': '≡ '
\ })
silent! call defx#custom#column('filename', {
\ 'max_width': 80,
\ })
endfunction
let g:better_whitespace_enabled=1
let g:better_whitespace_filetypes_blacklist=['defx']
The reproduce ways from Vim starting (Required!)
Use Vim open a file A
and then press <leader>l
.
Compare results of press <leader>l
in Normal mode between enable and disable https://github.com/chrisbra/recover.vim .
What we can find:
https://github.com/chrisbra/recover.vim enabled
- defx covers buffer of
A
- the trailing spaces of defx are highlight by https://github.com/ntpeters/vim-better-whitespace, which means the autocmd set by https://github.com/ntpeters/vim-better-whitespace not run after open defx
https://github.com/chrisbra/recover.vim disabled
- defx opens in a new split
- the trailing spaces of defx not hightlight
Screen shot (if possible)
when enable Recover.vim:
when disable Recover.vim:
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (17 by maintainers)
Top Results From Across the Web
Defx: file explorer plugin for Neovim : r/vim - Reddit
How well does it work in Vim (as this is r/vim not r/neovim)?. I see from the requirements that it requires you to...
Read more >vim: search files under the current working directory with ...
I'm using defx as filer, and denite and ag to search files on Neovim. ... [coc.nvim] Definition provider not found for current document....
Read more >Defx open file the buffer nothing to show · Issue #212 - GitHub
/usr/bin/python does not have the "neovim" module. ... Install Perl and cpanminus and verify that `perl` and `cpanm` commands work.
Read more >recover - Vim documentation
You can recover most of your changes from the files that Vim uses to store the contents of the file. Mostly you can...
Read more >repeatable vim recovery failure - Google Groups
issue: vim recovery will not work unless orphaned vim swap file extension begins with "sw". scenario: os crashes while gvim has a number...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just pushed a fix, I think.
@Shougo Thanks!