Closed casimir closed 9 years ago
Do I understand correctly that universal-ctags is a fork of Exuberant Ctags >= 5.8? In that case it should be fully compatible indeed (until they start making backwards incompatible changes ;-) so I can see if I can get the version check to accept "Universal Ctags Development".
I was actually waiting for a response from you before investigate more. :angel: I switched to it like 1 week ago and except for your plugin I didn't encounter any problem. I saw in there doc that they are merging exuberant patches so I would say they are backward compatible. They have a specific section for this in there doc: https://github.com/universal-ctags/ctags/blob/master/docs/tracking.rst#exuberant-ctags
I just published vim-easytags version 3.11 where I've tried to at least make the version check accept Universal Ctags as an alternative to Exuberant Ctags. I don't have time to try Universal Ctags at the moment, so I can't confirm if this is enough to get things going. Can you give it a try and report back? Thanks for the feedback!
After a few hours with several languages (c, go, rust, python) still no problem. Thanks a lot. :smile:
Hi, I'm a developer of universal ctags. Could you look at https://github.com/universal-ctags/ctags/issues/748 ?
These days I'm planing releasing 1.0.0. As the first step I changed the output of ctags --version. Now universal ctags has following output:
% ./ctags --version
./ctags --version
Universal Ctags 0.0.0(93f3c66), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Jan 5 2016, 02:36:12
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +option-directory, +coproc
I have found a fix is available: https://github.com/Wraul/vim-easytags/commit/f5746bdfd9942b00c349e53f3f4917ae73bb6797 !
As @masatake has reported, there is a supposed fix available, but it is a pull request from December 24, 2015 that has neither been accepted or rejected. https://github.com/xolox/vim-easytags/pull/133
@xolox I'm still seeing the following. Is that intended?
% vim .
easytags.vim 3.11: Plug-in not loaded because Exuberant Ctags 5.5 or newer is required while you have version 0.0.0 installed!
Press ENTER or type command to continue
% which ctags
/usr/local/bin/ctags
% ctags --version
Universal Ctags 0.0.0(44e0c66), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Mar 31 2016, 14:56:40
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +option-directory, +coproc, +xpath
@xolox whoops -- I completely overlooked the date on the your earlier comment, sorry D: disregard my last
@xolox Any possible news on this ? (see @jkrmr message above) I'm currently using https://github.com/Wraul/vim-easytags/commit/f5746bdfd9942b00c349e53f3f4917ae73bb6797 which works correctly
@Bew78LesellB I ended up using the following as a workaround, if it's helpful at all:
" suppress ctags version warning (since universal-ctags)
let g:easytags_suppress_ctags_warning = 1
@xolox
@jkrmr That gets rid of the warning but sadly fails to run the plugin (:UpdateTags
not available etc) and therefore fails to run cats automatically. Running ctags manually (ctags -R
) works fine.
Using the latest universal-ctags version:
Universal Ctags 0.0.0(0d8de20), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Apr 23 2017, 01:55:22
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +option-directory, +coproc, +xpath, +case-insensitive-filenames
Running with exuberant-ctags gives me warnings and fails to work at all (doesn't even work manually):
$ ctags --version
ctags: Warning: unknown regex flag: ' '
ctags: Warning: unknown regex flag: ' '
ctags: Warning: unknown regex flag: ' '
ctags: Warning: unknown regex flag: ' '
ctags: Warning: unknown regex flag: ' '
ctags: Warning: unknown regex flag: ' '
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Sep 13 2016, 04:58:37
Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex
Running latest maxOS Sierra 10.12.4 (16E195)
$ uname -a
Darwin Mollie-2.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
All I can find on tags of any kind are pretty old comments (this thread being the latest almost a year old) -- perhaps there's a mother similar solution people are using these days?
(I don't use vim, so what I write here may be pointless.)
If you have a trouble in output format of ctags, consider to use --output-format=e-ctags
.
These days --output-format
option is added to handle a tag including whitespaces.
The default format (u-ctags) includes the tag.
The classic format (e-uctags) excludes the tag.
Following example shows the difference.
[jet@localhost]% cat /tmp/foo.html
cat /tmp/foo.html
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<h1>abc</h1>
<h1>e f g </h1>
</body>
</html>
[jet@localhost]% ~/var/ctags/ctags --output-format=e-ctags -o - /tmp/foo.html
~/var/ctags/ctags --output-format=e-ctags -o - /tmp/foo.html
abc /tmp/foo.html /^ <h1>abc<\/h1>$/;" h
[jet@localhost]% ~/var/ctags/ctags -o - /tmp/foo.html
~/var/ctags/ctags -o - /tmp/foo.html
abc /tmp/foo.html /^ <h1>abc<\/h1>$/;" h
e f g /tmp/foo.html /^ <h1>e f g <\/h1> $/;" h
For anyone else stumbling upon here I ended up following the vim plugin tagbar
wiki (which is up to date) of using jsctags (and tern which it depends on) and universal-ctags for everything else (CSS etc) -- works great (you don't have to use the vim tag bar plugin but I found that the plugin actually works quite nicely so will probably use it).
https://github.com/majutsushi/tagbar/wiki#jsctags-depends-on-tern--recommended-
I am trying to use universal-ctags, which is more or less exuberant-ctags maintained, so it should be completely compatible. The problem is that easytags considers this version incompatible. This come from the fact that universal-ctags isn't versioned, its version is always "Development".