Author Topic: Source code navigation ?  (Read 4254 times)

vpanayotov

  • Guest
Source code navigation ?
« 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

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Source code navigation ?
« Reply #1 on: March 10, 2008, 11:00:38 pm »
You should have a look at BrowsTracker-Plugin (right mouse-click in editor ...).

vpanayotov

  • Guest
Re: Source code navigation ?
« Reply #2 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
« Last Edit: March 11, 2008, 10:20:38 pm by vpanayotov »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2150
Re: Source code navigation ?
« Reply #3 on: March 11, 2008, 10:31:37 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.

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.

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.
« Last Edit: March 11, 2008, 10:34:30 pm by Pecan »

Offline von.hake

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Source code navigation ?
« Reply #4 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...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2150
Re: Source code navigation ?
« Reply #5 on: January 10, 2011, 02:12:20 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.

Offline von.hake

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Source code navigation ?
« Reply #6 on: January 11, 2011, 10:17:59 am »
Pecan, thanks for your reply.