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

File upload and Progress events with HTML5 XmlHttpRequest Level 2

The XmlHttpRequest Level 2 specification adds several enhancements to the XmlHttpRequest object. Last week I had blogged about cross-origin-requests and how it is different from Flash\Silverlight's approach .  With Level 2 specification one can upload the file to the server by passing the file object to the send method. In this post I'll try to explore uploading file using XmlHttpRequest 2 in conjunction with the progress events. I'll also provide a description on the new HTML5 tag -  progress which can be updated while the file is being uploaded to the server. And of course, some ColdFusion code that will show how the file is accepted and stored on the server directory.

Server sent events with HTML5 and ColdFusion

There are several ways to interact with the server apart from the traditional request\response and refresh all protocol. They are polling, long polling, Ajax and Websockets ( pusherapp ). Of all these Ajax and Websockets have been very popular. There is another way to interact with the server such that the server can send notifications to the client using Server Sent Events (SSE) . SSE is a part of HTML5 spec:  http://dev.w3.org/html5/eventsource/

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.