When working in a Drupal 8 project and using the PHPComplete plugin for omi completion I am see the following error.
Error detected while processing function phpcomplete#CompletePHP..phpcomplete#GetCurrentNameSpace..phpcomplete#GetTaglist:
line 21:
E431: Format error in tags file "/Users/kepford/bin/dotfiles/vim/bundle/vimrc/bundle/vim-plugin-for-drupal/tagfiles/drupal8.tags"
Press ENTER or type command to continue
Error detected while processing function phpcomplete#CompletePHP..phpcomplete#GetCurrentNameSpace..phpcomplete#GetTaglist:
line 21:
Before byte 648011
Press ENTER or type command to continue
I have confirmed that PHPComplete is working properly by testing it in other PHP projects such as Sculpin. I also deleted the drupal8.tags file and completion actually worked.

| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2781733-omni-completion-error-6.patch | 1.35 KB | benjifisher |
| #4 | phpcomplete-ok.png | 25.3 KB | Metal3d |
| #3 | phpcomplete.png | 31.28 KB | kepford |
Comments
Comment #2
kepford commentedComment #3
kepford commentedComment #4
Metal3d commentedI have exactly the same problem and finding a solution about drupal8.tags that have too long lines. The lines referencing CKEDITOR are very too long. So, I opened drupal8.tags file and I called:
The resulting file has now no CKEDITOR references and no blank lines. Then, it works:
Comment #5
kepford commentedThat seem's to have resolved the issue for me. I'll run this for a while and one of us can submit a patch :) Thanks @Metal3d
Comment #6
benjifisherThanks for reporting and diagnosing the problem. The tags file for D8 includes tags for several minified javascript files, and ctags generates very long lines from these. The attached patch updates the
drush vimrc-tag-gencommand to exclude those. (It also fixes an embarrassing mistake, where I used+=instead ofarray_merge()on simple arrays.) Besides files named "*.min.js" or "*-min.js", we now exclude "*/ckeditor/lang/*.js", from which ctags generates the long lines that you noticed.If you have
ctagsinstalled on your system (brew install ctagsif you use a Mac and Homebrew) then you can test this patch withI have already updated the tags files included with this project: see #2840859: Update tags files for Drupal 8.2.4, 7.53, and 6.38.
Comment #9
rodrigoaguileraI tried to reproduce the issue by doing the following:
1 - Without applying the patch: open core/modules/user/src/Plugin/Block/UserLoginBlock.php and do omnicompletion (C-x C-o) in front of "$this->" and I can see suggestions for 2 methods and 1 variable.
2 - On a drupal 8 root run "drush -v tags --include-js=yes --include-test=yes --make-portable". This generates a "tags" file that I use to overwrite bundle/vim-plugin-for-drupal/tagfiles/drupal8.tags
3 - Now I have a drupal8.tags with long lines and I try step 1 with same results but I expect a failure.
4 - I install phpcomplete.vim and repeat step 1 with same results. I expected that by installing this plugin I could see methods from the class I am extending but I guess that needs generating a different ctags.
5- Instead of generating the tags file I reverted to and old version with "git checkout 971eeb6 bundle/vim-plugin-for-drupal/tagfiles/drupal8.tags" and I was able to reproduce it. This difference is probably because I am using ctags 5.9~svn20110310-11 from debian stretch and the drupal8.tags file states that is being generated with ctags 5.8.
I can confirm that applying the patch generates a tags file without the long lines.
Supertab also autocompletes fine including all words from the drupal8.tags file.
Thanks for for your help.