• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 38. Working with Source Code in ... > Setting Source Code Preferences

Setting Source Code Preferences

The Source Preferences window controls how the Source Code Editors and JavaScript Editor display their respective code. You can set theme preferences so you can easily switch to preferred methods of viewing source code and JavaScript based on settings you create:

Choose Edit, Preferences in Windows or GoLive, Preferences on the Mac to display the Preferences dialog.

Click on Source in the category column to display the source code preferences, as shown in Figure 38.7.

Figure 38.7. Set the general Source preferences in the Preferences dialog.

To control how the Source Code and JavaScript Editors work, set the following preferences:

  • Enable Dragging for Marked Text: Select some text and drag it to another location or disable this feature.

  • Line Numbers: Automatically display line numbers to the left of the source code or JavaScript code by default. You can toggle this feature on and off using the toolbar at the top of the Source Code Editor.

  • Auto Indent: Automatically indent lines of text that wrap and cascade indents source code elements that are nested.

  • Word Wrap: Wrap the source code to the window width in both the Source Code Editor and the JavaScript Editor by default. You can toggle this feature on and off using the toolbar at the top of the Source Code Editor.

  • Tab Size: Set the size of the automatic indent and also control the number of spaces inserted when you type the Tab key.

  • Default Theme: The default theme for displaying source code in the Source Code Editor and JavaScript Editor. You can override this setting using the toolbar at the top of the respective editors.

  • Print Theme: Set the default code formatting for the Source Code Editor and JavaScript Editor when the code is printed to a printer. The Print Theme can be set different from the display theme so you can see your code one way and print it another.

To define your own themes or to modify the existing themes, click the triangle to the left of the Source category in the Preferences dialog box and click Themes, as shown in Figure 38.8.

Figure 38.8. The Themes preferences enable you to customize the source code themes.

Select an existing theme from the Theme pop-up menu or choose one of the Custom theme options from the same menu. Set the other formatting options offered in the Themes preferences. All the settings in this dialog are purely for display purposes and do not affect the actual syntax of your code. You can customize the visual display of code by setting the color, size, and style of the text.

GoLive's Code Completion feature can be quite helpful, especially if you're relatively new to HTML code. It's also helpful because it offers all the available coding options, maybe even some you were unaware of. On the downside, if you know what you want to type and you're used to coding by hand, the Code Completion feature can be an annoyance. That's why you can choose whether to enable or disable the Code Completion feature in the Preferences window.

Click on Syntax in the category list to control the options for syntax checking, as shown in Figure 38.9:

  • Enable Code Completion: Have GoLive intuitively complete your code for you when you begin typing.

  • Enable Immediate Completion: Have GoLive insert end tags automatically. Be careful when this is turned on, because it automatically inserts them after the opening tag, so you could end up with extra tags when inserting code, like the <p> tag.

  • Delay slider: Indicate a delay speed (the amount of delay before the code completion option kicks in). Set this value to a higher delay if you don't want it popping up every time you start typing code, especially if you know your code pretty well. If you're new to coding, you might want to decrease the delay time so the code completion feature kicks in sooner.

    For advanced users, the Web Settings options in GoLive enable you to customize the way GoLive deals with code, markup, browser profiles, and file mapping. Be sure you understand what you're doing before changing any of these options. Choose Edit, Web Settings in Windows or choose GoLive, Web Settings on the Mac.

  • Balance while Typing: Automatically jump to the next open bracket when you type a close bracket.

Figure 38.9. The Syntax preferences set basic rules about syntax and syntax checking.

Click OK after you set all the Source Code Preferences.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint