For each menu item the primitive that the menu item runs is given. For more on primitives see the section called Primitives.
This function creates an empty new text file with the name default.txt. To save the file and change its name use Save as ...
If a text file was already in memory and changes were performed on it, you will be prompted to save that file before it is erased.
This function allows you to load an existing text file. The File Selector window appears as a result of executing Open ... If you plan to edit for a long time you may also execute Auto Save in the Options menu, to have periodic backups performed automatically.
If a text file was already in memory and changes were performed on it, you will be prompted to save that file before it is replaced with the newly openned file.
This function allows you to open another Phedit window to simultaneously edit or view more than one document. QNX shares the same code, that is why the second copy of Phedit will be loaded much faster.
To copy text from one file in one Phedit window to another file in another Phedit window you can copy the text to the system clipboard and paste it to the second file. Make sure that you are using the system clipboard for your blocking or this will not work. To make sure of this check that the Use system clipboard toggle button is selected in the Options window.
The next Phedit windows are placed at coordinates [x+20, y+20] where [x, y] are the coordinates of the previous Phedit window.
This function unconditionally saves the current file. You will not be prompted in case there is already a file with the same name. You do not have to use this function (unless there is a need for an update, for example when another process must open the same file); Phedit will prompt you to save it when exiting or when another Open ... or New function is performed. If the Keep backup toggle button is selected in the Options window a backup is made before saving the file. The backup file name is made by adding .b to the end of the file name.
This function allows you to change the name of a file and to make copies of the file being edited. The File Selector window appears.
This function allows you to print a file. The file will be printed with one of the three QNX utilities: pr (works on any non-Postscript device), lps (for Postscript devices) or cp (for raw printing).
The Print menu item displays a dialog box which has a number of fields and buttons. Click the Done button in order to print or the Cancel button in order to cancel the action.
The file that will be printed is the one whose name appears in the File field. If it is the file that is currently being edited and you have made changes since last saving it then you will be asked to save it first. If you choose to save then the file will be saved and the printing will be done. If you choose to abandon then the last version of the file that has been saved will be printed. If you choose to cancel the saving then no printing will be done but you will still be in the print window.
If you select the toggle button beside the Command field and put a command in the field then:
File
This function allows you to delete a file without loading a file manager or shell. The File Selector window appears.
This item allows you to create new directories without running a file manager or opening a shell window.
This item allows you to remove directories without running a file manager or opening a shell window.
This item displays a window with information about Phedit. The version number and version date are some of the things shown.
This function concludes your session with Phedit. If a text file was already in memory and changes were performed on it, you will be prompted to save that file before exiting.
This function repeats the last performed primitive, macro, or string of text entered.
This item copies the marked block of text into the clipboard and erases it from memory. If the block type is column then the space occupied by the text is blanked. Read the two sections about marking blocks to find out how to mark a block of text. The text placed on the clipboard will remain there until overwritten by another Copy or Cut. If you are using the system clipboard then other Photon applications may also overwrite the clipboard.
This item copies the marked block of text into the clipboard. Read the two sections about marking blocks to find out how to mark a block of text. The text placed on the clipboard will remain there until overwritten by another Copy or Cut. If you are using the system clipboard then other Photon applications may also overwrite the clipboard.
This item allows you to have the text that is stored on the clipboard inserted at the text cursor position. Paste does not clear the clipboard.
This item inserts a complete file at the text cursor position. The File Selector window appears.
This item writes the marked block of text into a file. Read the two sections about marking blocks to find out how to mark a block of text. The File Selector window appears and from it you specify which file to write to.
This item deletes the current line and stores it on the clipboard so that it can be brought back by executing Paste. After deleting a line the cursor is placed on the following line.
This item changes the marked block of text into upper case letters.
This item changes the marked block of text into lower case letters.
This item changes the marked block of text into lower case letters with the exception of the first letter of every word which is changed into upper case.
This item unmarks the marked block of text. The end result is that there is now no marked block of text.
This item formats the paragraph that the text cursor is in. Formatting consists of word wrapping it within the Right margin which is set in the Options window.
This item formats the paragraph or paragraphs that the marked block of text at least partially covers. Formatting consists of word wrapping each paragraph within the Right margin which is set in the Options window.
This item formats all paragraphs in the current file. Formatting consists of word wrapping each paragraph within the Right margin which is set in the Options window.
This item either reformats a marked block of text or reformats the entire file using a command of your own. The command line that will actually be run is one you specify in the Reformat command field in the Options window.
If a block of text has been marked then the following is done:
This item sorts the marked block of text using the QNX sort utility.
The following steps are done:
This item sorts the contents of the clipboard using the QNX sort utility.
The following steps are done:
This item allows you to spell check a marked block of text or the entire file. The command line that will actually be run is one you specify in the Spell command field in the Options window.
If a block of text has been marked then the following is done:
This item allows you to define the search pattern. As a result of selecting Pattern ... the Search and Replace window is displayed.
This window prompts for the search pattern, the replacement string (used by Replace, Search and Replace, and Replace All menu items) and whether or not the search is to be done case sensitive. If doing a Replace all then you can also indicate whether or not you want to be asked to acknowledge each replace. Buttons for Search, Replace, Search and Replace, and Replace all are also accessible from this window. The search starts at the cursor position and searches to the end of the current file.
The pattern entered in the Search for field recognizes the following syntax:
Where ... | matches ... |
---|---|
c | the character c where c belongs to the set of ASCII characters except ?,*,[,], \, and newline |
? | any one character |
* | any number of characters |
[cc...] | any one character from the [...] list |
\c | the character c which can be any ASCII character except newline |
This item searches for the pattern defined by the item Pattern .... It starts looking from the cursor position and up to the end of the file.
This item replaces the found pattern with the replacement string. You would have done a Search before this so that your cursor is now on first character of the found pattern.
This item is the equivalent of Search followed by Replace.
This function will search for all occurances of the pattern and replace
each with the replacement string. It starts searching at the cursor
position and continues to the end of the current file. You can indicate
that you want to be asked before doing each replacement by setting the
Acknowledge replace toggle button in the Search and Replace
window.
Match Bracket
Primitive: MatchBracket()
In many programming languages, brackets are used to mark the beginning and end of expressions. This function allows you to put the text cursor on a left bracket (such as [, (, {, , or `), execute Match Bracket, and Phedit will position the cursor on the matching right bracket (that is, ], ), }, , or '.)
This item allows you to do a great deal of customization in the way Phedit behaves. Selecting it causes the Options window to appear.
These characters ... | will be replace with ... |
#f | the name of the file being edited or the name of a temporary file depending on what primitive it is used by |
#h | [UserPath] but with any trailing slash (/) removed (see the section that talks about the start up search order for how [UserPath] is defined) |
#s | the Photon server name (-s Phedit command line option or if no -s option was given then the contents of the PHOTON environment variable) |
#w | the right margin |
These buttons allow you to choose the text and background colors respectively for the Edit Area. When either button is clicked, the Colors window will prompt you for a color. When the Colors window appears click on the color of your choice and then click on Done.
If you do not select this then a private clipboard is used that is accessable to this instance of Phedit only.
Also, if this is selected then the Inclusive paragraph blocking toggle button (see below) will be available for selection.
These buttons allow you to choose the text and background colors respectively for marked text in the Edit Area. When either button is clicked, the Colors window will prompt you for a color. When the Colors window appears click on the color of your choice and then click on Done.
This item allows you to record macros (ie; to define them by example). Once you execute Start Macro you are in macro definition mode until you execute End Macro or until you exit Phedit. To indicate that you are in macro definition mode the text Rec is displayed on the Statusbar.
See the section on macros for more on this.
This item ends the macro recording that was begun using the Start Macro menu item. It causes the Define Macro window to appear.
In the Macro name field enter the name for the macro. A macro name is only allowed to have alphabetic characters, numeric characters and the underscore character (_). The maximum number of characters allowed is 40.
You must also enter a Keyboard shortcut for the macro.
See the section on macros for more on this.
This item saves all macros and keys to whichever files they were read in from. Any newly recorded macros will be saved to [UserPath]/.phedit.mac and any keys assigned to those newly recorded macros will be saved to [UserPath]/.phedit.key (see the section that talks about the start up search order for how [UserPath] is defined).
This item starts the autosave. It causes the Auto Save window to appear.
You must specify a number of minutes n. From this point on the current file will be saved every n minutes. When the file is saved you will see a message appear on the bottom bar of Phedit's window. This message will flash the line numbers of the file being saved.
Your editing will not be disturbed by the autosave process. You can type ahead and the system's input queue will memorize all your key strokes, dumping them at the end of the autosave process. To terminate autosave set the time to zero.
This item allows you to execute other applications such as make and cc directly from Phedit. When you select this menu item the Run Program prompt window appears.
Any QNX command can be executed.
Choosing this item causes the Character Chart window to appear.
This window allows you to get at the ASCII characters that are not on your keyboard. It displays a list of all possible ASCII characters. To insert a character in your text you click on the button for that character in the list. The character is automatically inserted into your text at the current cursor position just as if you had entered it from a keyboard.
This causes the Custom window to appear.
This window contains entries as long as there are macros defined. Macros are defined as described under Start Macro and End Macro ... above. Clicking on a macro in the list runs the macro and closes the Custom window. To make this window stay on the screen even after you click on a macro you must first click the pin in the top left corner. Use the scroll bar to access all the macros. If a keyboard shortcut is associated with a macro then it appears beside that macro's name. To delete a macro, click on the Delete button, then on the button of the macro which you wish to delete.