Closed Lyude closed 9 years ago
Not to ask a (maybe) obvious question, but does the file ~/Projects/wayland_wacom/weston/src/tags
already exist when you run that command? If not, did you consider setting g:easytags_dynamic_files to 2 as the documentation suggests?
~/Projects/wayland_wacom/weston/src/tags
doesn't exist, but ~/Projects/wayland_wacom/weston/tags
does, and I'm always running gvim with the working directory set to ~/Projects/wayland_wacom/weston/
, so shouldn't that be the directory it searches for the tags
file in?
I think I spotted 'the bug' here. Vim's 'tags' option is quite subtle, it encodes a lot of information in just a few characters. For example a leading ./
means "local to the current buffer" (not the working directory) and a trailing ;
means "search upwards recursively". As the vim-easytags documentation states you should be using exactly this line:
set tags=./tags;
So basically you're missing the trailing ;
. I think adding that should resolve your issue.
Still no go, if I add the ;
, and start with a completely blank (but existent) tags
file in the working directory, all it does is refuse to highlight or update the tags silently. Doing a du -h
of the tags file shows there's nothing written to the file.
Actually, it looks like if I put a tags file I've made myself with exuberant-ctags, having the ;
in the tags option completely breaks it, it doesn't seem to load the tags file at all now, even if it already has tag data written in it.
Two days ago I committed bfe2fed9189be40e729c27aba29544015882b83e which adds verbose logging of tag file selection. Can you update to the latest version, run verbose UpdateTags
and post the updated output here?
I'm at a complete loss as to whether the root cause of this issue you're having is a bug (and of so, in vim-easytags, Vim or Exuberant Ctags?) or an issue with documentation (either on your side or mine ;-) so hopefully the verbose logging will help.
Wow, I'm really sorry it's taken me so long to get back to you on this. I got really busy with school starting up again and forgot all about this. So I've updated easytags to the latest version and the problem's definitely still present. I've ran the command you asked me to run, and here's the output of it:
easytags.vim 3.8.2: Highlighted tags in ~/Projects/wayland_wacom/libinput/src/evdev-tablet.c in 0.018 seconds (using
Python).
Messages maintainer: Bram Moolenaar <Bram@vim.org>
"src/evdev-tablet.c" 702L, 19196C
easytags.vim 3.8.2: Selected global tags file /home/lyudess/.vimtags.
easytags.vim 3.8.2: Executing /usr/bin/exuberant-ctags --fields=+l --c-kinds=+p --c++-kinds=+p --sort=no -f- '--langu
age-force=c++' '/home/lyudess/Projects/wayland_wacom/libinput/src/evdev-tablet.c'.
vim-misc 1.16.1: Generated shell expression: (/usr/bin/exuberant-ctags --fields=+l --c-kinds=+p --c++-kinds=+p --sort
=no -f- '--language-force=c++' '/home/lyudess/Projects/wayland_wacom/libinput/src/evdev-tablet.c') 1>'/tmp/vi6JCVH/8'
2>'/tmp/vi6JCVH/9'
vim-misc 1.16.1: Executing external command using system() function: sh -c '(/usr/bin/exuberant-ctags --fields=+l --c
-kinds=+p --c++-kinds=+p --sort=no -f- '\''--language-force=c++'\'' '\''/home/lyudess/Projects/wayland_wacom/libinput
/src/evdev-tablet.c'\'') 1>'\''/tmp/vi6JCVH/8'\'' 2>'\''/tmp/vi6JCVH/9'\'''
vim-misc 1.16.1: Writing new contents of /home/lyudess/.vimtags to temporary file /home/lyudess/.vimtags.tmp ..
vim-misc 1.16.1: Replacing /home/lyudess/.vimtags with /home/lyudess/.vimtags.tmp ..
vim-misc 1.16.1: Successfully updated /home/lyudess/.vimtags using atomic rename in 0.0053 seconds.
easytags.vim 3.8.2: Updated 28 tags in 0.065 seconds (synchronously).
easytags.vim 3.8.2: Highlighted tags in ~/Projects/wayland_wacom/libinput/src/evdev-tablet.c in 0.018 seconds (using
Python).
This is after putting the following settings in my .vimrc
:
set tags=./.easytags_tags;
let g:easytags_dynamic_files = 1
I literally don't have any other settings related to easytags anywhere in my vimrc. It looks like that easytags just completely ignores the dynamic files setting now.
Ah, oops, I realized as I came back to this that I was supposed to have g:easytags_dynamic_files
set to 2
, so I've tried again with:
set tags=./.easytags_tags;
let g:easytags_dynamic_files = 2
And amazingly, it seems to work perfectly on the latest version, finally! :). Not sure what fixed it, but everything definitely works now. I think we can mark this as closed.
Thanks for the follow up and glad to hear it works now. Happy Vimming!
So I've been dealing with a rather tough to debug issue with Easytags. Right now I have easytags set to use any file named "tags" in the same directory that I'm working in. The issue is however, that easytags seems to refuse to write to the file no matter what I do. Even worse, is it doesn't give any sort of errors or messages whatsoever. Even if I set
vbs
to1
, it shows that easytags only seems to be working with my global tag file for C in~/.vim/tags/c
. No mention is made at all of the dynamic tags file. Here's the settings I have in my .vimrc for Easytags:Here's a sample log of me trying to run
:UpdateTags
, to no avail: