sponsor Vim development Vim logo Vim Book Ad

ShowFunc.vim : Creates a list of all tags / functions from a window, all windows or buffers.

 script karma  Rating 224/114, Downloaded by 16225    Comments, bugs, improvements  Vim wiki

created by
Dave Vehrs
script type
This script creates a hyperlink list of all the tags (i.e. functions, subroutines, classes, macros or procedures) from a single buffer, all open windows or buffers and displays them in a dynamically sized cwindow.

Supported File types with Exuberant Ctags version 5.5.4 (and newer):  Asm, Asp, Awk, Beta, C, C++, c#, Cobol, Eiffel, Erlang, Fortran, Java, Javascript, Lisp, Lua, Make, Pascal, Perl, PHP, Python, PL/SQL,  REXX, Ruby, Scheme, Shell, SLang, SML, SQL, Tcl, Vera, Verilog, Vim, YACC......and any user defined (i.e. --regex-lang=) types.

Default Key Mappings:
<F1>    Run scan and open cwindow.
To reassign add the following to your .vimrc:
      map  NewKey   <Plug>ShowFunc
      map! NewKey   <Plug>ShowFunc
For example to change the <F1> mapping to <F7>
      map  <F7>   <Plug>ShowFunc
      map! <F7>   <Plug>ShowFunc

ShowFunc Window commands:
c       Close cwindow.
h       Display help dialog.
r        Refresh.
s       Change file sort, results will appear in either alphabetical or file order.  (Default: file order)
t       Change scan type, results will be from either the current file, all open windows or all open buffers.  (Default: all open buffers)
install details
Put this file in the vim plugins directory (~/.vim/plugin/) to load it automatically, or load it with :so ShowFunc.vim.

You need Exuberant CTags installed for this function to work.
Website: http://ctags.sourceforge.net/
Debian: apt-get install exuberant-ctags

This script grew from an idea posted by Flemming Madsen on vimtip #79.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ShowFunc.vim 1.5.9 2013-02-21 7.0 Dave Vehrs Improved grepformat string.  Set so that F1 toggles the ShowFunc cwindow as suggested by Halkeye on the Vim Tips  Wiki.  Tested bug reported by Dtyall, unable to replicate in the version I use, which already has the fixes suggested.  Sorry I didn't release those sooner.
ShowFunc.vim 1.5.8 2009-07-27 7.0 Dave Vehrs Fixed a C++ file type error thanks to a report from Gynvael Coldwind.
ShowFunc.vim 1.5.7 2006-03-28 6.0 Dave Vehrs Per request by Diederik Van der Boor, added ability to filter the variables kinds that ctags outputs (ver 5.5 or newer).
ShowFunc.vim 1.5.6 2006-02-28 6.0 Dave Vehrs First Vim 7 patches.  Added setlocal statusline support to update the cwindow name.
ShowFunc.vim 1.5.5 2005-07-20 6.0 Dave Vehrs Patches from two Windows users (David Rennalls and Bill McCarthy).  Fixes in cleanup, documentaion, and autocmds.
ShowFunc.vim 1.5.4 2005-01-13 6.0 Dave Vehrs Script cleanup.  Added MyLastWindow function (when closing windows, tests last window to see if its a Cwindow, if it is then close vim session).
ShowFunc.vim 1.5.3 2004-10-15 6.0 Dave Vehrs Fixed custom fold text for cwindow.
ShowFunc.vim 1.5.2 2003-10-06 6.0 Dave Vehrs Improved Exuberant Ctags version checking.
ShowFunc.vim 1.5.1 2003-09-24 6.0 Dave Vehrs Bug fixes
ShowFunc.vim 1.5 2003-09-21 6.0 Dave Vehrs Created a more generic grep format so that explicit type definitions are no longer necessary (eliminating the SetGrepFormat function).  Modified the SetGrepPrg function to detect Ctags versions earlier than 5.5.  Supportted filetypes for Ctags versions 5.4 are statically assigned.  With Ctags versions 5.5 (and later) supported filetypes are detected dynamically (including those defined by regular expressions (--regex-<LANG>).
ShowFunc.vim 1.4.5 2003-04-01 6.0 Dave Vehrs More error handling improvements, including tests for the correct version of ctags, and keymap assignment.  Thanks to Mark Thomas for his assistance in finding and fixing a bug in the executable detection on Windows.  
ShowFunc.vim 1.4.4 2003-03-17 6.0 Dave Vehrs Improved error handling.  Improved SetFoldText().
ShowFunc.vim 1.4.3 2003-03-15 6.0 Dave Vehrs Automatically fold output on filename for multiple file scans (all buffers or windows).  
ShowFunc.vim 1.4.2 2003-03-13 6.0 Dave Vehrs Rewrote the SetGrepFormat and SetGrepPrg functions.  Added support for all tags for all languages (28) that exuberant ctags supports.
ShowFunc.vim 1.4.1 2003-01-19 6.0 Dave Vehrs Fixed multi-window scan display issue. Improved dynamic cwindow sizing.  Added basic help dialog.    
ShowFunc.vim 1.4 2002-12-21 6.0 Dave Vehrs Changed user interface. Eliminated multiple key-mappings.  Pressing F1 runs the default scan, and opens the cwindow.  Scan sort and type can be changed by pressing the s and t keys respectively.  Combined scan type functions into one (ShowFuncOpen) and bought back the all open windows scan.
ShowFunc.vim 1.3 2002-12-01 6.0 Dave Vehrs Fixed buffer display issue (Thanks to vimtip#133). Fixed window height test for TestWinH and OpenCWin.  Changed MultiWin (scans all open windows) to MultiBuf (scans all open buffers). Basic multiple file handling is complete.
ShowFunc.vim 1.3Beta3 2002-11-29 6.0 Dave Vehrs Split SetFileType into two ( SetGrepFormat, and SetGrepPrg ). Set &...&vim to insure proper '\ multiline translation. Added keymapping testing to protect against conflicting with existing user configurations and to make it easy to remap when necessary. Thanks to Luc Hermitte
ShowFunc.vim 1.3Beta2 2002-11-20 6.0 Dave Vehrs Fixed multiple file cwindow refresh issue (grep vs. grepa).  General clean up.
ShowFunc.vim 1.3Beta 2002-11-16 6.0 Dave Vehrs Added multiple file support.  Restructured script.  
ShowFunc.vim 1.2.1 2002-10-17 6.0 Dave Vehrs Added unknown filetype handling.  Added status messages('ShowFunc:').  Fixed key-mappings .  
ShowFunc.vim 1.2 2002-09-22 6.0 Dave Vehrs Fixed redraw bug so that it works with the winmanager plugin (vimscript#95).  
ShowFunc.vim 1.1.3 2002-09-02 6.0 Dave Vehrs Fixed Fortran and Pascal patches, Thanks the Ajit Thakkar, and Engelbert Gruber.
ShowFunc.vim 1.1.1 2002-08-26 6.0 Dave Vehrs ooops.
ShowFunc.vim 1.1 2002-08-26 6.0 Dave Vehrs Patches to Fortran (thanks to Ajit Thakkar), Pascal, and Python support.  
ShowFunc.vim 1.0 2002-08-24 6.0 Dave Vehrs Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo