Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using Code Assist

From: ColdFusion Builder Essential Training

Video: Using Code Assist

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.

Using Code Assist

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 tag at the top or I could put any business logic that used to go before all my presentation code.

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 starting tag. So, that's what the Pair Matching does. Let's go back to the Preferences and continue on. I'll expand the Editor and choose Code Assist. On this screen, I can choose my dictionary version, for example, I am coding with ColdFusion 9. If I have yet to upgrade, I can choose a ColdFusion 8 or MX7 dictionary. So, I only see appropriate tags for that particular version of the language. Below that, I can choose whether or not Code Assist automatically displays as I'm typing, and whether or not SQL Code Assist displays when I am typing.

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 tag, it automatically inserted a closing tag. It also put that closing tag on a new line. I can also have CF Builder append spaces after inserting my selection, so I can immediately start typing attributes that go on that tag. I can have it automatically insert equal signs, and I can determine what types of characters I wanted to use when it quotes attributes. In this case, I am going to leave it on double quotes. Next, I'll move on to the Typing section, which has the rest of our code hinting bits in it.

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.

Show transcript

This video is part of

Image for ColdFusion Builder Essential Training
ColdFusion Builder Essential Training

40 video lessons · 3864 viewers

Daniel Short
Author

 
Expand all | Collapse all
  1. 7m 48s
    1. Welcome
      59s
    2. Installing ColdFusion Builder
      2m 20s
    3. Installing ColdFusion Builder as a plug-in
      3m 18s
    4. Using the exercise files
      1m 11s
  2. 17m 42s
    1. Workspace overview
      2m 25s
    2. Organizing your workspace
      6m 19s
    3. Adding and selecting workspaces
      2m 53s
    4. Installing and managing plug-ins
      6m 5s
  3. 12m 12s
    1. Creating projects
      2m 11s
    2. Importing projects
      2m 48s
    3. Creating project working sets
      2m 23s
    4. Managing projects
      2m 22s
    5. Linking folders
      2m 28s
  4. 23m 2s
    1. Configuring and managing ColdFusion servers
      6m 26s
    2. Using the Services Browser
      4m 15s
    3. Using RDS Dataview and Fileview
      4m 52s
    4. Using FTP
      7m 29s
  5. 18m 10s
    1. Creating editor profiles
      2m 6s
    2. Using Code Assist
      5m 43s
    3. Setting code coloring
      4m 5s
    4. Using shortcut keys
      3m 5s
    5. Working with outlines and syntax checking
      3m 11s
  6. 37m 40s
    1. Using code completion
      7m 25s
    2. Using snippets
      9m 23s
    3. Using SQL editing and the Query Viewer
      5m 55s
    4. Working with components
      7m 27s
    5. Working with variable mapping
      2m 14s
    6. Navigating code and documents
      5m 16s
  7. 13m 12s
    1. Getting set up
      3m 50s
    2. Using the ColdFusion debugger
      5m 37s
    3. Watching logs with Tailview
      3m 45s
  8. 13m 8s
    1. Installing extensions
      4m 5s
    2. Using the CFC Generator extension for ColdFusion 8
      4m 52s
    3. Using the CFC Generator extension for ColdFusion ORM
      4m 11s
  9. 34m 5s
    1. Building a simple contact form extension
      3m 42s
    2. Creating user interfaces
      8m 55s
    3. Packaging the extension
      3m 55s
    4. Building the handler
      8m 10s
    5. Using the Builder extension
      9m 23s
  10. 25s
    1. Goodbye
      25s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed ColdFusion Builder Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.