|
Delphi Tips and Tutorials
Tip #1: Useful shortcut keys within the Delphi IDE
1) BOOKMARKS: SHIFT-CTRL-0 through 9
If you ever need to set a bookmark in the Delphi IDE, try this:
- Move to the point in the code that you know would like to come back to later.
- Press SHIFT-CTRL-1 to set a bookmark. You will see a little box with a "1" in it
appear in the left margin.
- Move elsewhere within the current document.
- Press CTRL-1 and you will be taken back to where you set the bookmark.
You can set 10 bookmarks in this manner, by pressing SHIFT-CTRL-0 up to SHIFT-CTRL-9.
Note however that bookmarks are specific to the current open file, so you can't set a bookmark, switch to another page,
and then expect to go to that bookmark without first switching back to the page you were on.
2) INLINE SEARCH: CTRL-E
Similar to Firefox, you can press CTRL-E within the Delphi IDE, and the words "Searching for:" will appear
in the status bar in the bottom of the window.
You can then type, and Delphi will search for the first instance of what you are typing. You can then press F3 as you
would in a regular search.
3) SWITCHING BETWEEN OPEN FILES: CTRL-TAB
CTRL-TAB often works for switching between pages / tabs / open files in many Windows Applications, but I thought
that this often overlooked key combination was worth a mention here!
4) BLOCK INDENT AND UNINDENT: SHIFT-CTRL-I and SHIFT-CTRL-U
You can indent a whole block of code at once by selecting that block and pressing SHIFT-CTRL-I. The whole
block will indent by the "Block Indent" value in Editor Properties. Perfect for if you want to add
begin and end around a large block of code!
If you decide you have indented too far, SHIFT-CTRL-U has the opposite effect.
As a side note, you can edit how much these shortcut keys indent by selecting Tools -> Editor Properties and
changing the "Block indent" value.
|