Jeff, I tried my code, but it didn’t work for me with the syntax you use. Could this be a version issue? I am using exuberant ctags version 5.8.
I also changed the regex a bit because quotation marks are optional and you can allow spaces (but nothing more) preceding the has keyword.
Here is what worked for me. I created the $ HOME / .ctags file (it didn’t exist yet, otherwise just add it) with the following line:
Then added a line to .vimrc, as you suggested
let tlist_perl_settings='perl;c:constant;l:label;p:package;s:subroutine;a:attribute'
Now it lists my attributes in Moose modules.
In addition, it’s also useful for me to have information about the parent class, roles and used modules displayed in the taglist, so here is my complete $ HOME / .ctags file:
--regex-perl=/^\s*has\s+['"]?([0-9a-zA-Z_]+)/\1/a,attribute/ --regex-perl=/^\s*with\s+(['"])(.+)\1/\2/r,role/ --regex-perl=/^\s*extends\s+(['"])(.+)\1/\2/e,extends/ --regex-perl=/^\s*use\s+([^ ;]+)/\1/u,use/
and this is what I have .vimrc (you can change the order of tags in a taglist simply by changing the order in tlist_par_settings):
let tlist_perl_settings='perl;u:use;p:package;r:role;e:extends;c:constant;a:attribute;s:subroutine;l:label' let Tlist_Show_One_File = 1
Due to the additional content, I find it useful to use the Tlist_Show_One_File parameter, which causes the taglist to show only the tags of the currently selected file.
To temporarily hide some tags, you can always move the cursor to the tag name and press "zc" (and "zo" to open it again).
tospo
source share