My name is Sagar Ganatra and I'm from Bangalore, India. I'm currently employed with Adobe India and I work there as a ColdFusion Engineer. At Adobe, I have worked on various features of ColdFusion and ColdFusion Builder. I'm very much passionate of web technologies and have a very good understanding of jQuery, Flex, HTML5, Java and of course ColdFusion. Sagar H is a DZone MVB and is not an employee of DZone and has posted 43 posts at DZone. You can read more from them at their website. View Full User Profile

Forget the mouse, keyboard shortcuts are here - ColdFusion Builder

05.21.2011
| 6010 views |
  • submit to reddit
ColdFuison Builder 2.0 is all about productivity, it has introduced a lot of keyboard shortcuts, about 42 of them. Shortcuts have been provided for inserting text, invoking wizards, shortcuts for all new editor features and shortcuts for Extensions. Want to define a keyboard shortcut for a piece of code? Possible. Not only that, you can also Export and Import the keyboard shortcuts, so that you need not redo the task of defining a list of keyboard shortcuts on a different installation.

What comes with ColdFusion Builder 2.0?

You get 42 keyboard shortcuts and I know remembering all of these 42 keyboard shortcuts seems to be a daunting task, but the way these keyboard shortcuts have been designed doesn't require you to remember each and every shortcut. The keyboard shortcuts have been grouped into three categories: Insert options, Wizard options and the Extensions options. Each of these categories start with a key combination. For example the Insert options start with CTRL + T and when you press this key a list of keyboard shortcuts will be shown at the bottom right corner of the screen. The same goes with Wizards (CTRL + ALT + W) and Extensions (CTRL + SHIFT + E).

You can refer to all the keyboard shortcuts by navigating to Windows -> Preferences -> ColdFusion -> Profiles -> Keys.


This list also includes some special keyboard shortcuts, these are used to perform some specific editor functionality. For example the shortcut key for 'Jump to the matching tag' is CTRL + ALT + M, 'Code Folding' it is CTRL + ALT + F. It is easy remember these as well; M for 'Matching tag' and 'F' for 'Code Folding'.

Example:
Press CTRL + T and you should get a list of keyboard shortcuts at the bottom right corner of the screen:


As you can see the above list shows all the Insert options and all of them start with the key combination CTRL +T. Now to insert say a cfscript tag, press CTRL + T and then press S. Please note it is not CTRL + T + S, one is required to press CTRL + T and then press S. Also, one need not wait for the popup to come up, just press the associated key and the action would be performed.

It is also possible to change the key binding for any of these keyboard shortcuts. Navigate to the Keyboard shortcut preferences, click on the shortcut key that you want to change and update the key binding in the section below the list.

Define your own keyboard shortcut

To define your own keyboard shortcut navigate to the keyboard shortcut preferences and click on 'Add' button. This would enable the section for defining your shortcut key, enter any name, provide a description (not mandatory) and then provide the key binding. If the provided key binding conflicts with any of the key bindings then the conflict section would be shown listing the shortcut keys with which the key binding conflicts. User will not be able to save the shortcut key until the conflicts are resolved. After providing a valid key binding, provide the text that you would like to insert and then click the 'Save' button. This would save the custom key binding and the same would be shown in the list.

It is also possible to define the cursor position once the text is inserted i.e. while providing the 'Insert text' if one adds the macro $${CP}, the cursor would placed at this position.

For example, if the 'Insert text' is say
<cfmail from="admin@mysite.com" subject="Test mail" to="admin@mysite.com">
$${CP}
</cfmail>
and once the text is inserted the cursor would be placed at $${CP}.

Export and Import Keyboard shortcuts

If you have defined several keyboard shortcuts, it would be a big pain to do the same on a different installation. However, with the Export\Import functionality one can export the keyboard shortcut definitions to a csv file and import the same in a different installation.
References
Published at DZone with permission of Sagar H Ganatra, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Emma Watson replied on Fri, 2012/03/30 - 6:12am

Hi Guys, this looks like a major improvement for the builder. I am not experienced with cold fusion myself, but we research how people find and learn shortcuts.

Swing

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.