[Previous] [Contents] [Index] [Next]

ped

Start Photon editor

Syntax:

ped [-a] [-h height] [-l locale] [-p filespec] 
    [-S i|m|n] [-s server] [-t space]
    [-w width] [-x x_pos] [-y y_pos] 

Options:

-a
Save and load files with attributes (special fonts, bold, italic, etc.).
-h height
Set initial height of window to height pixels.
-l locale
Encode the text using the selected "locale." The default is "C" for English and UTF-2.
-p filespec
Use this default file specification pattern in the save/open/load file selector.
-S i|m|n
Specify initial window state (i - iconify, m - maximize, n - normal).
-s server
Specify server node or device name to display ped on.
-t space
Set tab stop spacing.
-w width
Set initial width of window to width pixels.
-x x_pos
Initial x_pos position of window.
-y y_pos
Initial y_pos position of window.

Description:

The ped application is a simple editor designed to support Unicode (UTF-8) formatted files only. It also provides simple search and replace capabilities.

The name and path of the file opened in the editor appear in the top window frame. At the bottom of the window, the line and column indicators as well as the filename (no path) appear.

The font button in the top right corner indicates the current font of the text at the cursor position. Clicking on this button is the same as selecting the Font option from the Type menu ( Ctrl -Alt -F ). The colored rectangle beside the text field indicates the text color at the current cursor position. Clicking on this rectangle is the same as selecting the Color option from the Type menu ( Ctrl -Alt -C ).

You can use the following mouse shortcuts to select text:

If you want to: Do this:
Position the cursor single-click
Select the word under the cursor double-click or
Alt-click
Select the current line triple-click
Select the current paragraph quad-click
Select all pent-click
Extend the highlighted region Shift-click
Select text Hold down the left mouse button and drag.
Copy selected range to clipboard While holding down the left mouse button, press the right mouse button.

You can use keyboard commands to select, copy, paste, and format text, as well as select items from the menu.

Cursor movement commands

If you hold down the Shift key when using any of the following cursor movements, all of the text covered by that movement is highlighted.

If you want to move: Press:
The cursor one position in the direction of the arrow /\, \/, <--, -->
To the beginning of the line Home
To the beginning of the document Ctrl -Home
To the end of the line End
To the end of the document Ctrl -End
Up one page Page Up
Down one page Page Down
Forward one word Ctrl-->
Back one word Ctrl<--
Find the matching brace or quote for "( )", "{ }", "[ ]", single quote, or double quotes F10

Note: Matching quotes are searched in the forward direction only.

Deletion commands

If you want to delete: Press:
The line Ctrl -U
To the end of the line Ctrl -K
The character to the right of the cursor position Delete
The character to the left of the cursor position Backspace
Selected text Any key that deletes or inserts text.

When you have text selected for deletion, any key that types or deletes text will replace the selected text. The deleted text is moved to the clipboard until it's replaced by the next deletion or explicit clipboard loading operation.

Formatting commands

To format text as: Press:
Bold Alt -B
Italic Alt -I

If text is selected, only the selected text is formatted. If no text is selected, begin to format text when typed.

Centering commands

To align the text: Press: Description:
Left margin Alt -L Align the line of text that the cursor is on to the left margin.
Center Alt -C Center the line that the cursor is on.
Right margin Alt -R Align the line of text that the cursor is on to the right margin.

Clipboard commands

If you want to: Press:
Copy selected text to the clipboard. Ctrl -C
Move selected text to the clipboard (and delete the selected text). Ctrl -X or
Ctrl -Alt -X
Delete the current line. Ctrl -U
Paste the clipboard text at the current cursor position. Ctrl -V or
Ctrl -Alt -V

Note: When you're in overwrite mode, each character you type gets saved to the clipboard.

If a paste replaces text, the replaced text is moved to the clipboard.

Special commands

If you want to: Press: Description:
Invoke Helpviewer Ctrl -Alt -H Searches for the selected text in Helpviewer.

File menu operations

Menu item: Hotkey: Description:
File menu Alt -F Displays the File drop-down menu.
New Ctrl -N or Alt -F -N Clears the current buffer and filename after you confirm the action.
Open Ctrl -O or Alt -F -O Opens a new buffer, replacing the current buffer after you confirm the action.
Save Ctrl -S or Alt -F -S Saves the current buffer to the current filename.
Save As Ctrl -A or Alt -F -A Saves the current buffer to a specified filename.
Print Ctrl -P or Alt -F -P Prints the file.
Exit Alt -X or Alt -F -X Exits after you confirm the action (if changes to current buffer haven't been saved).

Search menu operations

Menu item: Hotkey: Description:
Search menu Alt -S Displays the Search drop-down menu.
Find Ctrl -F or Alt -S -F Finds the next occurrence of the specified string.
Search & Replace Ctrl -R or Alt -S -R Finds the next occurrence of the search string and replaces it with the replace string.
Search & Replace F2 Searches for the text that was last entered as the search string.
Search & Replace F3 Replaces the selected text with the "replace" text and repeats the search.
Goto Line Ctrl -G or Alt -S -G Goes to the specified line.

When the Find dialog is displayed, Enter finds the next occurrence when the search field has focus. F2 repeats the search; the search window doesn't have to be in focus or even open.

When the Search and Replace dialog is displayed, Enter repeats the operation while the Replace field has focus. F2 finds the next occurrence of the search string. F3 replaces the currently selected text, then finds and highlights the next instance of the search string. Esc closes the Search window.

Options menu operations

You use this dialog to change the defaults and the file encoding operations.

Menu item: Hotkey: Description:
Options menu Alt -O Displays the Options drop-down menu.
Defaults Ctrl -D or Alt -O -D Brings up a dialog for configuring the default configuration for ped sessions.
Encoding Ctrl -E or Alt -O -E Selects the encoding to use as a filter for the file being loaded or saved.

With the Defaults dialog, you can set the default for background color, text color, font, tab size, text wrap, auto indent, and the file specification to use when bringing up load/save dialogs.

In addition, there's a control that dictates whether or not attribute information is preserved when loading or saving files. (The attributes are saved in a C-style comment at the end of the file if this option is enabled.) The attribute information is saved to .photon/pedrc.

The background and text colors are applied (updated) immediately when a color is selected so that you can see the change without leaving the dialog box.

The specified encoding is assumed on the file. When the file is loaded, it's converted to UTF-8. When the file is saved, it's converted from UTF-8. (The editor works with UTF-8 encoded Unicode text internally.)


Note: If the editor's current encoding selection doesn't match a file being loaded, the file will likely fail to load in its entirety. You'll have to select a new translation and try to load the file again. To translate a file from one encoding to another:
  1. Select the current file encoding.
  2. Load the file (translate using the selected translation to UTF-8).
  3. Select the desired encoding.
  4. Save the file (translate from UTF-8 using the new translation during the save).

Type menu operations

Menu item: Hotkey: Description:
Type menu Alt -T Displays the Type drop-down menu.
Font Ctrl -Alt -F or Alt -T -F Opens the font selection dialog.
Color Ctrl -Alt -C or Alt -T -C Opens the color selector.

In the Font dialog, you can choose the font (typeface, style, and size) for the selected range. The selected font will be used to modify the selected text range. If there's no selected text range, the selected font will be used for the next text entered. (The font buttons indicate the typeface and style of the text that's inserted whenever text is entered at the current cursor location.)

In the Color dialog, you can choose the text color for the selected range. This dialog lets you select a foreground color for the selected text range. If there's no selected text range, the selected color will be used for the next text entered. (The color button always indicates the color of text that will be inserted when text is entered at the current cursor location.)

Examples:

Run ped using the Photon server on node 4:

ped -s4

Or

ped -s//4/dev/photon

Run ped at initial position (10,10) with initial dimension of 200*300:

ped -x10 -y10 -h200 -w300

Edit a plain text file encoded in Japanese Shift-JIS.

ped -a -l ja_JP.sjis

Files:

$HOME/.photon/pedrc
User's configuration file.

[Previous] [Contents] [Index] [Next]