3. Projects

The projects are a sort of saved state of Bluefish. Thus, they are a very convenient way to work with files scattered all over your disks or to pick up only the files you are interested in within a huge tree. Projects features are accessible through the Project menu.

A screen shot of the Bluefish 1.0 project menu

Figure VI.3. The Bluefish Project Menu

Procedure VI.1. Creating a New Project

  1. Click on the ProjectNew Project

    If some documents are already opened, check the appropriated box in the Create project dialog.

    A screen shot of the create project dialog

    Figure VI.4. The Create Project Dialog

  2. Fill in the fields in the Create New Project dialog

    A screen shot of the new project dialog

    Figure VI.5. Creating a New Project

    With a Basedir the file browser in the side panel shows only the files within its hierarchy. With gnome-vfs support, the Basedir can be remote, as smb://user:pass@server/someshare/ or sftp://someserver/somedir.

    The Preview URL allows Bluefish to launch the browser to the appropriate URL, for example http://localhost/ Bluefish. This can be very convenient for testing server side scripting languages like PHP, JSP, etc.

    If the Template field is used, Bluefish will use the template file's contents for new files, which can be requested either via the New button on the main tool bar or FileNew (CtrlN). Otherwise an empty document will be created.

  3. Once the project is created, you need to tell Bluefish where you want to save it. An Enter Bluefish project filename dialog will be displayed. Notice that you can save the project in a location different from the files to which the project points.

    A screen shot of the enter bluefish project dialog

    Figure VI.6. Entering Bluefish Project Filename

To open a project, you have the choice between ProjectOpen Project... or ProjectOpen recent. When you choose the former, a Selecting a Bluefish Project dialog is presented to you.

A screen shot of the select Bluefish project filename dialog

Figure VI.7. Selecting a Bluefish Project

To save the project under its current name/location, use ProjectSave or ProjectSave & close; to save it under a new name/location, use ProjectSave as.... If any file in the project has changed, a dialog will allow you to save the file, discard the changes, or cancel. All files open when the project is saved are automatically opened the next time you open the project.

A screen shot of a Bluefish project

Figure VI.8. Opening a Bluefish Project

Notice that the side panel only shows the tree related to the project.

Also, the recently used files in that project are shown in the FileOpen recent menu item.

A project also saves some basic Bluefish settings, giving the project its own customized Bluefish setup. Currently, the word wrap preference and the state of various tool and menu bars are saved in a project file. The project file itself is simply a text file in the standard Bluefish format (same format as the config file). This format is key: value. Here is an example:

name: BluefishDoc
basedir: ~/bluefishcvs/bluefish-gtk2/doc/
webdir: http://micmacfr.homeunix.org/bluefish/doc
template: 
view_main_toolbar: 1
view_left_panel: 1
view_custom_menu: 1
view_html_toolbar: 1
word_wrap: 1