Vim Tips Wiki
Advertisement

Use this page to discuss script 3681 3681

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Comments

Great script. I extended your regex to support perl scripts as well by changing line 188:

" from:
let l:matched = matchlist(l:line,'\s*function\s\+[*&]*\([a-zA-Z0-9_]*\)\s*(')
" to:
let l:matched = matchlist(l:line,'\s*\%(function\|sub\)\s\+[*&]*\([a-zA-Z0-9_]*\)\s*[({]')

tx for your original work

Advertisement