Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: vpanayotov on March 10, 2008, 10:42:34 PM

Title: Source code navigation ?
Post by: vpanayotov on March 10, 2008, 10:42:34 PM
Hi everybody,

I want to use the C::B IDE to browse/study source code. A feature that I need is to be able to jump back to the previous location after jump to some definition/declaration in the same or other file. I mean something similar to ctrl-t keyboard shortcut in VIM/ctags.

Is there something similar in C::B?

Best regards,
Vassil
Title: Re: Source code navigation ?
Post by: Jenna on March 10, 2008, 11:00:38 PM
You should have a look at BrowsTracker-Plugin (right mouse-click in editor ...).
Title: Re: Source code navigation ?
Post by: vpanayotov on March 11, 2008, 10:13:14 PM
Thank you for your answer!

I installed the BrowseTracker plugin, but I am not sure that this is what I am looking for. Is it possible to jump back without first setting "browse mark" ? BTW when I try to set browse mark using left click OR ctrl+left click a breakpoint is toggled and the placement of the browse mark is not on the desired source code line.

The browse marks also can't be used to jump between different files/tabs.

Best Regards,
Vassil
Title: Re: Source code navigation ?
Post by: Pecan on March 11, 2008, 10:31:37 PM
Quote from: vpanayotov on March 11, 2008, 10:13:14 PM
Thank you for your answer!

I installed the BrowseTracker plugin, but I am not sure that this is what I am looking for. Is it possible to jump back without first setting "browse mark" ?

No, you must set a mark for the system to see where you want to browse back to.

Quote from: vpanayotov on March 11, 2008, 10:13:14 PM
BTW when I try to set browse mark using left click OR ctrl+left click a breakpoint is toggled and the placement of the browse mark is not on the desired source code line.
Don't click in the margin. Click on the source iine.

Quote from: vpanayotov on March 11, 2008, 10:13:14 PM
The browse marks also can't be used to jump between different files/tabs.

That is correct. But you can jump back and forth with Alt-LeftArrow; and forward with Alt-RightArrow.
Title: Re: Source code navigation ?
Post by: von.hake on January 10, 2011, 09:41:48 AM
Could the shortcuts be somehow assigned to the actions of Browse Tracker plugin like Prev Mark and Next Mark?
Are there still no possibility in C::B to jump back without explicit mark setting ?
Actually for such kind of navigation in one source file only one can use Edit->Bookmarks...
Title: Re: Source code navigation ?
Post by: Pecan on January 10, 2011, 02:12:20 PM
Quote from: vpanayotov on March 11, 2008, 10:13:14 PM
...
Is it possible to jump back without first setting "browse mark" ?
...

Yes, assign a KeyBinder key to View->Jump->Jump Back.

Be sure to click on the page/line you want to jump back to before browsing anywhere else.
Title: Re: Source code navigation ?
Post by: von.hake on January 11, 2011, 10:17:59 AM
Pecan, thanks for your reply.