improve perl tags / tagbar

Mon, 25 May 2020 00:23:43 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 25 May 2020 00:23:43 -0400
changeset 872
bc8f07aedeb3
parent 871
cea35eb3af74
child 873
303c3241cb64

improve perl tags / tagbar

.ctags file | annotate | diff | comparison | revisions
.vim/ctags/perl.cnf file | annotate | diff | comparison | revisions
.vim/plugin/tagbar-types.vim file | annotate | diff | comparison | revisions
--- a/.ctags
+++ b/.ctags
@@ -4,9 +4,9 @@
 --exclude=*min.js
 
 --regex-perl=/^\s*has[ \t]+['"]*([A-Za-z_+][A-Za-z0-9_]+)['"]*[ \t]+/\1/a,attribute,attributes/
---regex-perl=/^\s*fun +([0-9a-zA-Z_]+) *[{(]/\1/s,subroutines/
---regex-perl=/^\s*method +([0-9a-zA-Z_]+) *[{(]/\1/m,methods/
---regex-perl=/(['"]?)([0-9a-zA-Z_]+)\1\s+(,|=>)\s+sub\s+[{(]/\2/s,subroutines/
+--regex-perl=/^\s*fun +([A-Za-z_][A-Za-z0-9_]+) *[{(]/\1/s,subroutines/
+--regex-perl=/^\s*method +([A-Za-z_][A-Za-z0-9_]+) *[{(]/\1/m,methods/
+--regex-perl=/^\s*(around|before|after)[ \t]+['"]*([A-Za-z_][A-Za-z0-9_]+)['"]*[ \t]+/\2/x,modifier/
 
 --langdef=Elixir
 --langmap=Elixir:.ex.exs
--- a/.vim/ctags/perl.cnf
+++ b/.vim/ctags/perl.cnf
@@ -6,10 +6,6 @@
 --regex-perl=/^\s*extends[ \t]+['"]*([A-Za-z][A-Za-z0-9:]+)['" \t]*;/\1/e,extends/
 --regex-perl=/^\s*use[ \t]+base[ \t]+['"]*([A-Za-z][A-Za-z0-9:]+)['" \t]*;/\1/e,extends/
 --regex-perl=/^\s*use[ \t]+parent[ \t]+['"]*([A-Za-z][A-Za-z0-9:]+)['" \t]*;/\1/e,extends/
---regex-perl=/^\s*use[ \t]+['"]*([A-Za-z][A-Za-z0-9:]+)['" \t]*;/\1/u,use,uses/
+--regex-perl=/^\s*use[ \t]+Mojo::Base[ \t]+['"]*([A-Za-z][A-Za-z0-9:]+)['" \t]*;/\1/e,extends/
+--regex-perl=/^\s*use[ \t]+['"]*([A-Za-z][A-Za-z0-9:]+)['" \t]*/\1/u,use,uses/
 --regex-perl=/^\s*require[ \t]+['"]*([A-Za-z][A-Za-z0-9:]+)['" \t]*;/\1/r,require,requires/
---regex-perl=/^\s*around[ \t]+['"]*([A-Za-z_][A-Za-z0-9_]+)['"]*[ \t]+/\1/x,around/
---regex-perl=/^\=head1[ \t]+(.+)/- \1/d,pod,Plain Old Documentation/
---regex-perl=/^\=head2[ \t]+(.+)/-- \1/d,pod,Plain Old Documentation/
---regex-perl=/^\=head[3-5][ \t]+(.+)/--- \1/d,pod,Plain Old Documentation/
-
--- a/.vim/plugin/tagbar-types.vim
+++ b/.vim/plugin/tagbar-types.vim
@@ -13,7 +13,7 @@ let g:tagbar_type_perl = {
         \ 'a:attributes',
         \ 'm:methods',
         \ 's:subroutines',
-        \ 'x:around',
+        \ 'x:modifier',
         \ 'l:aliases',
         \ 'd:pod:1:0',
     \ ],

mercurial