The Command Launcher (Part 3)

In this week’s look at the command launcher, we will focus on two functions that display a specialized version of the command launcher:

  1. Insert from clipboard history
  2. Insert snippet

Instead of the typical two panel display where the top panel is the search input field and the lower panel is the search results list, the new view displays a third panel to the right of the results list and below the input field.  The information displayed in this new panel is the full, formatted text associated with the currently selected search result.  Changing the selection in the list will immediately display the associated text in this panel.

You can adjust the size of the font used in the detail panel by modifying the "Appearance/CommandLauncherPreviewFontSize" value.

The following is a representation of this command launcher view:

Clipboard History

Each time that text is copied to the clipboard from within TKE, that text is saved to the clipboard history manager.  You can access this text at any time from the command launcher by entering the keyword "clip", selecting the "Insert from clipboard" item, and pressing the ENTER key.  The entire clipboard history will be displayed in the search results.  You can use the UP or DOWN keys or use the mouse to scroll and select an entry in the list.  You can also begin typing a portion of the copied text to start narrowing down the list of matching entries.  Pressing the RETURN key will automatically insert the selected text into the current editing buffer at the current insertion cursor.

In addition, you can access the clipboard history contents from the command launcher by entering the pound (#) key.  This will display the clipboard history without the preview panel but will allow you to quickly search, select and insert clipboard text in a similar manner as described above.

Snippets

Any snippets that you have associated with the current editing buffer can be inserted into the current editing buffer by entering the associated snippet keyword; however, if you would like to quickly see which snippets you have available and insert them from the command launcher, simply enter "snip", select the "Insert snippet" command and press the RETURN key.  This will display all available snippet keywords in the search results and will display the corresponding snippet text in the detail panel.  You can use the UP or DOWN keys or use the mouse to scroll and select an entry in the list.  You can also begin typing a portion of the snippet keyword to start narrowing down the list of matching entries.  Pressing the RETURN key will automatically insert the selected snippet text into the current editing buffer at the current insertion cursor.

In addition, you can quickly view and insert snippets by invoking the command launcher and entering the semicolon (;) key.  This will display the list of snippet keywords without the preview panel but will allow you to quickly search, select and insert snippet text in a similar manner.

And there you have it.  Two awesome functions to drive your coding productivity to the max, quickly and easily viewable from the command launcher.

Next week, we’ll wrap up the command launcher tips by discussing a few handy, built-in tools to help you get even more done.

To see more information about the TKE code editor, visit http://tke.sourceforge.net

Advertisements
The Command Launcher (Part 3)