9

I'm in folder E:\dir\python_file.py, :pwd shows E:\dir. :e tags opens the tags file I generated with ctags -R.

I've got tags set to what seems reasonable: set tags? shows set tags=./tags,tags;E:\. Verbose set tags shows only my vimrc.

Using :tag method_name throws two errors: E433: No tags file and E426: tag not found: method_name.

I'm on Windows.

1
  • 1
    gvim -u NONE -U NONE has it working fine, so I must just have a plugin doing something weird. May 18, 2015 at 5:44

1 Answer 1

8

wildignore had a trailing comma.

My vimrc had set wildignore=*.png, which had a trailing comma. Changing it do set wildignore=*.png solved my issue.

It turns out, after looking at :set for a while, that ftplugin/python.vim does set wildignore+=*.pyc somewhere, because just set wildignore=*.png, isn't enough to break the tags. So the wildignore that I had, once I opened a .py file, was wildcard=*.png,,*.pyc, and if you open vim with vim -u NONE -U NONE, tags will break.

Vim must do some concatenation adding a comma if the setting isn't empty, but doesn't check for an existing trailing comma. Think I just found a bug.


Turns out it was a bug, and it has since been resolved.

6
  • Doing some testing, using a vimrc with only set wildignore=*.png, isn't enough to cause this, so maybe parsing gets stuck with any trailing comma? May 18, 2015 at 6:11
  • We'll see if it really is a bug code.google.com/p/vim/issues/detail?id=365 May 18, 2015 at 6:41
  • I would claim not a bug. This setting is a comma separated list. Since there is already a trailing comma in the setting it means that an empty item is in the setting. (Whether an empty item means anything is probably dependent on the setting). When you do += on a setting that is a comma separated list it will always add a comma unless it is empty since you are trying to add something to the list. Using the existing comma would remove the empty item. Which is probably unexpected. (:help :set+=) (However the empty item ignoring everything could be a bug)
    – FDinoff
    May 18, 2015 at 17:11
  • @FDinoff that's a good point, there could be a setting which expects an empty item. May 18, 2015 at 18:07
  • @Viet No problem man! Jul 3, 2016 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.