Closed AmaiKinono closed 3 years ago
If we have a command edittags
, does it help you?
$ edittags -i --rewrite-ptag TAG_PROC_CWD=$(pwd) tags
-i has the same effect of -i in sed.
If we have a command
edittags
, does it help you?
It would definitely help, but implementing edittags
for this one purpose is a little bit overkill.
Letting Citre guess cwd works for our directory structure. If one day this couldn't fulfill our need, I'll see if sed can help.
edittags
is not only for this purpose.
I have been thinking about edittags and linktags. However, I didn't write it because there is no real user. I like adding a new feature. However, in some cases, such attitude of the project maintainer is good for the project. So I always wait for a real need for the feature I would like to add. I found one need for edittags in this issue:-)
Let's assume we have edittags command already. I wonder what kind of features and what kind of command line interface edittags should provide. I never promise implementing it now. However, you have fastpath ticket!
I happen to know a use case: http://blog.binchen.org/posts/javascript-code-navigation-in-counsel-etags.html
Let me explain the idea (but keep in mind I don't know javascript well).
The author did the following things:
js2-mode
called js2-print-json-path
. It gets the JSON path of the properties.Edittags can do step 3 for a (ctags format) tags file.
See https://github.com/AmaiKinono/citre/issues/58#issuecomment-849371758 for the idea.
Now a problem is:
TAG_PROC_CWD
is recorded in the tags files, so apparently the relevant test cases will only pass on my PC, unless the tags files are regenerated.I'm thinking about suppress this ptag. Since Citre could guess the CWD without this ptag, this shouldn't cause any problem. And, we create a dedicated test case to test
TAG_PROC_CWD
related things, where we "hand craft" a tags file.