Hello,

----- "Toby Walsh" wrote :

> First post to the list so be easy on me. I'm trying to write some
> functions to automate my commenting process in C++. Reading the help,
> I would like to use the motion commands ]m, ]M, [m and/or [M for
> jumping around to starts and ends of function definitions.

The easiest way is to play with a ctags base that uses line numbers.
That's what I use in my refactoring plugin to identify the begin/end of 
functions.

Given the current line, the function lh#dev#find_function_boudaries(line_nb) 
will return various information.
It's from lh#dev, a library plugin dedicated to code analysis.
-> http://code.google.com/p/lh-vim/source/browse/#svn%2Fdev%2Ftrunk

By looking into the function code, you'll see the list of the functions from 
the current file. Then, you'll just have to use it to navigate between all 
functions.

BTW, I also already have a command (:DOX) that builds the doxygen comment for a 
function given its signature:
- parameters (in/out)
- return type
- exception specifications
- ...
 
Install lh-cpp for this feature.
    http://code.google.com/p/lh-vim/wiki/lhCpp_Doxygen

 
HTH,

-- 
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to