Jump to Next/Previous Function Definition

I prefer to browse my code manually rather than using MSVC's Wizard Bar. These simple macros move the cursor up and down one function at a time in a cpp file. This is accomplished by searching for a newline character followed by an open brace ('{'). Simple as they may be, they help me get the cursor where I want it quickly and easily. I map these functions to Ctrl-Page Up and Ctrl-Page Down.

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
End Sub

Sub GotoFunctionHeaderDown()
'DESCRIPTION: Moves cursor to the previous function definition.
	ActiveDocument.Selection.LineDown dsMove, 2
	ActiveDocument.Selection.FindText "^{", dsMatchRegExp
End Sub

Josi Manuel Muilledes suggests using DevStudio commands WBGotoNext and WBGotoPrevious from WizardBar category.

Updated on: October 15, 1998.


  • Why the turf’s most shit actions gears athletes alternative eats headphone

    Posted by motherdhmm on 06/04/2013 04:18pm

    [url=http://www.headphonescheaponlineaustralia.com/]beats by dre Australia[/url] Heinousness headphones in Australia more and more in fashion, more people use thebeats close to Dre, a play up that was seen via some lawbreakers topic opportunities, ergo, followed not later than pronouncement of hoax and chintzy scare off products and markets, to manyconsumers in trouble, to shell out a portion of shin-plasters to corrupt is not trustworthy beats beside dre beats away Dre. Again, if you¡¯re reading this, then you are charmed, the sympathy that the next wish be to introduce, buy authentic beats via dre should be noted that the empathy of these later in the acquiring of a monster headphones you can steal legitimate the. [url=http://blog.cheapbeatsbydre.co.nz/beats-by-dre-headphones]beats by dre headphones[/url] You may also like this Horribleness Turbine Earphones, With a view the callow users, hipop fans and NBA fans, the outward mien is also of the standards in support of a Ghoulishness Beats Dr Dre, and even-tempered a central standard. As a recent emerging in operation in headphone industry, Hideousness products song equal distress on both publication and acoustic. It is not a untypical thing to accede to that Monster Beats Studiobecomes the favourite choice repayment for lots of stars. [url=http://blog.cheapbeatsbydre.co.nz/]beats by dre[/url] These Beats Headphones emit great good efficiency that any at one, from the for the most part joe, to your kinfe like audiophile can certainly value. It includes crystal readable, distortions manumitted rival, calm with high in bulk levels. Dre is currently out there. Any individual searching seeking a credible quality enumerate of beers is effectively supported unmistakeably via most of these earphones. Contribution an staggering array as extravagantly as eminence of submerge, Defeats close to totally Beats by Dr Dre would be the Wireless Bluetooth headphones you give birth to been holding exposed regarding. Drink them all night without the require of distressing with regards to battery or comfort and ease. Put together effortlessly in between phone calls as ok as playing as a consequence of your built-inside microphone along with headphone adjustments.

  • Sigue tu mujer feliz con planchas GHD!

    Posted by hanmeihm on 05/30/2013 06:17pm

    [url=http://www.planchasghdbaratasonline.com/]ghd España[/url] Entonces, qu sigue para GHD Bueno, se ha anunciado que GHD se lanzar¢ otra nueva styler del pelo que van a estar llamando la GHD Rare. La plancha de pelo GHD Rare viene con un acabado negro brillante ser¢ el oro teido placas de cer¢mica. Esto ayuda a que este nuevo Styler se destacan en su lugar concurrido mercado. Adem¢s, como el nuevo negro brillante styler, tambin hay un leopardo de impresin especial estuche y styler bolsa. Todo Comprar GHD Gold ghd Planchas productos se entregan de forma gratuita dentro de Espaa. El envo internacional se realiza a travs del Servicio Internacional Express. Los pedidos se envan normalmente dentro de las 48 horas a partir de la fecha del pedido. [url=http://www.planchasespanaghdtop.net/plancha-pelo-ghd/]ghd outlet[/url] Planchas ghd pelo tena una etiqueta de precio fuerte, mucho ms para que estos alisadores de pelo milagro. Los crculos de famosos y la belleza no poda alabar a este nuevo producto bastante asombroso. reparaciones ghd planchas fue la debe tener. Volver peinar su cabellera es verdaderamente una aclimatacin rpida y sin esfuerzo que le permite a uno llevar a cabo un corte de pelo admirable en ningn momento, as como incluso se puede administrar lo que debera de entrada que una cola de caballo e incluso un moo. [url=http://www.planchasespanaghdtop.net/plancha-pelo-ghd/]baratas ghd outlet[/url] cuando GHD anuncia pequea revolucin que trabaja en una sola vez en el cabello grueso y crespo, lo dice a m.

  • Thanks

    Posted by jackaliger on 04/15/2007 09:32am


  • ThanX~~~

    Posted by Legacy on 04/15/2002 12:00am

    Originally posted by: tomcruse

    nice~~~ ThanX~~~

  • Thank you! Nice work!

    Posted by Legacy on 12/05/2001 12:00am

    Originally posted by: B P

    Thank you for this neat and useful macro.

  • Good work, i was sooo looking for something like this to help with what i am doing

    Posted by Legacy on 10/18/2000 12:00am

    Originally posted by: Jimbo

    Can u plz tell me what command i can use to strore the current procedure name as a string....
    if 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.

  • Great macros

    Posted by Legacy on 09/20/2000 12:00am

    Originally posted by: Peter W. Binsted

    Thank you very much! These work great, I've been trying to get these forever :)

  • I like it

    Posted by Legacy on 08/10/2000 12:00am

    Originally posted by: Jorge L. Diez

    How do I make the start of function the top line.

  • comment on comment from Jos� Manuel Mu�lledes

    Posted by Legacy on 10/15/1998 12:00am

    Originally posted by: Gert Rijs

    The WBGotoNext/Previous commands only work in a file from the
    active project (annoying if you have several projects in one workspace).
    Keith's macro's will work with any open cpp file.

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date