justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.19k stars 64 forks source link

vim-plug on-demand loading + nerdtree #180

Open fcying opened 4 years ago

fcying commented 4 years ago

As long as i have usedNERDTreeToggle with On-demand loading once, vim-dirvish can't work. used NERDTreeToggle not with On-demand loading work fine.

reproduce:

$vim
:NERDTreeToggle<CR>
open file
-

Error detected while processing function dirvish#open[39]..<SNR>47_open_dir[45]..<SNR>47_buf_render:
line   16:
E21: Cannot make changes, 'modifiable' is off:   silent keepmarks keepjumps %delete

vimrc

set nocompatible
set encoding=utf-8
set mouse=n

source ~/.vim/plugged/vim-plug/plug.vim
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', {'on':['NERDTreeToggle']}    "work failed
"Plug 'scrooloose/nerdtree'                      "work fine
Plug 'justinmk/vim-dirvish'
nmap <leader>nt :NERDTreeToggle<cr>
call plug#end()
delc PlugUpgrade

filetype plugin indent on
syntax on

vim version:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 12 2020 11:19:10)
Included patches: 1-740
justinmk commented 4 years ago

swapping directory plugins on/off isn't going to be pretty, because each one installs a handler for directory-like paths...