# Bluefish manual chapter 2: Using Bluefish features
Author: Jim Batis

prev | contents | next

# Chapter 2: Using Bluefish features

In the first chapter, we covered the basic concepts of using Bluefish. Though many of the possibilities and usages this program has, not all of them were mentioned, whereas those mentioned weren't thoroughly explained. Most importantly, you haven't learnt how to configure the program yet (apart from a few basic stuff that GTK+ itself allows you).

The purpose of this chapter is to cover all features of Bluefish in detail, so that you can take full advantage of them. We will explain how you can configure Bluefish (like window appearance, syntax highlighting, fonts, etc.), how to use external programs and view your documents, the thumbnails, and many more features.

## The Preferences window

Most of the program's settings can be adjusted through the Preferences window. To call this window:

- Select `Options->Preferences`.

- | Press the 'Configure' button of the main toolbar.

A window should pop up, with five tabs at the bottom and two buttons. `Save & Close` saves any changes you have made and saves them to disk. These settings will be re-loaded in the future sessions. In case you've changed your mind about the changes you made, press `Cancel` and the previous settings will be restored.

### Editor Preferences

#### Default font

In this textbox, you can set the font of the text editing area. Though you can try to write the font manually, it is preferable to click on `Font...` button. A window pops up in which you can set the font, its style and size. At the bottom, you can preview the font you have selected. The 'Filter' tab will help you select the font you want, by selecting the features it should have. 'Font Information' shows the info for the selected font. To set the font, press `Ok`. If you press `Apply`, the font is set, but this dialog doesn't disappear, so that you can re-adjust the font selected. Press `Cancel` if you've changed your mind about selecting a different font.

TIP: Most users prefer to select fixed-width fonts. As you will see, fixed width fonts are better for any code editors, including HTML. It will help you organise your documents better and is highly advised if you're using <PRE> tag, as you can see how the text will actually appear. Adobe courier is often available and is strongly suggested for usage.

#### Tab width

This adjusts the width that Tab characters will have. This is measured in compare with empty space characters. So, if you've set it to value 4, for example, in a fixed-width font, it will look like there were 4 space characters there.

The default tab width is 4.

#### Word Wrap

You will usually want to use this feature together with 'Line Wrap'. If this is checked, then the word typed will be wrapped to the next line if the text reaches the right border of the text editing area (without a line feed character placed).

#### Line Wrap

If this is checked, then when the text typed reaches the right border of the text editing area, it continues to the next line (without a line feed character).

NOTICE: A bug in the Gtk Text widget disables the horizontal scrollbar, so disabling word and line wrap will make editing a bit uncomfortable. Just try it out and you will see :-)

If you have this feature checked and not 'Word Wrap', then the words may be broken in two lines, whereas if 'Word Wrap' is checked the letters stay all together.

#### Autoindent Code

If checked, the cursor is positioned in the same column after pressing Return as it is in the upper line. If disabled, a Return will always jump to the first column of the new line.

#### Highlight by default

If checked, when an action, like opening a file is done, the text is hightlighted automaticly, thus you don't need to select `View->Highlight Syntax` yourself. If, however, you uncheck it, then the text won't be highlighted unless you ask for it.

#### Update syntax highlighting continuous

If checked, the syntax will be automaticly highlighted as you type the text.

#### Update full widget instead of the current line

Normally, when text is highlighted in the text editing area, only the line in which the cursor is placed will be highlighted and not the whole text. When pasting multiple lines some lines will not ne highlighted correctly. You could use F5 (default shortcut for `View->refresh highlighting`) to refresh. If however you want to check and highlight the whole text each time you edit the document, then check this option. Unfortunately updating the whole widget is slow in the GTK text widget due to a scrolling bug.

#### Automatic link management

If you enable this option Bluefish will update any links when using 'move to' or 'save as' functionality. Only links found between double quotes (i.e. "link") are scanned and updated.

#### Allow multiple instances of the same file

If you enable this option Bluefish will let you open a file several times. This is useful for having 2 different versions in the editor and checking layout-changes.

### HTML Preferences

#### Insert closing...

As you know, all HTML tags usually have to be ended with a </tag> comment. For example <B>Bold text</B>. However some tags can be (and usually are) used without an ending tag. Two of them are <LI> and <P>, which don't really need an ending tag. However, if you want to strictly follow the HTML syntax rules, you might want to insert them.

If the boxes are checked, then the ending tags are inserted for <LI> and <P>, else they are omitted.

#### Insert lowercase HTML tags

By default, when a tag is inserted by Bluefish, it is in uppercase (this is a common designer's technique in order to distinguish tags from normal text). However, in case you want the tags to be in lowercase, check this box.

Note that WML needs the tags to be lowercased, so you should check this, should you want to use WML.

#### Allow the use of CSS

This enables the support for CSS (Cascading Style-Sheets). CSS can be inserted internal or as external documents.

#### Allow deprecated Tags

This allows the use of deprecated HTML-Tags. Actually the W3 reccomends using CSS to format your documents, not the old Tags (e.g. <font> or <center>).

#### Use XHTML Syntax

This makes Bluefish insert all tags according to the XHTML 1.0-Specification.

#### Use an XML-Starting-Line

Inserts a XML-Line in the Head of the Document (usually a standard SGML-Line is inserted).

#### Allow the Ruby-Tags included in XHTML 1.0

"Ruby-Tags" are tags introduced in XHTML 1.0 that are used esp. in japanese files to insert information thats helps in pronouncing.

#### Allow new Tags of HTML 4

When clicked, the Tags of HTML 4 instead of those in HTML 3.2 are used (where applicable).

#### Allow the Use of Frames

Turns on Frame-support in Bluefish when selected.

#### Require an DOCTYPE on first line of document

Inserts a DOCTYPE-line in newly created documents.

#### Set the DTD-URL in the DOCTYPE-line

Inserts the DTD-URL into the DOCTYPE-Line.

#### Allow the use of Internet Explorer proprietary Tags

#### Allow the use of Netscape proprietary Tags

#### Default charset

This does not have any functionality yet.

### Main GUI options

#### Notebook tab font

This works exactly as in the Editor tab, only that it sets the font of the tabs in the editing area (i.e. the tabs that contain the names of the files opened). It is advised that you keep it to a small simple font.

#### Font is a fontset

Select this if your selected font is a fontset, i.e. it has a number of different charsets and is therefor suitable for drawing international text.

#### Notebook position

By default, the tabs are in top of the text area. If, however, you find them more comfortable in another position, you can set them at the bottom, right and left of the text area.

To select another position, press the button on the right and a list of the positions will appear, from which you can select the prefered position. Note that you can also change the position with the Up and Down cursors.

#### Initial width & height

These two variables set the width and height of the main window.

To adjust the width & height to your preferences, you can either write the new values or use the up/down button at the right, which will increase and decrease the value by 5. Furthermore, if you press the Up and Down cursors, the value will also be increased or decreased by 5.

The default values are 600 for width and 400 for height.

#### File list initial size

Here you can set the minimum size of the file-list in the left. Standard is 150. You can manually change the width of the filelist when working.

#### Items in open recent menu

The number of the last opened files that will appear under File -> Open recent.

#### Items in directory history

The number of the last used directories that will appear above the directory-list.

#### Filter file browser default

When selected the file-filter function of the file-browser is enabled by default.

#### Backup file before saving

When selected, backup files are created upon file-save.

#### Backup file suffix

This suffix is appended to the filename when creating backup-files. It is set to ´~´ by default.

### Files and images

#### Thumbnail type

#### Thumbnail extension string

#### Allow multiple instances of the same file

If enabled you can open the same file multiple times. This can lead to unexpected results. If disabled (default) bluefish will switch to the already opened document when you open a file multiple times.

#### Backup file before saving

#### Backup file suffix

#### Backup file by copy instead of rename

usually bluefish renames the original file, and opens the original filename as a new file. if you're working with links this doesn't work (the link then is broken). Choose this option if you're working with links.

#### Backup failure action

'ask', 'save' or 'abort'. If the backup fails (you have for example bo write permissions in the directory, but you do have them on the file itself), still continue, abort the save or ask at the very moment.

#### Open commandline files in already running bluefish

If you select this option (default) you can add 'bluefish %s' as default program to filemanagers like gmc, and every file will be opened in the same bluefish window.

#### File filters

### External

#### Browser command

This refers to the `View->View in Netscape` function. With this function, you can view your document in Netscape, so as to preview how it looks like so far.

Normally, you don't have to change this, but in case the default setting doesn't work, you can write the command and parameters, just like if you were calling the program from bash. The only thing you must note is to put `%s` at the place where the filename would normally be placed (Bluefish will replace that with the filename automaticly).

The default setting is: `netscape -remote OpenUrl\(%s\)`

#### Weblint command

The commandline with which weblint is invoked. Weblint is a html syntax-checker.

#### ispell command

The commandline with which ispell is invoked. ispell is a spell-checking system.

#### default language

The default language for ispell to check against.

#### Accept compound words, Specify additional characters that might form a word, Personal dictionary, Input encoding

These are special switches for ispell to change its behaviour. For further information look at ispells manpage.

prev | contents | next