justinmk / vim-dirvish

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

E121: Undefined variable: w:dirvish when using :new +Dirvish #142

Closed tammersaleh closed 5 years ago

tammersaleh commented 5 years ago

When using the minimal vimrc below (and after running :PlugUpdate), the :Dirvish command works fine, but :new +Dirvish gives the error E121: Undefined variable: w:dirvish

set nocompatible

call plug#begin('~/.vim/plugged')
Plug 'https://github.com/justinmk/vim-dirvish'
call plug#end()
tammersaleh commented 5 years ago

I can also trigger it by first typing :new, and then -.

It also looks like :split +Dirvish works fine, which is a good workaround for me.

tammersaleh commented 5 years ago

I also seem to get this error when running :split +Dirvish from a quickfix location window.

justinmk commented 5 years ago

Cannot reproduce. Did you restart vim after running :PlugUpdate ?

Are you sure no other plugins are loaded? :scriptnames should only show stuff that is shipped with vim.

I tested with Nvim 0.4 and Vim 8.1.1005:

vim -u DEFAULTS -N +":set rtp+=~/.config/nvim/pack/minpac/start/vim-dirvish/" +":runtime plugin/dirvish.vim"
nvim -u NONE +":set rtp+=~/.config/nvim/pack/minpac/start/vim-dirvish/" +":runtime plugin/dirvish.vim"
markonm commented 5 years ago

I can reproduce this with Vim 8.1.1561 on Ubuntu 18.04.

echo "test" > test && vim --clean "+ set packpath+=.vim | packadd vim-dirvish | e test | new | norm -"

Seems to be caused by https://github.com/justinmk/vim-dirvish/commit/d151a9071b0593eca0877e44c2057a1140b9bdfd

trsdln commented 5 years ago

I'm experiencing similar issue.

Steps to reproduce:

  1. Open Vim: vim -u DEFAULTS -N +":set rtp+=~/.vim/bundle/vim-dirvish/" +":runtime plugin/dirvish.vim"
  2. Create split: :vsplit
  3. Open arbitrary file: :e some-file.txt
  4. Go back to empty window: C-W l
  5. Try to open Dirvish: -

Then this error is shown:

image

Vim 8.1.1450, macOS 10.14.5

justinmk commented 5 years ago

What does this say:

:set hidden?
trsdln commented 5 years ago

nohidden

Not sure it affects anything though, because my .vimrc sets to hidden and I'm able to reproduce described bug anyway.

hkupty commented 5 years ago

I've got the same error essentially every time I open a file then:vspl | wincmd l | enew | normal -.

:set hidden? returns hidden for me.