6 Replies Latest reply on May 15, 2017 3:42 PM by Jamo

    Adding keyboard Shortcuts

    MPe-commerce Level 1

      I would like to add coding keyboard shortcuts, but can't find a place to add. For instance: I would like to add "cntrl+p" for "<p></p>" tags to match eclipse shortcut.  I see how to edit existing shortcuts, but not how to add.  Help would be appreciated. Thanks.

        • 1. Re: Adding keyboard Shortcuts
          Christine Panus Level 1

          The Keys settings for Eclipse seem to be related to performing commands within the editor rather than entering specific bits of code (for the most part).

          I've poked around looking for how to make custom short cut keys in eclipse before and I hadn't really found an answer.  However, after an initial adjustment period I did find that the snippets functionality really did meet most if not all of my needs in regards to creating short cuts to code insertion.

          If you open the snippets functionality (Window>Show View>Other -- ColdFusion>Snippets) you can add a snippet for <p></p> and give it a trigger text (for example the letter p) then you type p and hit ctrl-j and your paragraph tag will be created.

           

          Be aware there is currently a bug report in for snippets.  you must look at the snippets tab once per load of the application before the trigger text/short cut key will work.  http://cfbugs.adobe.com/bugreport/flexbugui/cfbugtracker/main.html#bugId=77874

           

          If you find the snippet functionality will meet your needs, please vote for the bug above.  Even though it has a pretty trivial work around, its kind of annoying when you forget *grin*


          Thanks,

          Christine

          • 3. Re: Adding keyboard Shortcuts
            ksiy

            I just wanted to echo MPe-commerce feedback on shortcuts. I was hoping ColdFusion Builder would inherit the Homesite ones that were so efficient (CTRL+B for <STRONG>, CTRL+I for <EM>, CTRL+SHIFT+P for <P>, etc.), but it seems to be an evolution of CFEclipse rather than a combination of Eclipse & Homesite. The snippets are pretty fast once you get used to them, but the extra keystroke adds up. Hopefully it's not too late to add this in!

            • 4. Re: Adding keyboard Shortcuts
              Adobe Community Professional & MVP

              Well, there's good news and bad news on the shortcut front, with respect to making things "more like" another favored editor. You've heard how you could at least create snippets, but I agree that just getting familiar key combinations to work would be nice.

               

              So the good news is that there is in fact a feature to set profiles in CFBuilder, and in fact there is already support for different editors. See window>preferences>coldfusion>editor profiles, where you can select among default, cfeclipse, and dreamweaver. So far so good.

               

              This affects the keystrokes as set in window>preferences>coldfusion>editor profiles>editor>keys, which include things like wrapping code in comments, quotes, pound signs, etc. You'll see that those do change to different values for each profile selected.

               

              Now the bad news: there's no interface feature for us to modify these ourselves. It seems a read-only interface, unlike the keys feature in the general>keys preference feature. It would be nice not only to be able to change these, but for folks to be able to share them.

               

              Again, I do realize there's the snippets feature, but I don't want to have to use ctrl-J to get the code I want. I (like others in this thread) want to use favored key combinations, or better yet, would like either Adobe to have provided them or for us, as a community, to be able to share them amongst ourselves. I've searched the CFBuilder files to find any reference to the phrases in that window, and I find none that is editable.

               

              Any thoughts, anyone?

               

              /charlie

              • 5. Re: Adding keyboard Shortcuts
                Jamo Level 2

                I'm working on some AutoHotKey shortcuts to port/remap HomeSite & ColdFusion Studio hotkeys to ColdFusion Builder 2016 (well, any text-based program... Notepad, Outlook, web-based textarea field, etc).  Most autohotkey macros will simply trigger existing CB2016 hotkeys.

                 

                NOTE: I'm doing this because I started development using Homesite before both Macromedia and Adobe purcahsed it.  Many of the pre-existing hotkeys were used in ColdFusion Studio, are easier to remember and shorter than the CTRL+T plus another key press trigger.  (Using AutoHotKey means that I can use these shortcuts in other IDEs too.)

                 

                Here are some simple hotkey examples I have started with.  I'll add a blog post in the near future.

                 

                AutoHotKey Code

                Function/Hotkey

                F3::^kFind Next F3
                ^g::^lGo To Line CTRL+G
                ^+>:: Send %A_Tab%Indent Selected Code Block CTRL+SHIFT+>
                ^+<:: Send +%A_Tab%Unindent Selected Code Block CTRL+SHIFT+<
                ^+p:: Send ^tpInsert p tag CTRL+SHIFT+P
                • 6. Re: Adding keyboard Shortcuts
                  Jamo Level 2

                  If you install AutoHotKey (free), you can add the following shortcuts (from Gist), ColdFusion Builder 2016 should more closely emulate HomeSite where it can.

                  http://www.autohotkey.com/

                   

                  HomeSite and ColdFusion Studio AutoHotKey Shortcuts for ColdFusion Builder 2016

                  https://gist.github.com/JamoCA/bb5ea4dcc3b06f3d35fc1426d3d5b105