ludovicchabant / vim-gutentags

A Vim plugin that manages your tag files
https://bolt80.com/gutentags/
MIT License
2.3k stars 175 forks source link

ptags #216

Open roberbnd opened 5 years ago

roberbnd commented 5 years ago

Hi, How can I setup ptags with tags file under .git directory ? I tried but doesn't work.

let g:gutentags_ctags_tagfile='.git/tags' " let g:gutentags_modules='[ptags]' let g:gutentags_ctags_executable='ptags'

This is ptags https://github.com/dalance/ptags

ludovicchabant commented 5 years ago

Oh nice, I didn't know about ptags, thanks for that, I'll give it a try.

What didn't work?

roberbnd commented 5 years ago

This time I have been trying to implement ptags in the plugin taking like base your code of ctags because I thought that is almost the same but it doen't work the command

$PTAGS_EXE -f ~/tags/tags

Now how I have the commands it works in the root directory but if I want to use an argument to select other folder it doesn't work (ptags -f ~/tags/tags works directly in the terminal)

guten

smarquez1 commented 5 years ago

I'm getting an error message using ptags: gutentags: gutentags: ctags job failed, returned: 1 but it still generates the tags file:

let g:gutentags_ctags_executable='ptags'
ludovicchabant commented 5 years ago

Can you do :call gutentags#toggletrace() and try again? Then you can do :messages and get more info about the failure.

smarquez1 commented 5 years ago
gutentags: Wildignore options file is up to date.
gutentags: Running: ['/home/smarquez1/.vim/plugged/vim-gutentags/plat/unix/update_tags.sh', '-e', 'ptags', '-t', 'tags', '-p', '.', '-s', 'new.org', '-o', '/home/smarquez1/.vim/plugged/vim-gutentags/res/ctags_recursive.options', '-l', 'tags.log'
]
gutentags: In:      /home/smarquez1/project
gutentags: [job output]: ['Locking tags file...', 'Removing references to: new.org', 'grep --text -Ev ''^[^^I]+^Inew.org^I'' ''tags'' > ''tags.temp''', 'Running ctags on "new.org"', 'ptags -f "tags.temp"  --options=/home/smarquez1/.vim/plugge
d/vim-gutentags/res/ctags_recursive.options --append "new.org"', '']
gutentags: [job output]: ['error: Found argument ''--append'' which wasn''t expected, or isn''t valid in this context', '', 'USAGE:', '    ptags --file <output>', '', 'For more information try --help', '']
gutentags: [job output]: ['']
gutentags: [job output]: ['']
gutentags: Finished ctags job.
gutentags: ctags job failed, returned: 1
mborejdo commented 4 years ago

+1 for being able to use ptags