Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
When working day-to-day you'll live and die by CF Builder's Code Assist features, so take some time to get them right. Let's look at the Code Assist Preferences and then I'll walk you through all the various settings. To get your Preferences on the Mac, choose the ColdFusion Builder menu and select Preferences. If you are using Windows, the Preferences menu is under the Window menu. Inside the Preferences, under the ColdFusion node and Editor Profiles, choose Editor. This first section is pretty simple. At the top, we have our Pair Matching preferences. This determines how ColdFusion Builder will show you matching pairs, parentheses, tags, brackets, et cetera.
You can choose the color you want to highlight these pairs, and choose whether you want it to match pairs at all. Highlight only the matching element you don't have selected, or highlight the entire pair. I'll show you how that works in just a moment. Below the Pair Matching, you can choose to either display or hide the CFML toolbar and you can also elect to trim spaces before saving a file, which I like to do to keep all the end of my lines nice and clean. Below this, is a nice looking button that says Optimize editor preferences. If you click that button, be sure you read this dialog completely.
This will change your current preferences to make the editor work as fast as
possible, but you won't be able to undo these changes and they will overwrite
all of your existing profile settings.
So, if you are going to use this, make sure you save your existing profile
before creating a new one for these fast editing preferences.
So, I am going to click No here and we'll continue on with the dialog.
Below that section, you can set some default file content for CFM and CFC files.
I'll like all of my CFM files to have a
I also like to have a description of the file at the top, so when I come back to this file six months from now, I'll actually know what it's suppose to do. So, I now have some initial CFM content and I'll apply my settings and click OK, and let's see how this works. Under the Chapter4 folder I'll right- click, choose New, and ColdFusion Page. I'll give my file a name. Let's call it FileTest and click Finish. We can see my file now has my default content in it. If I place my cursor at the end of this comment, I can see that it matches up the start and the end comment with this highlight.
If I place my cursor inside of my tag it also highlights my matching
If I have these options unchecked, I'll need to press Ctrl and Spacebar in order to get the Code Assist to display. That keyboard shortcut is the same for both Mac and Windows. I can also choose the Delay Before Code Assist Displays. I am a fairly fast typer, so I'll like my Code Assist to come up as fast as I type. So, I use to change that to 50 milliseconds instead of 500. Moving on to the Auto-Insertion section, this first one looks a little bit confusing but is actually pretty slick. This one allow me to automatically insert a tag if there is only one suggestion for what that tag could be.
Let me show you how that works. I'll check Automatically Insert a Single Proposal, click Apply and OK. In my code, I am going to start by typing a cf function tag. So, I'll do cff and press Ctrl and Spacebar. Now you will see that I have cffeed, cffile, cffileupload, et cetera. If I type the letter U, there is now only one matching tag that starts with those letters. If I press Ctrl and Spacebar, it will automatically insert that tag and it's matching end tag, if my Code Assist preferences are set to do.
Let's go back into the preferences and look at the rest of that dialog.
Now as you saw from my
Here, we are going to have CF Builder automatically insert closing double quotes, single quotes, brackets, or pound signs, so that when we type the pound sign, it will add its matching closing pound sign. Then lastly, we can determine when we want CF Builder to insert our closing tags. In my case, I'd like you to end the tag when I finish typing the start tag. Now there is one other section, that isn't really to do with code assisting but does help when you are going through and using the editor on a daily basis. So, I am going to type-in Editor here and go to the General Editors section and then the Text Editors.
Here, I can determine whether or not I wanted to insert spaces for tabs. Highlight current lines. What I am really after here is to show line numbers. I can also determine whether I wanted to show whitespace characters and a few other common Code Assist settings. So, I am going to click Apply, and you can see my line numbers have now shown up and I'll click OK. You'll notice now that we're through with all of these options that Adobe kindly turned nearly everything on for you by default. If you find that CF Builder is being a bit too helpful for your tastes, just head-back to the Preferences and start unchecking boxes.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 100089 Viewers
56 Video lessons · 113132 Viewers
71 Video lessons · 81994 Viewers
131 Video lessons · 39340 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.