Tuesday, October 27, 2020

Re: v:shell_error is 1 starting gvim


Hi Gary and thank you for your answer.

I have a different approach to the problem.

Looking at the code of the script tagbar.vim version 2.7, line 640 if v:shell_error ctags_output! Universal) Ctags'?
 I note that the author as elsewhere written in the help of tagbar, seeks to see if it is either Exuberant or Universal Ctags. So the two executables are compatible. 

And after a few tests I note that my problem comes from the condition v:shell_error which ends up at 1 for a reason unknown to me ... or at least I think it comes from one of my plugins:=>  because when I launch Vim with the option -u NONE, this variable is at 0

So I'm still in investigation. Thank you  
Le mardi 27 octobre 2020 à 18:13:12 UTC+1, Gary Johnson a écrit :
On 2020-10-27, Ni Va wrote:
> Got this verbose report in level 4 just after opening tagbar.vim and try toggle
> tagbar.
>
> sourcing "D:\Logiciels\Vim\vimfiles\plugged\tagbar\autoload\tagbar.vim"
> filetype detection:ON plugin:ON indent:ON
> finished sourcing D:\Logiciels\Vim\vimfiles\plugged\tagbar\autoload\tagbar.vim
> line 1: sourcing "D:\Logiciels\Vim\vimfiles\plugged\tagbar\autoload\tagbar\
> debug.vim"
> finished sourcing D:\Logiciels\Vim\vimfiles\plugged\tagbar\autoload\tagbar\
> debug.vim
> continuing in <SNR>148_ToggleWindow
> Tagbar: Ctags doesn't seem to be Exuberant Ctags!
> BSD ctags will NOT WORK. Please download Exuberant Ctags from
> ctags.sourceforge.net and install it in a directory in your $PATH or set
> g:tagbar_ctags_bin.
> Executed command: "D:\Logiciels\Vim\vim82\ctags.exe --version"
> Command output:
> Universal Ctags 5.9.0(5d000b1a), Copyright (C) 2015 Universal Ctags Team^M
> Universal Ctags is derived from Exuberant Ctags.^M
> Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert^M
> Compiled: Oct 26 2020, 01:20:04^M
> URL: https://ctags.io/^M
> Optional compiled features: +win32, +wildcards, +regex, +internal-sort,
> +unix-path-separator, +iconv, +option-directory, +xpath, +json, +interactive,
> +yaml, +case-insensitive-filenames, +packcc^M
> Exit code: 1 >> v:shell_error

As the error message says, the tagbar plugin was written to use
Exuberant Ctags and will not work with BSD ctags. The author tries
to verify that the required version of ctags is being used by
executing "ctags --version". The problem is that tagbar does not
recognize the Universal Ctags you are using, which is an improved
and supported derivative of Exuberant Ctags.

Universal Ctags should work as well if not better than Exuberant
Ctags. There is one irritating incompatibility between the two:
the author of Universal Ctags changed the spelling of the "--extra"
option "--extras". A plugin that uses that option but knows the
ctags version can work around that.

I think the best solution here is to modify tagbar.vim, either
yourself or by contacting the author, so that it accepts Universal
Ctags as well as Exuberant Ctags.

You could install Exuberant Ctags and make sure it is earlier in
your PATH than Universal Ctags, but since the former is unsupported
and not as capable, I wouldn't recommend that.

Regards,
Gary

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/f47f3c7b-cc6d-4b07-b822-2d27574a4e31n%40googlegroups.com.

No comments:

Post a Comment