Chapter V. Working with files and folders

1. Creating files
2. Managing directories
3. Opening files
4. Saving files
5. Renaming files
6. Deleting files
7. Closing files
8. Inserting files
9. Editing
9.1. Undo and Redo
9.2. Cut, Copy, and Paste
9.3. Input methods
10. Basic Find and Replace
10.1. Searching for a word within a whole document
10.2. Setting limits to the search scope
10.3. Case sensitive search
10.4. Overlapping searches
10.5. Retrieving previous search strings
10.6. More on find
10.7. Replacing features
10.8. Retrieving previous replace strings
10.9. Changing letter case when replacing
10.10. Choosing strings to replace
10.11. More on replace
11. File types
11.1. Syntax highlighting
12. More on files
12.1. Remote files
12.2. Character encoding
12.3. Open advanced

Most of the file operations are accessible from the File menu. Using this menu, a new file can be created, existing files opened, and opened files saved or renamed.

You may also insert a file into another one, and revert a modified file to its previously saved state.

A screen shot of the Bluefish File Menu

Figure V.1. Bluefish File Menu

[Note]

In case you compiled bluefish from source, the FileOpen URL... menu item is shown only if you installed gnome-vfs2 beforehand.

For Mac OS X users installing via Fink, choose bluefish-gnomevfs2 or bluefish-gnome2 variant.

You may also add directories, delete files, and refresh the file browser in the side panel using its contextual menu.

A screen shot showing the file browser contextual menu

Figure V.2. The File Browser Contextual Menu

You may also open a file using drag and drop from the desktop or from Nautilus to any part of the Bluefish window but the editor part when you are under Gnome2 environment.

[Note]

If you drag and drop the file to the editor window, the full path of the file is inserted.

1. Creating files

Apart from using FileNew (Ctrl-N) or the New icon to create a new file, you may also use FileNew Window (Shift-Ctrl-N).

Those methods create an untitled file of type text (except when you are working on a project with defined template file, see Creating a New Project for more info) with default permissions and the default character encoding defined in the Files tab in the EditPreferences menu option. You will further have to save it under the desired name.

Screen shot of an untitled document window

Figure V.3. Untitled Document Window

[Important]

Note that the document window is titled “Untitled n - Bluefish versionnumber”, which indicates precisely that the file is not saved on the disk. The same applies to the document's tab which shows “Untitled n”. Moreover, if you move the cursor onto the document's tab, you will not see any size or modification date.

[Tip]

When creating new files, you may want to create them in a new window. In this case, use FileNew Window to first open the new window and then create the desired files as usual.

To spare yourself the bother of saving, right click on the desired directory in the directory list of the file browser in the side panel and select New File. You will be presented with a File name dialog, where you will enter the desired name:

A screen shot showing the File name dialog

Figure V.4. The File Name Dialog

[Tip]

You may type a path relative to the clicked directory, provided that the target directory be under the clicked directory and that it exists.