lambdalisue / vim-fern

🌿 General purpose asynchronous tree viewer written in Pure Vim script
MIT License
1.29k stars 49 forks source link

Not working at all on linux + Vim 8.1 #303

Closed orlp closed 3 years ago

orlp commented 3 years ago

Minimal vimrc.vim:

set nocompatible
set packpath=
set runtimepath^=~/tmp/fern.vim
filetype plugin indent on
syntax on

Then vim -u vimrc.vim followed by :Fern ~ -drawer gives just an empty buffer with nothing visible, but it does do something:

:buffers
  1 %a   "[No Name]"                    line 1
  5      "fern://drawer:1/file:///home/orlp;$" line 0
Press ENTER or type command to continue

My Vim version:

~/tmp/ $ vim --version -u vimrc.vim
VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 20 2018 20:23:39)
Included patches: 1-451
Compiled by orlp@orlp-laptop
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    -tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
+balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
+browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          +toolbar
+cindent           +insert_expand     +path_extra        +user_commands
+clientserver      +job               +perl              +vartabs
+clipboard         +jumplist          +persistent_undo   +vertsplit
+cmdline_compl     +keymap            +postscript        +virtualedit
+cmdline_hist      +lambda            +printer           +visual
+cmdline_info      +langmap           +profile           +visualextra
+comments          +libcall           +python/dyn        +viminfo
+conceal           +linebreak         +python3/dyn       +vreplace
+cryptv            +lispindent        +quickfix          +wildignore
+cscope            +listcmds          +reltime           +wildmenu
+cursorbind        +localmap          +rightleft         +windows
+cursorshape       +lua               +ruby              +writebackup
+dialog_con_gui    +menu              +scrollbind        +X11
+diff              +mksession         +signs             -xfontset
+digraphs          +modify_fname      +smartindent       +xim
+dnd               +mouse             +startuptime       +xpm
-ebcdic            +mouseshape        +statusline        +xsmp_interact
+emacs_tags        +mouse_dec         -sun_workshop      +xterm_clipboard
+eval              -mouse_gpm         +syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary

Doing the exact same process with nvim v0.4.4 works on the same machine with the same vimrc.

lambdalisue commented 3 years ago

Reproduced with the following

FROM thinca/vim:v8.1.0451

ENV VIMPATH=/root/.vim \
    PACKPATH=/root/.vim/pack/test/start

RUN apk --no-cache add git
RUN git clone https://github.com/lambdalisue/fern.vim $PACKPATH/fern.vim

COPY vimrc /root/.vim/
if exists('+compatible') && &compatible
  set nocompatible
endif

if has('nvim')
  set runtimepath^=~/.vim
  set runtimepath+=~/.vim/after
  set packpath^=~/.vim
endif

packloadall

filetype plugin indent on
syntax on

echomsg "Custom vimrc has loaded"
lambdalisue commented 3 years ago

It seems ++nested cause this issue. ~I'll fix it.~ I'll drop that version instead while Vim 8.1.0451 is too old to support.

CleanShot 2021-02-28 at 14 36 59

lambdalisue commented 3 years ago

++nested is introduced by https://github.com/vim/vim/releases/tag/v8.1.1113

lambdalisue commented 3 years ago

With #305, fern support Vim 8.1.2269 but 8.1.0451 so please update your Vim.

orlp commented 3 years ago

Would it be possible to add a version check to fern so that it at least tells the user to update instead of just failing silently?

lambdalisue commented 3 years ago

No while it's too annoying if Vim plugin said "This plugin is not supported on your environment brabrabra" every after Vim started.

orlp commented 3 years ago

@lambdalisue I was more thinking that an error gets displayed if you tried calling :Fern with a too old version, instead of on startup.

lambdalisue commented 3 years ago

It shows "E492: Not an editor command: Fern" now introduced at #305.