Vim Tips Wiki
(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
No edit summary
Tag: sourceedit
Line 2: Line 2:
   
 
==Comments==
 
==Comments==
  +
  +
Last version from 2012-01-07 has a bug, that detects function named 's' in this line: functions(). Please change line 304
  +
<pre>
  +
" from:
  +
let l:matched = matchlist(l:line,'\s*function\s*[*&]*\([a-zA-Z0-9_]*\)\s*(')
  +
" to:
  +
let l:matched = matchlist(l:line,'\s*function\s\+[*&]*\([a-zA-Z0-9_]*\)\s*(')
  +
</pre>
  +
  +
 
Great script. I extended your regex to support perl scripts as well by changing line 188:
 
Great script. I extended your regex to support perl scripts as well by changing line 188:
 
<pre>
 
<pre>

Revision as of 09:24, 25 March 2015

Use this page to discuss script 3681 functiontracker: easy navigation between functions in a long file

  • 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

Last version from 2012-01-07 has a bug, that detects function named 's' in this line: functions(). Please change line 304

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


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



Spectacular script. Seems to kill my 'o' functionality in vim 7.3. It messed up the autoindent. Looked like it was something in oninsertchange. Worked around by returning immediately from oninsertchange.

Another line 188 for C files

" to:
let l:matched = matchlist(l:line,'\s*\w\+\s\+\(\w\+\)\s*[*]\?\s*([a-zA-Z0-9_, *]*)\s*{')