universal ctags user-define syntax override built-in syntax

100 views Asked by At

Universal-ctags does support org files. But its output does not contain Hanji characters. So I define org syntax in ~/.ctags.d/default.ctags.

--regex-Org=/^\*+\s+(\S.*)/\1/h,heading/

It works. But built-in syntax is also in effective. So I get duplicate lines. How to disable built-in syntax?

1

There are 1 answers

0
Masatake YAMATO On BEST ANSWER

Universal Ctags doesn't provide a way to override built-in patterns.

Using uniq command after generating a tags file is one way to eliminate the duplicated entries.

Editing the source code, https://github.com/universal-ctags/ctags/blob/master/optlib/org.ctags (and rebuilding ctags executable) is another way to get the expected tags file.

Changing the source code locally can be trouble when updating the ctags. Making a pull request for your change and merging your change to the upstream source tree is a way to avoid the trouble. As a maintainer of Universal Ctags, I'm waiting for your pull request.