Difference between revisions of "File page"

From TED Notepad
Line 81: Line 81:
 
====Keep file name on error====
 
====Keep file name on error====
  
{{todo}}
+
The {{field|Save without BOM}} option specifies, whether the file name should be kept even after an unsuccessful or unclean loading. '''Use this setting with caution. Always remember, when you turn it on!'''
 +
 
 +
By default, when a file ''fails'' to load (because of a read error, or even when the file is {{system|binary}}), the partially loaded data are displayed with a indication, that the file is already modified. Furthermore, to prevent you from accidentaly saving the modified file back without notice, its file name is discarded. Therefore, you need to explicitly specify a file name to save the data to.
 +
 
 +
By turning this option on, the above precaution is disabled, allowing you to save the incomplete or modified file right back. Note that when loading binary files, special characters are being modified in the process. The file might then become useless.
  
 
====Force the default encoding====
 
====Force the default encoding====
  
 
{{todo}}
 
{{todo}}

Revision as of 13:36, 17 April 2007

You see work in progress here; this section already reflects future TED Notepad version 5.3.0.4.
This section may contain incomplete, premature, or mistaken information, prone to change without notice.

Default encoding

The Default encoding specifies a default file encoding that should be used for new documents. Supported encodings are ANSI, both Unicodes and UTF-8.

Note: See chapter Managing documents for more informations about these file encodings, their usage, advantages and also their pitfalls.

Default newlines

The UNIX/Mac support specifies whether the transparent UNIX/Mac newlines conversion support is to be available.

See chapter Managing documents for more details about transparent newlines support.

The Windows, Unix and Mac fields can be used to specify the default newlines to be used for new files.

Default file type

The Default file type setting specifies, what file extension is to be used by the Save As dialog, if no extension is specified explicitly. The default extension may not exceed 4 characters.

Default extension for plain-text documents is usually txt, but some users may choose to override this and use another value. E.g. Use html, if you creat more HTML documents than simple text files.

Default path

The Default path defines a relative or absolute path, that is to be used as the starting point in the Open/Save dialogs. When an absolute path is specified, it is used unchanged in all cases.

When no path is specified as default path, the current working directory is used, if it contains files, which satisfy the Filter strings below. Otherwise, the personal files directory of the current user is used.

When a relative path is specified (e.g. . or \docs), it always refers to the current working directory. Note: The working directory is usually a directory, where TED Notepad is started from. Then this working directory changes with every Open/Save dialogs operation.

Tip: A useful example for portable usage is a simple back-slash (\), which will make the Open/Save dialogs start in the root directory of the drive, where you launched the application. This can be used to twist your USB drive, when moving TED Notepad on the USB from one computer to another.

Filter strings

The Filter strings defines filters, that are to be used in the Open/Save dialogs as file filters. They appear in a combo-box, usually bellow the file name box. Such a filter consists of two strings separated by a Pipe character.

The first string in a filter is a name to be displayed that describes the filter (e.g. Text Files). The second one specifies the filtering pattern (e.g. *.txt). Therefore a filter for text files would look like this: Text Files or maybe even like this: Text Files (*.txt).

To specify multiple filtering patterns for a single filter, use a semicolon to separate the patterns (e.g. *.txt;*.doc;*.bak). A filtering pattern can be a combination of valid filename characters and an asterisk wildcard character. Do not include spaces in the pattern string.

Several filters are to be delimited also by a Pipe character. Therefore this Filter strings value should eventually consist of pairs of strings delimited by Pipes. Each pair defines one filter: a name and its filtering pattern.

Suggest first line as new file name

The Suggest first line as new file name option specifies, whether the text from the first line of the document is to be suggested in the Save As dialog as a new file name instead of the default Untitled. Note: When there is no text on the first line, the Untitled string is used regardless of this option.

Create backup files

The Create backup files option specifies, whether to create backup files by copying the previous version of the original file upon each save operation. The backup file name is created by appending a .~ to the original file name.

Save recovery every 5 mins

The Save recovery every 5 mins option specifies, whether to auto-save the current file every 5 minutes into a recovery file. The recovery file name is created by appending a .~ to the original file name. The auto-save operation is performed on background and occurs only, when there are unsaved modification made to the document.

Note: The recovery file is deleted after a successful Save operation; or upon closing the document by a user request (e.g. by opening a new file or closing the editor window).

Force Read-only files

The Force Read-only files option specifies, whether files with read-only attribute can be written to. By using this option, you override the system default behaviour, which prevents the modification of such files.

Tip: You can save a read-only file also by opening its Properties dialog (hotkey Ctrl+J) and unchecking the read-only attribute. After the saving, you may then choose, whether to set the read-only attribute back.

Save without BOM

The Save without BOM option specifies, whether to save UTF-8 and Unicode files without their Byte-Order-Mark (BOM). Use this setting with caution. Always remember, when you turn it on!

Although there might be specific ocasions, where this is useful, it also brings non-trivial complications. A file without a BOM is not recognized correctly by most of the applications. Unicode files may be treated as binary files and in UTF-8 files non-ASCII characters may be misinterpreted.

Tip: See also the Force the default encoding option below, which can be used to load files without BOM.

Only one instance of each file

The Only one instance of each file option specifies, whether TED Notepad should check for other instances of the same file already opened. When this option is turned on, each file is cross-checked upon opening, whether it is already opened in another window of TED Notepad. If so, a warning is displayed, asking the user, whether to switch to the already opened window.

Check if file is modified outside

The Check if file is modified outside option specifies, whether a watch is to be set for every opened file. When this option is turned on, TED Notepad raises a warning every time the current file is modified by some other application. It asks, whether to Revert the file upon such event.

By reverting, you discard all unsaved modifications and load the new version of the file. The selection will try to persist the loading, placing the actual insertion point to the same location. Also, the actual scrolling should persist unchanged.

Keep file name on error

The Save without BOM option specifies, whether the file name should be kept even after an unsuccessful or unclean loading. Use this setting with caution. Always remember, when you turn it on!

By default, when a file fails to load (because of a read error, or even when the file is binary), the partially loaded data are displayed with a indication, that the file is already modified. Furthermore, to prevent you from accidentaly saving the modified file back without notice, its file name is discarded. Therefore, you need to explicitly specify a file name to save the data to.

By turning this option on, the above precaution is disabled, allowing you to save the incomplete or modified file right back. Note that when loading binary files, special characters are being modified in the process. The file might then become useless.

Force the default encoding

This section is incomplete and wants to be finished later.
TODO: Not specified.