2.2. Opening Files

skEdit can open single files or directories. If you open a single file, skEdit will treat it as text unless the file extension is assigned to one of the image file categories. By default skEdit will collect all single files into one window with tabs. This can be changed in the Editing preference pane.

If you open a directory, skEdit will create an ad-hoc, local-only project. The project will then be available via the Project Manager from the Window menu.

When working on a project skEdit will only open files that it can match to a file category. For example, the .htm extension is part of the HTML file category, so skEdit will open .htm files that are part of a project. This applies when selecting the file from the project view or when performing a multi-file operation, such as search or Tidy. If you try to open a file that skEdit does not recognize, it will ask you to choose a file category for the file.

2.2.1. Text Encodings

skEdit supports a wide array of text encodings. When opening a file, it will attempt to determine which encoding to use. The following process is used:

  1. If you have previously specified an explicit encoding via the File > Reopen Using Encoding menu, skEdit will use that.

  2. If an encoding is specified in the filename, skEdit will use that. For example, a file named "foo.utf8.txt" will use UTF-8.

  3. If an <?xml?> or <meta> declares an encoding for the file, skEdit will use that.

  4. If a BOM is specified, skEdit will use the appropriate flavor of UTF-16.

  5. Finally, skEdit will fall back to your default encoding.