Use ctags along with taglist-plugin ( http://vim.sourceforge.net/scripts/script.php?script_id=273 ). The source ctags package contains an EXTENDING.html file that describes how to determine the extension. I have done this for several languages. Here are two examples (make (1) and POD (perl old document)):
%%%%%%%%%% file '~/.ctags' %%%%%%%%%%%%%%%%%%%% --langmap=perl:+.pod --regex-perl=/^=head1[[:space:]]*(.+)/\1/o,pod/ --regex-perl=/^=head2[[:space:]]*(.+)$/. \1/o,pod/ --regex-perl=/^=head3[[:space:]]*(.+)$/.. \1/o,pod/ --regex-perl=/^=head4[[:space:]]*(.+)$/... \1/o,pod/ --regex-perl=/^=for[[:space:]]+([^:]+):(.*)$/*\1:\2/o,pod/ --regex-perl=/^__(DATA|END)__$/__\1__/l,labels/ --regex-make=/^([^:# \t]+)[ \t]*:($|[^=]+)/\1/t,targets/
To use this with taglist, you need two extra lines in ~ / .vimrc. For the above examples:
%%%%%%%%%% file '~/.vimrc' %%%%%%%%%%%%%%%%%%%% let tlist_perl_settings = 'perl;c:constants;f:formats;l:labels;p:packages;s:subroutines;d:subroutines;o:POD' let tlist_make_settings = 'make;m:makros;t:targets'
This screenshot shows a taglist navigation window with an additional POD section.
source share