Skip to main content

Forget the mouse, keyboard shortcuts are here - ColdFusion Builder

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

$${CP}

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.

Comments

  1. Is there a master list of all these keyboard shortcuts? A cheat sheet, so to speak.

    ReplyDelete
  2. @Lola,

    Did you hack my account by any chance :) well, that is my what my next blog post all about and it is coming up very soon.

    ReplyDelete
  3. Nice tip about how to set the cursor position in the newly-inserted text: did not know that.

    ReplyDelete
  4. @Lola,

    I have published a blog post which contains the list and a download link is also provided.

    ReplyDelete
  5. 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. Would you be up for a short chat/Skype Interview?

    Alternatively we prepared a short online poll: http://www.surveymonkey.com/s/ZVSTLY9

    Really looking forward to hear your keyboard shortcut experiences!

    ReplyDelete
  6. Hi

    You've shown $${CP} as a macro for defining the cursor position when creating a shortcut.

    Are there any other macros?

    In particular, I am trying to create a macro to wrap the selected text in (brackets) - and have specified ($${CP}) as the insert text.

    This is however replacing the selected text, rather than wrapping it as excepted...

    How can I achieve this in CFBuilder 2?

    ReplyDelete
  7. @Daniel,

    $${CP} is the only macro that was added. For wrapping the text the keyboard shortcuts cannot be used. As you mentioned, it would replace the selected text.

    For wrapping I would suggest you to try snippets. Open the snippets view and add a snippet. You can define the start block and end block and that would wrap the selected text.

    ReplyDelete
  8. Still no shortcut for FTP upload tho!

    ReplyDelete
  9. @sparky,

    Can you file a enhancement request for this.

    ReplyDelete

Post a Comment

Popular posts from this blog

Adding beforeRender and afterRender functions to a Backbone View

I was working on a Backbone application that updated the DOM when a response was received from the server. In a Backbone View, the initialize method would perform some operations and then call the render method to update the view. This worked fine, however there was scenario where in I wanted to perform some tasks before and after rendering the view. This can be considered as firing an event before and after the function had completed its execution. I found a very simple way to do this with Underscore's wrap method.

De-obfuscating javascript code in Chrome Developer Tools

I had blogged about JavaScript debugging with Chrome Developer Tools  some time back, wherein I have explained how these developer tools can help in debugging javascript code. Today Google Chrome 12 was released and my Chrome browser was updated to this version. As with every release, there have been some improvements made on performance, usability etc,. One feature that stood out for me is the ability to De-obfuscate the javascript code. What is Minification? Minification is the process of removing unnecessary characters such as white spaces, comments, new lines from the source code. These otherwise would be added to make the code more readable. Minifying the source code helps in reducing the file size and thereby reducing the time taken to download the file. This is the reason why most of the popular javascript libraries such as jQuery are minified. A minified jQuery file is of 31 KB in size where as an uncompressed one is about 229 KB. Unfortunately, debugging minified javascript f

On GraphQL and building an application using React Apollo

When I visualize building an application, I would think of using React and Redux on the front-end which talks to a set of RESTful services built with Node and Hapi (or Express). However, over a period of time, I've realized that this approach does not scale well when you add new features to the front-end. For example, consider a page that displays user information along with courses that a user has enrolled in. At a later point, you decide to add a section that displays popular book titles that one can view and purchase. If every entity is considered as a microservice then to get data from three different microservices would require three http  requests to be sent by the front-end app. The performance of the app would degrade with the increase in the number of http requests. I read about GraphQL and knew that it is an ideal way of building an app and I need not look forward to anything else. The GraphQL layer can be viewed as a facade which sits on top of your RESTful services o