On 19/12/2009 12:05, Reckoner wrote:
> I use :g/pattern/p frequently to see where functions are used in a
> very large program. It would be very helpful to be able to see the
> output of this in a separate buffer with corresponding syntax
> highlighting.
>
> Is this possible? Is there a plug-in for this?

You might want to give the Tag List plugin a try:

<http://vim-taglist.sourceforge.net/>

 From its "Features" page:

> The taglist plugin provides the following features:
>
>     * Displays the tags (functions, classes, structures, variables, etc.) 
> defined in a file in a vertically or horizontally split Vim window.
>     * In GUI Vim, optionally displays the tags in the Tags drop-down menu and 
> in the popup menu.
>     * Automatically updates the taglist window as you switch between 
> files/buffers. As you open new files, the tags defined in the new files are 
> added to the existing file list and the tags defined in all the files are 
> displayed grouped by the filename.
>     * When a tag name is selected from the taglist window, positions the 
> cursor at the definition of the tag in the source file.
>     * Automatically highlights the current tag name.
>     * Groups the tags by their type and displays them in a foldable tree.
>     * Can display the prototype and scope of a tag.
>     * Can optionally display the tag prototype instead of the tag name in the 
> taglist window.
>     * The tag list can be sorted either by name or by chronological order.
>     * Supports the following language files:
>           o Assembly, ASP, Awk, Beta, C, C++, C#, Cobol, Eiffel, Erlang, 
> Fortran, HTML, Java, Javascript, Lisp, Lua, Make, Pascal, Perl, PHP, Python, 
> Rexx, Ruby, Scheme, Shell, Slang, SML, Sql, TCL, Verilog, Vim and Yacc.
>     * Can be easily extended to support new languages. Support for existing 
> languages can be modified easily.
>     * Provides functions to display the current tag name in the Vim status 
> line or the window title bar.
>     * The list of tags and files in the taglist can be saved and restored 
> across Vim sessions.
>     * Provides commands to get the name and prototype of the current tag.
>     * Runs in both console/terminal and GUI versions of Vim.
>     * Works with the winmanager plugin. Using the winmanager plugin, you can 
> use Vim plugins like the file explorer, buffer explorer and the taglist 
> plugin at the same time like an IDE.
>     * Can be used in both Unix and MS-Windows systems.

You'll need to have ctags installed as well for Tag List to work, but 
it's very much worth it, IMHO.

-- 
John O'Shea
Wordbank Limited
33 Charlotte Street, London W1T 1RR
Direct line: +44 (0) 20 7903 8829
Fax: +44 (0) 20 7903 8888
<http://www.wordbank.com/>

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to