Jump to Next/Previous Function Definition
Posted
by Keith Bussell, Josi Manuel Muilledes
on October 15th, 1998
Note: They do not work with functions that have the open brace on the function definition line.
Sub GotoFunctionHeaderUp()
'DESCRIPTION: Moves cursor to the previous function definition.
ActiveDocument.Selection.FindText "^{", dsMatchBackward + dsMatchRegExp
ActiveDocument.Selection.LineUp
ActiveDocument.Selection.StartOfLine
End Sub
Sub GotoFunctionHeaderDown()
'DESCRIPTION: Moves cursor to the previous function definition.
ActiveDocument.Selection.LineDown dsMove, 2
ActiveDocument.Selection.FindText "^{", dsMatchRegExp
ActiveDocument.Selection.LineUp
ActiveDocument.Selection.StartOfLine
End Sub
Josi Manuel Muilledes suggests using DevStudio commands WBGotoNext and WBGotoPrevious from WizardBar category.
Updated on: October 15, 1998.

Comments
Thanks
Posted by jackaliger on 04/15/2007 09:32amThanks
ReplyThanX~~~
Posted by Legacy on 04/15/2002 12:00amOriginally posted by: tomcruse
nice~~~ ThanX~~~
Reply
Thank you! Nice work!
Posted by Legacy on 12/05/2001 12:00amOriginally posted by: B P
Thank you for this neat and useful macro.
ReplyGood work, i was sooo looking for something like this to help with what i am doing
Posted by Legacy on 10/18/2000 12:00amOriginally posted by: Jimbo
Can u plz tell me what command i can use to strore the current procedure name as a string....
Replyif i use that function to get to the start of it, how do i then "select" that line?
(i wanna read in all the parameters of a function, so i can determine if they are inputs or outputs, and then generate a function header, to save me making a comment header my self for every function)
thank you.
-Jim
Great macros
Posted by Legacy on 09/20/2000 12:00amOriginally posted by: Peter W. Binsted
Thank you very much! These work great, I've been trying to get these forever :)
ReplyI like it
Posted by Legacy on 08/10/2000 12:00amOriginally posted by: Jorge L. Diez
How do I make the start of function the top line.
Replycomment on comment from Jos� Manuel Mu�lledes
Posted by Legacy on 10/15/1998 12:00amOriginally posted by: Gert Rijs
The WBGotoNext/Previous commands only work in a file from the
Replyactive project (annoying if you have several projects in one workspace).
Keith's macro's will work with any open cpp file.