Drupal modules are php files with .module file extensions. To generate tags on these files I run ctags with the following langmap settings:
ctags -R --langmap=php:+.module .
This command produces tags file with several tags belonging to .module file. But when I open the taglist window with TlistToggle none of the tags are shown. However, when opening a php file with .php extension, taglist window displays all the tags in a navigation tree.
Do I need to specify somehow to Vim’s taglist plugin that .module file extension belongs to php language?
Update:
I run the following diagnose command described in taglist’s faq:
ctags -f - --format=2 --excmd=pattern --fields=nks test_module.module
The reply is nothing. But when I run this command with a php file it displays a list of tags:
ctags -f - --format=2 --excmd=pattern --fields=nks test_module.php
Both Vim and Emacs will read “editor hints” in the file: text, usually embedded in a comment, that contains commands or settings for the editor to obey when opening the file. You can use that to tell the editor what to do with the file, regardless of the filename.
For hints that will work with both Emacs and Vim, place a comment block at the end of the file:
(Your question doesn’t entail the need to specify character encoding, but this shows how you can combine multiple settings in one comment block.)