Hello James,
"James Kanze" <[email protected]> :
> I'm currently having to deal with C++ code which uses the
> following coding conventions:
> [...]
> My problem is getting [[ and ]] to advance or go back to the
> next function (or class); the opening braces aren't always in
> column 1; [...] I rather suspect that some parsing of the C++
> itself will be necessary.
> [...]
> Does anyone know of any available solution?
The "simplest" solution will probably consist in assembling a regex from all
the functions that ctags has seen in the current file.
As unfortunately taglist() does not permit to select tags on field values, you
may have a grep the relevant tags file in search of expand('%:t'), keep only
the search commands, join them in a search pattern with \|, and finally search
for the newly built pattern.
Another way will consist in parsing the code in search of (surrounding) pairs
of brackets. A solution should possible for simple cases, but I'm afraid it
won't be perfect.
--
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---