vim9 | how to force legacy vimscript execution

108 views
Skip to first unread message

Ni Va

unread,
Dec 23, 2021, 4:55:00 AM12/23/21
to vim_use
Hi,

I am currently using this legacy vimscript https://github.com/tweekmonster/startuptime.vim.

It is managed by Plug.vim plugins' manager in my vim9script _vimrc.

It appears startuptime.vim warns on some script code such as :

    echomsg 'Tagbar: Vim versions lower than 7.0.167 have a bug'
          \ 'that prevents this version of Tagbar from working.'
          \ 'Please use the alternate version posted on the website.'



identically warns on if brackets spread on multiple lines.

How can I fix it or fix this call of legacy vimscript ?

Thank you
NiVa

Tony Mechelynck

unread,
Dec 23, 2021, 7:23:06 AM12/23/21
to vim_use
I can't find this echomsg statement in startuptime.vim as linked. I
suppose it comes from somewhere in Tagbar. Could you please tell us
what code (if statement etc.) triggers this message? (I suppose you
are using Vim 8.2 aren't you?)

Best regards,
Tony.

Ni Va

unread,
Dec 23, 2021, 7:33:32 AM12/23/21
to vim_use
Hi 
This issue is general.

This is for TagBar plugin : Plug 'https://github.com/preservim/tagbar.git'
Error detected while processing D:\Logiciels\Vim\vimfiles\plugged\tagbar\
plugin\tagbar.vim:  line   39:  E10: \ should be followed by /, ? or &
line   40:  E10: \ should be followed by /, ? or &
Error detected while processing D:\Logiciels\Vim\vimfiles\plugged\tagbar\
plugin\tagbar.vim[133]..function <SNR>63_setup_options: line   35: E697: Missing end of List ']': 
Error detected while processing D:\Logiciels\Vim\vimfiles\plugged\tagbar\
plugin\tagbar.vim: line  136: E15: Invalid expression: "has('multi_byte') && has('unix') && &encoding
==# 'utf-8' &&" line  137: E10: \ should be followed by /, ? or &
Error detected while processing D:\Logiciels\Vim\vimfiles\plugged\tagbar\
plugin\tagbar.vim[178]..function <SNR>63_setup_keymaps:  line    1:  E697: Missing end of List ']':



This is for coc.vim  :  Plug 'neoclide/coc.nvim'

Error detected while processing D:\Logiciels\Vim\vimfiles\plugged\coc.nvi
m\plugin\coc.vim[49]..function coc#rpc#start_server[17]..<SNR>48_start:

line   10: E723: Missing end of Dictionary '}':
line   11: E10: \ should be followed by /, ? or &
line   12: E10: \ should be followed by /, ? or &
line   13: E10: \ should be followed by /, ? or &
line   14: E10: \ should be followed by /, ? or &
line   15: E10: \ should be followed by /, ? or &
line   16: E10: \ should be followed by /, ? or &
line   17: E10: \ should be followed by /, ? or &
line   18: E10: \ should be followed by /, ? or &
line   19:  E10: \ should be followed by /, ? or &

Tony Mechelynck

unread,
Dec 23, 2021, 7:47:17 AM12/23/21
to vim_use
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>

This is the code in Tagbar where the error message you previously
mentioned was produced:

if v:version == 700 && !has('patch167')
echohl WarningMsg
echomsg 'Tagbar: Vim versions lower than 7.0.167 have a bug'
\ 'that prevents this version of Tagbar from working.'
\ 'Please use the alternate version posted on the website.'
echohl None
finish
endif

It means you are using Vim 7.0 without patch 7.0.167. That version of
Vim is obsolete. Please upgrade to at least version 8.2 (the current
patchlevel as of this writing is 8.2.3877 AFAIK).

Best regards,
Tony.

Ni Va

unread,
Dec 23, 2021, 7:55:53 AM12/23/21
to vim_use
Hum, I got a doubt on my used version of gvim x86 build mingw under Win10.
It seems to be daily updated as described:

:ver
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 23 2021 10:21:53)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-3877
Compiled by nicolas.v
Huge version with GUI.  Features included (+) or not (-):
+acl                +eval               +multi_byte_ime/dyn +tag_binary
+arabic             +ex_extra           +multi_lang         -tag_old_static
+autocmd            +extra_search       -mzscheme           -tag_any_white
+autochdir          -farsi              +netbeans_intg      -tcl
+autoservername     +file_in_path       +num64              -termguicolors
+balloon_eval       +find_in_path       +ole                +terminal
-balloon_eval_term  +float              +packages           -termresponse
+browse             +folding            +path_extra         +textobjects
++builtin_terms     -footer             -perl               +textprop
+byte_offset        +gettext/dyn        +persistent_undo    -tgetent
+channel            -hangul_input       +popupwin           +timers
+cindent            +iconv/dyn          -postscript         +title
+clientserver       +insert_expand      +printer            +toolbar
+clipboard          +ipv6               +profile            +user_commands
+cmdline_compl      +job                -python             +vartabs
+cmdline_hist       +jumplist           +python3/dyn        +vertsplit
+cmdline_info       +keymap             +quickfix           +virtualedit
+comments           +lambda             +reltime            +visual

Ni Va

unread,
Dec 23, 2021, 9:00:22 AM12/23/21
to vim_use
It seems that the problem is in interaction between vim9script | vimscript through vimrun launch command. 

eg : my _vimrc is written in vim9script and the fact that Startuptime command (autoload part of https://github.com/tweekmonster/startuptime.vim. ) launches 
a vimrun.exe of all plugin as TagBar which is written in vimscript legacy.

Ni Va

unread,
Dec 23, 2021, 12:49:40 PM12/23/21
to vim_use
resolved by porting just plugin part of this plugin in vim9script

Ni Va

unread,
Jan 1, 2022, 4:55:29 PM1/1/22
to vim_use
Similar issue: a port of interestingwords in vim9script

Reply all
Reply to author
Forward
0 new messages