Opening and Saving Files

  1. Opening a file: To open an existing file, choose File ▸ Open from the menu bar, click on the Open button on the toolbar, or press Ctrl+O. This will display the Open File dialog.

    Figure 3-5Open File dialog
    Select or enter the name of file you want to open, then click Open. To open more than one file at once, select multiple files to open by holding down the Ctrl key and clicking each file in turn; then press Open. If you change your mind, click Cancel to dismiss the dialog without opening the file.

    Figure 3-6Open Multiple File dialog

    You can enable the Show Hidden Files option through the pop-up menu that appears when you right-click in the Open File dialog. This option will make hidden files (files starting with ".") visible in the file list. Clear the option to hide hidden files. The Open File dialog also has a built-in file type filter. Select the appropriate file type filter in the dialog and the file list will be limited to the files of the selected type only.

  2. Saving a file: To save a file, choose File ▸ Save from the menu bar, click on the Save button on the toolbar, or press Ctrl+S. This will save the file. If the file is new, a Save As dialog will appear. Enter a filename and click Save to save the new file with the name supplied.

    File autosave

    If you have enabled autosave, Anjuta will not autosave any new files. You must first save them manually. The same applies to the Save All option: Anjuta will not save new files, if you haven't saved them first manually. You must save a file manually before autosave or Save All will work with it.

  3. Saving a file with a different name: You can explicitly save a file with a new filename. To do this, choose File ▸ Save As from the menu bar. A Save As dialog will appear prompting you to enter the new filename. Enter the name and click Save.

    File save as overwrite

    When you use Save As with an existing file, the original is not deleted. It is left unchanged since the last save. If a file with the new filename already exists, a confirmation dialog will appear to ensure that you want to overwrite it. Clicking Yes will overwrite the file with the file you are saving.

  4. Closing a file: To close a file, choose File ▸ Close from the menu bar, or click on the Close button on the toolbar. (You can also close a file by clicking the X in its filename tab.) This will close the current file. If the file is not saved, or is a new file, then Anjuta will prompt you to save the file before closing it.