Delphi IDE tricks: Return to previous editor tab
In Delphi, Ctrl+Tab moves forward to the next editor tab. In Visual Studio, Ctrl+Tab is more like Alt+Tab, moving to the tab you were most recently using.
It looks like Delphi actually supports something similar to the Visual Studio behavior — just with a different keystroke. If you press Ctrl+B, Delphi pops up the list of files currently open in the editor, sorted by “most recently focused first” — and when the dialog opens, the second item in the list is selected.

In the screenshot, my current editor tab is SpriteSpecs.pas. Before that, I was working in Screens.pas, and before that, I had done a Project > View Source to edit Tyler.dpr. That’s not the order the tabs are listed above the editor — Ctrl+B shows them in the order I used them last, just like the Alt+Tab window list or Visual Studio’s Ctrl+Tab list. And notice that, when the dialog opens, the second item is selected by default.
So the equivalent of Visual Studio’s Ctrl+Tab would be Ctrl+B, Enter. The equivalent of holding Ctrl down and pressing Tab twice in Visual Studio would be Ctrl+B, Down arrow, Enter. Not bad. Not bad at all.
The only downside is, Ctrl+B only works when the focus is on the editor window. If the focus is in a docked window, MS Visual Studio is nice enough to let you Ctrl+Tab back to the editor. Delphi isn’t so thoughtful; there doesn’t appear to be any reliable way to use the keyboard to get the focus from a docked window back to the editor. (If the current editor tab is a form or frame, you can hit F12 once or twice. Otherwise, reach for that mouse.)
April 25th, 2008 at 1:56 am
I actually prefere how Delphi uses Ctrl+TAB. Both VS and Delphi works well when you only have a few open files, but when you have a lot of open files, I find it much harder to navigate using VS CTRL+TAB behaviour.
Any idea on how to to get Visual Studio to behave the same?
(And while I’m at it, it would be nice to have bookmarks ala Delphi inside Visual Studio)
April 26th, 2008 at 3:54 am
I don’t know how to get a different CTRL+TAB order in Visual Studio, but for having bookmarks and other nice features (as a Delphi keyboard mapping) you can try “DPack” (http://www.usysware.com/dpack/).
Marco