If you are using Moose and Vim is your editor of choice then this might be of interest to you. The taglist plugin is very useful but it doesn't support Moose attributes out of the box. I just searched for a solution, found this and expanded it a bit.

Here is what I did to get attribute tags in the taglist plugin:
If it doesn't exist, create a file $HOME/.ctags with the following content:

--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/
Only the first line is required to get the attributes. I also like to list the parent and role classes and all "used" classes, which is what the other lines do.

Then add to your $HOME/.vimrc:

let tlist_perl_settings='perl;u:use;p:package;r:role;e:extends;c:c +onstant;a:attribute;s:subroutine;l:label'
Remove the "u:use, r:role, e:extends" if you don't want them. I also found it useful to add:
let Tlist_Show_One_File = 1
So only the tags of the current file are shown.

Replies are listed 'Best First'.
Re: Moose attributes as tags in Vim
by Anonymous Monk on Aug 31, 2010 at 15:45 UTC
    Any Emacs equivalent ?
      E-what??? :-)
      Sorry, I don't use Emacs very much but I think I used to have a plugin for exuberant ctags in Emacs once. The first part (define regexes for attributes etc. in .ctags file) will be the same as what I described but then you have to find out how to get the Emacs plugin to display those new tags.
      Emacs masters please comment....