13. July 2010 14:33
It happens all the time when we try to multitask while coding. If only there was a call stack for our brains that we could just unwind to find our way back to where we started....
Have you ever become distracted while scrolling through code, or switched to another tab and then forgot what you were working on?
Turns out, there is!
CodeRush includes a feature called "Markers". These are little placeholders, or breadcrumbs, for your cursor location that can be created just before your focus changes to another part of code. When you're done with whatever task distracted you, simply hit ESC (or ALT+End) to collect the most recent marker and your cursor will be returned to exactly where it was when the marker was created.
Sometimes, CodeRush will automatically create markers for you during refactoring and template expansions. These appear as small blue triangles within the newly created code:
When you collect a marker, your cursor will be returned to that location, and an animated Locator Beacon will display on top of the cursor to draw your attention to that spot:
But, you can manually drop your own markers, too, by using ALT+Home. The manually created markers will be red in color:
Some tricks that you can do with markers:
SHIFT+ALT+Home: Drops a marker at the current cursor location and collects the most recent marker (so you can swap between the locations) Thanks Jay Wren for the clarification.
SHIFT+ALT+PgUp: Select text between the current cursor location and the most recently created marker
SHIFT+ESC: Collect the most recent marker and also paste whatever is in the clipboard at that location