Difference between revisions of "File menu"
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{manversion|6.3.0. | + | <noinclude>{{manversion|6.3.0.9|menu}}{{manversion|6.0.0.17|menu|File}}__NOTOC__</noinclude> |
+ | |||
+ | {{tip}} When you hover over menu items, short descriptions are shown in the {{feature|Status Bar}}. | ||
{{:New File}} | {{:New File}} | ||
Line 28: | Line 30: | ||
{{:New Window}} | {{:New Window}} | ||
<!-- ++++++++ --> | <!-- ++++++++ --> | ||
− | {{:Save | + | {{:Save and Exit}} |
{{:Exit}} | {{:Exit}} | ||
{{:Exit without saving!}} | {{:Exit without saving!}} |
Latest revision as of 22:06, 1 November 2021
Tip: When you hover over menu items, short descriptions are shown in the Status Bar.
New (Ctrl+N)
Creates a new empty document.
Tip: Using Template file setting in the Settings dialog allows to automatically pre-load specified template file whenever a new document is being created. See chapter Save/Load page of the Settings dialog.
Note: TED Notepad may ask, whether to Save current document before creating new one.
Open.. (Ctrl+O)
Shows the Open dialog and then opens and loads selected file.
Note: TED Notepad may ask, whether to Save current document before opening a new one.
Tip: Upon loading recovery auto-save file, please refer to chapter Recovering auto-save files.
Detecting Encoding
Upon loading file with BOM
, TED Notepad automatically selects the BOM
-nominated encoding and loads the file as such. Encoding and BOM options are set appropriately.
- Use Re-open to load the file in different encoding or codepage, if necessary. Note, however, that since Re-open disregards presence of any potential
BOM
, it will load it and include it within the loaded text as either visible or invisible character or characters, depending on circumstances. - See also /A ANSI, /W Unicode and /U UTF-8 command line parameters for selecting Encoding.
Upon loading file without BOM
, TED Notepad automatically attempts to detect file encoding. However, this detection is currently limited to UTF-8 files only.
- If the file contains non-ASCII characters and is encoded in UTF-8, it is automatically loaded as UTF-8 and the current document Encoding option is set to UTF-8. Note that this only works if the file contains no UTF-8 errors (invalid UTF-8 sequences, including overlong sequences and inaccessible ranges).
- If the file contains ASCII characters only, UTF-8 and ASCII encodings are indistinguishable (because ASCII file is also valid UTF-8 file). Therefore, the current document Encoding option is set to the value of Default encoding setting from the Settings dialog (if Default encoding setting is set to either ANSI or UTF-8). See chapter File page of the Settings dialog.
- Note: Upon loading UNICODE files without
BOM
, no automated detection of file encoding is attempted. This is because of the 畂桳栠摩琠敨映捡獴 (Bush hid the facts) problem. Use Re-open to load the file in appropriate UNICODE encoding if necessary. Also note that in rare cases, UNICODE files withoutBOM
might get mis-detected as UTF-8 files, though the loaded text should clearly give away the fact that loading failed to load the file correctly. - See also /W Unicode command line parameter for loading UNICODE files without
BOM
. - It should be unnecessary to say that you should not save your files in UNICODE encoding without
BOM
. Many text editors get rather confused by this combination.
Tip: In order to load the file in different encoding or codepage, use Import.
Detecting Newlines
Newlines are detected upon loading and Newlines option is set appropriately.
Note that different types of newlines are not being converted in TED Notepad upon loading, and therefore different types of newlines can be seen as different even while editing documents, although the difference is somewhat subtle and unimportant most of the times. But also note that unlike loading, saving may indeed convert newlines if Newlines option says so.
Note: If no newlines are found in a file at all, the Default newlines setting is used to choose Newlines option for the loaded document. See chapter File page of the Settings dialog for details.
Note: If newlines of various types are found in one file, Mixed is selected for Newlines option in order to prevent newlines mixup upon future saving. However, if Mixed newlines are prohibited by the No mixed newlines setting, the Default newlines setting is used to choose Newlines option for the loaded document. Be aware that upon saving such document while the No mixed newlines setting prevents mixed newlines, all newlines in the document will be converted according to the Newlines option, potentially harming the document (binary files are usually very sensitive to such newline conversions). See chapter Save/Load page of the Settings dialog for details.
Revert (Ctrl+E)
Reverts (reloads) currently opened document. All unsaved changes will be lost. If contents of the file changed in the meantime, new version of the file would be loaded.
Note: Current Encoding, BOM and Newlines options might get changed upon reloading to reflect the new version of the file.
Note: A codepage or encoding can be forced while reloading (if one is selected via Re-open, Import or Export), which ignores auto-detection. For example, if a file is opened as ISO-8859-1 but it is later changed to UTF-8 by some other application in background, it would still be reloaded as ISO-8859-1.
Note: Selection and actual scrolling position should persist the reloading. Although, if the file changes significantly, placing the selection at the same location might lead to unexpected positions.
Note: Current document is not saved before reloading, naturally.
Note: Undo/redo queue is deliberately lost during Revert.
Re-open
Re-opens the current opened file using selected encoding and/or codepage from the Re-open sub-menu. This feature can be used to fix problematic files with broken encodings, undetected UNICODE files without BOM
, or files saved in various non-ANSI codepages.
Note: Re-open disregards presence of any potential BOM
. It will load the file in selected encoding as is, including any BOM
, and include such BOM
within the loaded text as either visible or invisible character or characters, depending on circumstances. No auto-detection is attempted at all.
Important note: Forced opening of file in different encoding may lead to conversion errors and irretrievable loss of information. Routines responsible for conversion may resolve troubles and invalid sequences silently and without any kind of warning. Be aware of this and verify results of such conversions. Full responsibility to select the correct encoding and/or codepage is with the user.
Import..
Shows the Open dialog and then opens and loads selected file in selected encoding and/or codepage from the Import sub-menu.
Note: See Open and Re-open for further details, since this is a combination/shortcut to opening a file and re-loading it in selected encoding and/or codepage. For instance, no auto-detection is attempted at all. Also note that conversion errors might get silently concealed in the process and data loss may occur with no warning at all. Full responsibility to select the correct encoding and/or codepage is with the user.
Include.. (Alt+Ctrl+I)
Shows the Open dialog and then loads selected file and pastes its content to the current position (or replaces the selection, if any).
Tip: This tool cannot load multiple files at once yet. However, you can load and join multiple files together easily, using the Drag & Drop files feature, described in the section Drag & Drop files. If dropping two or more files, all of them get loaded and included into one document.
Save (Ctrl+S)
Saves the document to current file (e.g. the one from which it was loaded or the one to which it was recently saved). If no such file was specified before, shows the Save As dialog as in Save As feature.
The file is saved using the current document Encoding option, BOM option and Newlines option. Note that newlines and character conversions might occur within the text while saving it to the file. However, these conversions do not alter the text of the document right away, only its saved counterpart. In order to review the converted text, re-open the document after save.
- When newlines are being converted based on Newlines option, no warnings are issued. To prevent newlines conversion, use Mixed newlines in Newlines option.
- When unambiguous character conversion is not possible due to limitation of chosen encoding or codepage, warning is issued. Such conversion can be declined, cancelling the saving of the file altogether; or alternative character can be used as substitute, usually a question mark ?.
- If a Unicode encoding is selected with no BOM, a warning is posted to the Status Bar as a reminder that the file may be unrecognizable as Unicode afterwards. See Open File and Encoding for further details.
Tip: In order to save the document in different encoding or codepage, use Export.
Note: Save saves the file even when no changes to the document were made since loading or last save. Frequent saving leads to frequent data writes and thus to frequent disk activity. Be aware of this when disk activity matters. However, in no case consider this as encouragement to Save less — the more you save - the less you loose.
Save As.. (Ctrl+B)
Shows the Save As dialog, then uses Save to save the document.
Export..
Shows the Save As dialog, then saves the document to selected file in selected encoding and/or codepage.
Note: When unambiguous character conversion is not possible due to limitation of chosen encoding or codepage, warning is issued. Such conversion can be declined, cancelling the saving of the file; or alternative character can be used as substitute, usually a question mark ?.
Note: The BOM option is ignored altogether (as well as Encoding option) upon exporting and no BOM
is added to the file.
Note: The Newlines option is used to determine whether and how to convert newlines the same way as in Save.
Exclude.. (Alt+Ctrl+D)
Shows the Save As dialog and then cuts the selection and saves it to the specified file.
Note: Encoding, BOM
and newlines of the specified file is set according to Encoding, BOM and Newlines options of the current document, including selected codepage, if any.
Note: Current selection is removed from the document and stored into the specified file as is (apart from encoding and newlines conversions). While some tools may exclude or include trailing newlines for user convenience, this is not the case. Also note that excluding a portion of document is modification to the document and marks the document as modified.
Encoding
Provides option of currently selected type of file encoding
being used for saving current document, and also whether to use BOM
.
Currently supported encodings include ANSI, UTF-8, Unicode and Unicode, Big Endian. Alternativelly, arbitrary codepages can be used as well. A BOM
is a so called Byte-Order-Mark, a special multi-byte character at the beginning of a file used to determine, whether a file is UTF-8, Unicode or Unicode, Big Endian. Note: Although auto-detection of UTF-8 files is reliably possible by other means than BOM
, auto-recognition of Unicode files without BOM
is not reliable at all.
Encoding option does not alter the document itself in any way until saved. Ability to insert characters unsupported by chosen encoding
is not limited either. However, upon saving, TED Notepad may warn about converting such characters into other characters, typically into placeholders or question marks.
BOM option tells, whether BOM
was auto-detected upon loading and whether it is to be used upon saving to hint file's encoding
in the future.
Upon loading a file, Encoding and BOM options are automatically set according to the kind of encoding
detected in the file and presence of BOM
. Please note that some kinds of available encodings
cannot be auto-detected, and some files may need a Re-open in order to be loaded and translated from their encoding
correctly. See Open File for more details about encoding
auto-detection, the role of BOM
, user-advised detection, and also how Default encoding setting can be used upon loading files.
Upon saving a file, Encoding and BOM options are used to convert the document's text into file's data, adding BOM
where possible and necessary. See Save File for more details about encoding and saving files.
Besides File menu, current Encoding and BOM options are also indicated on the Status Bar. Double-click on the respective Status Bar panels to toggle the Encoding and BOM options. Note that BOM option is only available with specific types of Encoding.
Note: Modifying the Encoding or BOM option marks the document as modified to indicate that current Encoding or BOM option does not necessarily match the original file's encoding
. A Save File may be necessary to actually re-encode the file into the chosen Encoding.
Note: Modifying the Encoding also modifies the BOM flag. A reasonable default value is chosen for each supported Encoding, e.g. no BOM for UTF-8, but with BOM for Unicode.
Note: Default encoding setting can be used to set the default value for Encoding option for new documents and encoding-indecisive files. See chapter File page of the Settings dialog.
Note: If loading file thru Include File, Encoding and BOM option is not modified.
Newlines
Provides option of currently selected type of newlines
being used within current document.
Newlines option is used while saving the document as well as while typing text and invoking various tools. Since TED Notepad transparently supports several types of newlines (currently Win, Unix and Mac), one can actually compose documents using any of these different types of newlines and even combining them within one document (by using Mixed newlines). Note: Although mixing newlines may be important for binary documents, it can cause lots of troubles when such document is opened in some other text editor (including some older versions of TED Notepad by the way).
The type of newlines inserted into document as line separators (e.g. upon using Enter to start a new line) always correspond to current Newlines option. Note: If Mixed newlines are selected, Windows newlines are inserted.
Upon saving the document, all newlines from the document are converted into the selected type of newlines. This conversion, however, occurs without modifying the document itself, only the file being saved is affected. Therefore, the document must be re-loaded from the file to see the results. Note: If Mixed newlines are selected, no conversion ocurs upon saving whatsoever and the document is saved as is.
Upon loading a file, Newlines option is automatically set according to the kind of newlines found in the file being loaded. If several kinds of newlines are found within the file, Mixed newlines are selected to indicate such file. If no newlines are present within the file at all, Default newlines setting is used as the default.
Besides File menu, current Newlines option is also indicated on the Status Bar. Double-click on the respective Status Bar panel to toggle the Newlines option.
Note: Modifying the Newlines option marks the document as modified to indicate that current Newlines option does not necessarily match the file's newlines.
Note: Default newlines setting can be used to set the default value for Newlines option for new documents and newline-less files. See chapter File page of the Settings dialog.
Note: No mixed newlines setting can be used to disable the Mixed newlines. The Mixed newlines then cannot be set as Newlines option, and saving of mixed newlines into one file is not possible at all. This can be useful if one needs to prevent mixed newlines at all costs. See chapter Save/Load page of the Settings dialog.
- Note: A document can still contain mixed newlines as a result of changing the Newlines option while typing the document. However, all newlines get safely auto-converted upon saving, since the Newlines option will have to specify some specific type of newlines to convert to.
- Note: Whenever a file with mixed newlines is loaded, the Newlines option is set according to Default newlines setting, but the actual newlines within the document remain mixed. Only if saved, newlines get auto-converted.
Note: If loading file thru Include File, Newlines option is not modified.
Page Setup..
Shows the Page Setup dialog, where paper size and page margins can be set.
Print.. (Ctrl+P)
Shows the Print dialog, then prints current document or current selection (based on user choice within the Print dialog).
Note: While the document or the selection is being printed, long lines are automatically wrapped to fit the page according to Page Setup. It is perhaps worth mentioning that the lines are re-wrapped to fit the paper, therefore current word wrapping used while displaying the document on the screen may be different from the wrapping being printed. Size of the window and selected font can both affect the wrapping.
If you for whatever reason need to print the document with lines wrapped the same as wrapped while being displayed, use Commit Wrapping tool before printing, and also make sure the paper is wide enough to accomodate the pre-wrapped lines to prevent further wrapping. See chapter Wrap tools for more details.
Note: Fonts: Print setting can be used to change the font used while printing the document. See chapter Appearance page of the Settings dialog.
Note: Page Setup can be used to change paper size, orientation, and margins.
Versions note: Prior to version 5.0, there were several issues with printing and wrapping during the printing. The text was not always wrapped correctly. Some early versions did not wrap the lines at all. Versions above 5.0 should be able to print correctly though, as described above.
System > Containing Folder (Alt+F9)
Shows the Folder, which contains the current document.
This feature is disabled, if no document is currently loaded, or if a new document has not yet been saved, since in these cases there is no location to use.
See also Properties and Command Line.
System > Command Line (Alt+Shift+F9)
Shows the Command Prompt (i.e. cmd.exe) at the current document's location.
This feature is disabled, if no document is currently loaded, or if a new document has not yet been saved, since in these cases there is no location to use.
See also Properties and Containing Folder.
System > Properites.. (Ctrl+F9)
Shows the system Properties dialog of the current document's file.
This feature is disabled, if no document is currently loaded, or if a new document has not yet been saved, since in these cases there is no file to show the dialog for.
See also Containing Folder and Command Line.
Recent Files
Shows up to 10 recently opened or saved file names.
Note: Files, which were not loaded/saved successfuly are not collected here.
Use Clear to empty the Recent Files menu.
Note: The Recent Files menu can also be emptied from the Settings dialog. See chapter General page of the Settings dialog.
Hide to Tray (Ctrl+M)
Minimizes the main application window and adds an icon to the System Tray area, also called the Systray, i.e. the area of the Taskbar with notification icons and the clock.
To restore the window back to its previous position, click on the icon in the System Tray area.
New Window (F12)
Saves all current settings and options into Config, then launches a new window of the application.
Note: The new window is treated as a separate session. Thus any modified settings and options are not shared between windows. This includes (rather confusing) separate sets of Clips, Favourites, and Recent Files. Some of these settings, if modified in both sessions, get conflicted upon future Config saving of the separate sessions, and get overwritten by each other, potentially loosing information. Keep this in mind when running several sessions of TED Notepad at once.
Save and Exit (F10)
Saves and closes current document, then quits upon success.
Note: Shows the Save As dialog if no file name has been chosen for the document yet.
Exit (Esc)
Closes current document then quits upon success. TED Notepad may ask, whether to save current document before closing.
Note: Exit by Esc key setting may disable the Esc hotkey, or it can ask about closing the application using the Esc hotkey with Ask upon such exit setting. See chapter General page of the Settings dialog.
Exit without saving! (Shift+Esc)
Closes current document without saving, then quits. TED Notepad will not ask, whether to save current document even if modified! No settings, options, Recent Files, Favourites, or Text Filters will be saved into Config. Any recent changes will get lost.
Note: Exit by Esc key setting may disable the Shift+Esc hotkey, or it can ask about closing the application using the Shift+Esc hotkey with Ask upon such exit setting. Note that using this hotkey (Shift+Esc) is the only way to Exit without saving!, thus if Exit by Esc key setting is turned off, Exit without saving! is not available. Although, turning Exit by Esc key setting on just before invoking the Shift+Esc hotkey is always temporary, since no settings get saved upon such exit. See chapter General page of the Settings dialog.
Tip: Run TED Notepad with /ns command line parameter, if you want no settings to be saved ever. See chapter Command line parameters for further details.