I have a my own custom format .dan files for a vim plugin I am developing, and ctags is working like a charm.
The tag file generated looks something like
o#5m nodejs.dan /^ outgoingMessage.write(chunk[, encoding][, callback]) <L=o#5m>#<\/L><I=o#5m> $/;" i
o#5n nodejs.dan /^ http.METHODS <L=o#5n>#<\/L><I=o#5n> $/;" i
o#5o nodejs.dan /^ http.STATUS_CODES <L=o#5o>#<\/L><I=o#5o> $/;" i
o#5p nodejs.dan /^ http.createServer([options][, requestListener]) <L=o#5p>#<\/L><I=o#5p> $/;" i
And in the file I will have
http.createServer([options][, requestListener]) <L=o#5p>#</L><I=o#5p>
That will match in vim :tag o#5p
The issue is that in this format the user is expected to add some string to it so for instance the previous line may be altered to
http.createServer([options][, requestListener]) <L=o#5p>#</L><I=o#5p> (X)
In which now doing :tag o#5p wont be working anymore ,without regenerating the .ctags file with something like (\s\(X\)){0,1}$ at the end of the tag definition
But the files are incredibly long , so full of tags, that I dont want the user to have to re-generate the tagfile for each simple change.
The user is neither not meant to alter the file for anything else , just adding these (X) at the end of some lines.
So I was looking into just manipulating the tagfile with sed , adding the following
o#5o nodejs.dan /^ http.STATUS_CODES <L=o#5o>#<\/L><I=o#5o> (\s\(X\)){0,1}$/;" i
o#5p nodejs.dan /^ http.createServer([options][, requestListener]) <L=o#5p>#<\/L><I=o#5p> (\s\(X\)){0,1}$/;" i
But that just doesn't work.
I dont understand actually what it is allowed on that tagfile , as pattern , as I see it shouldnt be a normal Regex as it has generated unescapped () [] / .
Do you see any posibility to do this manually?
I have a my own custom format
.danfiles for a vim plugin I am developing, andctagsis working like a charm.The tag file generated looks something like
And in the file I will have
That will match in vim
:tag o#5pThe issue is that in this format the user is expected to add some string to it so for instance the previous line may be altered to
In which now doing
:tag o#5pwont be working anymore ,without regenerating the .ctags file with something like(\s\(X\)){0,1}$at the end of the tag definitionBut the files are incredibly long , so full of tags, that I dont want the user to have to re-generate the tagfile for each simple change.
The user is neither not meant to alter the file for anything else , just adding these
(X)at the end of some lines.So I was looking into just manipulating the tagfile with sed , adding the following
But that just doesn't work.
I dont understand actually what it is allowed on that tagfile , as pattern , as I see it shouldnt be a normal Regex as it has generated unescapped () [] / .
Do you see any posibility to do this manually?