Search code examples
vimvim-plugin

Errors when starting vim with the Quramy/tsuquyomi plugin


I use the Quramy/tsuquyomi plugin on my laptop and everything is working well. Today I installed it on my desktop (macOS Sierra the same as on the laptop) and I get the errors when starting the vim:

Error detected while processing /Users/username/.vim/bundle/tsuquyomi/plugin/tsuquyomi.vim: line 38: E806: using Float as a String E116: Invalid arguments for function get(g:, 'tsuquyomi_waittime_after_open', 0.01) E15: Invalid expression: get(g:, 'tsuquyomi_waittime_after_open', 0.01) Press ENTER or type command to continue

I compared the output of the vim --version and it seems like everything is the same.

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 3 2017 18:35:35) MacOS X (unix) version Included patches: 1-1050 Compiled by Homebrew Huge version without GUI. Features included (+) or not (-): +acl +file_in_path +mouse_sgr +tag_old_static +arabic +find_in_path -mouse_sysmouse -tag_any_white +autocmd +float +mouse_urxvt -tcl -balloon_eval +folding +mouse_xterm +termguicolors -browse -footer +multi_byte +terminal ++builtin_terms +fork() +multi_lang +terminfo +byte_offset -gettext -mzscheme +termresponse +channel -hangul_input +netbeans_intg +textobjects +cindent +iconv +num64 +timers -clientserver +insert_expand +packages +title +clipboard +job +path_extra -toolbar +cmdline_compl +jumplist +perl +user_commands +cmdline_hist +keymap +persistent_undo +vertsplit +cmdline_info +lambda +postscript +virtualedit +comments +langmap +printer +visual +conceal +libcall +profile +visualextra +cryptv +linebreak +python +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con -lua +rightleft +windows +diff +menu +ruby +writebackup +digraphs +mksession +scrollbind -X11 -dnd +modify_fname +signs -xfontset -ebcdic +mouse +smartindent -xim +emacs_tags -mouseshape +startuptime -xpm +eval +mouse_dec +statusline -xsmp +ex_extra -mouse_gpm -sun_workshop -xterm_clipboard +extra_search -mouse_jsbterm +syntax -xterm_save +farsi +mouse_netterm +tag_binary
system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/local/share/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -framework Cocoa -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.26.0/lib/perl5/5.26.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -F/usr/local/opt/python/Frameworks -framework Python -lruby.2.4.1 -lobjc

Also, I verified that the version of Quramy/tsuquyomi is the same as on my laptop.

Does anyone have an idea how these errors may be fixed?


Solution

  • OK, so the problem was in the floating point numbers:

    get(g:, 'tsuquyomi_waittime_after_open', 0.01)

    While the plugin +float is included to the build the error still occurs. To fix this you can just replace all floating point numbers with str2float("0.01"):

    get(g:, 'tsuquyomi_waittime_after_open', str2float("0.01"))

    Also, I posted the pull request and it seems like the changes have been merged: https://github.com/Quramy/tsuquyomi/pull/178