]> The &kedit; Handbook ThadMcGinnis
ctmcginnis@compuserve.com
Lauri Watts
lauri@kde.org
Reviewer
2003-09-16 1.3 &FDLNotice; This Handbook describes &kedit;, a simple text editor for &kde; KDE KEdit text editor 2000 Thad McGinnis
Introduction &kedit; is a text editor for the &kde; Desktop. It is a small editor which can be used with &konqueror; for text and configuration file browsing. &kedit; also serves well for creating small plain text documents. It is not meant to be a programmers editor, in particular it is not meant to replace any of the more powerful editors such as &kate;, XEmacs or Emacs. &kedit;'s functionality will intentionally remain rather limited to ensure a reasonably fast start. Some Fundamentals &kedit; is very simple to use. Anyone that has used a text editor should have no problems. Drag and Drop &kedit; uses the &kde; Drag and Drop protocol. Files may be dragged and dropped onto &kedit; from the Desktop, &konqueror;, or some remote &FTP; site opened in one of &konqueror;'s windows. Command Line Options Though &kedit; may most often be started from the &kde; program menu, or a desktop icon, it can also be opened at the command line prompt of a terminal window. There are a few useful options that are available when doing this. Specify a File By specifying the path and name of a particular file the user can have &kedit; open (or create) that file immediately upon startup.This option might look something like the following: %kedit /home/myhome/docs/myfile.txt Specify a file on the Internet The above-mentioned method could even be used to open files on the internet (if the user has an active connection at the time.) An example of this might look like the following: %kedit ftp://ftp.kde.org/pub/kde/Welcome.msg Other Command Line Options The following command line help options are available kedit This lists the most basic options available at the command line. kedit This lists the options available for changing the way &kedit; interacts with &Qt;. kedit This lists the options available for changing the way &kedit; interacts with &kde;. kedit This lists all of the command line options. kedit Lists &kedit;'s authors in the terminal window kedit Lists version information for &Qt;, &kde;, and &kedit;. Also available through kedit Key Bindings Many of the key bindings (shortcuts) are configurable by way of the Settings menu. By default &kedit; honors the following key bindings. Key Binding Action Left Arrow Move the cursor one character leftwards. Right Arrow Move the cursor one character rightwards. Up Arrow Move the cursor one line upwards Down Arrow Move the cursor one line downwards. Page Up Move the cursor one page upwards. Page Down Move the cursor one page downwards. Backspace Delete the character to the left of the cursor. Home Move the cursor to the beginning of the line. End Move the cursor to the end of the line. Delete Delete the character to the right of the cursor. &Shift;Left Arrow Mark text one character leftwards. &Shift;Right Arrow Mark text one character rightwards. &Ctrl;A Select all the text in the document. &Ctrl;B Move the cursor one character leftwards. &Ctrl;C Copy the marked text to the clipboard. &Ctrl; D Delete the character to the right of the cursor. &Ctrl;E Move the cursor to the end of the line. &Ctrl;F Search for text in the document. &Ctrl;G Go to line. &Ctrl;H Delete the character to the left of the cursor. &Ctrl;K Create a new document &Ctrl; N Move the cursor one line downwards. &Ctrl; P Print. &Ctrl;V Paste the clipboard text into the document at the text cursor position. &Ctrl;X Cut the marked text, copying it to the clipboard. &Ctrl; Y Yank (paste) the content of the kill-buffer (clipboard) into the document, at the current cursor position. The Menu Entries The <guimenu>File</guimenu> Menu &Ctrl;N FileNew This starts a new Document in a new instance of the editor. &Ctrl;O FileOpen... This command opens a file. It does this by means of a dialog box which allows the user to navigate the file system. The dialog operates like a small file manager. Clicking on folders displayed in the central window directs the dialog to enter that folder - displaying its contents. There is an entry/drop down box which can be used to directly type in the location and name of the file or by clicking the arrow at the side choose from a drop down list of recently used locations. Below this is a filter which similarly may have data entered directly or chosen from a drop down list of recent filter types. The filter facility lets only files that meet its specifications be displayed in the central window. If the filter contained text such as *.txt then only files with the txt extension would be visible in the selection window. The toolbar has left and right arrow buttons that let the user move back and forth through previously selected folders as well as an up arrow button for moving up the folder tree. The button with the little house takes the user to his or her home folder, and the one with the two arrows curved in on each other updates the view of the current folder. The flag button lets the user set a new bookmark at the current folder or go to one that was previously set. The icon of the folder with the sparkle on it, allows you to create a new folder. Finally there is drop down box on the toolbar with a list of some commonly frequented folders. FileOpen Recent This is a shortcut to open recently saved documents. Clicking on this item opens a list to the side of the menu with a list of several of the most recently saved files. Clicking on a specific file will open it in &kedit; - if the file still resides at the same location. &Ctrl;S FileSave This saves the current document. If there has already been a save of the document then this will overwrite the previously saved file without asking for the user's consent. The editor can be configured to make a backup. If it is the first save of a new document the save as dialog (described below) will be invoked. FileSave As... This allows a document to be saved with a new file name. This is done by means of the file dialog box described above in the Open section of this help file. &Ctrl;P FilePrint... This opens a simple print dialog allowing the user to specify what, where, and how to print. The user can choose between the standard lpr or a custom command as well as whether to print the whole document or a selected section. FileMail... This is used to email the current document. It calls a mail dialog whereby the user can enter the address and subject for the message. You may set your preferred mail client in &kcontrol; &Ctrl;W FileClose This will close the editor window, if you have more than one instance of &kedit; running, those instances will not be closed. &Ctrl;Q File Quit This closes the editor. The <guimenu>Edit</guimenu> Menu &Ctrl;Z EditUndo This is used to eliminate or reverse the most recent user action or operation. &Ctrl;&Shift;Z EditRedo This will reverse the most recent change (if any) made using Undo. &Ctrl;X EditCut This command deletes the current selection and places it on the clipboard. The clipboard is a feature of &kde; that works invisibly to provide a way to transfer data between applications. &Ctrl;C EditCopy This copies the currently selected text to the clipboard so that it may be pasted elsewhere. The clipboard is a feature of &kde; that works invisibly to provide a way to transfer data between applications. &Ctrl;V EditPaste This will insert the contents of the clipboard at the cursor position. The clipboard is feature of &kde; that works invisibly to provide a way to transfer data between applications. &Ctrl;A EditSelect All This will select the entire document. This could be very useful for copying the entire file to another application. &Ctrl;F EditFind... This opens the find dialog which is used to specify the text to Find in the document. There is small text box for entering the search pattern. Two other options are included to make the search more efficient. Selecting Case sensitive will limit finds to entries that match the case (upper or lower) of each of the characters in the search pattern. Find backwards directs the search to proceed in an upwardly direction. F3 EditFind Next This repeats the last find operation, if any, without calling the find dialog box. &Ctrl;R EditReplace... This command opens the replace dialog box. The replace dialog is similar to the above-mentioned find dialog but with the addition of a Replace with: text box. Using this dialog the user can specify both the text to be found and text with which to replace it. This dialog also contains two additional buttons. The Replace button allows the user to make one replacement at a time which is useful when not all instances of the searched for text should be replaced. The Replace All button should be used with caution as it will immediately replace every instance of the specified text. EditInsert File... This opens the FileOpen dialog box whereby the user can insert a complete file in the open document. The file will be entered at the position of the blinking text cursor. EditInsert Date This will enter the current date at the position of the blinking text cursor. EditClean Spaces Choosing this item will remove from any selected text any extra spaces and all carriage returns (the code for the end of a paragraph brought about by pressing the Enter key.) In other words, any occurrences of two or more spaces will be reduced to one space; and all paragraphs and blank lines will be reduced to one single paragraph. The <guimenu>Go</guimenu> Menu &Ctrl;G GoGo to Line... This opens the goto line dialog box which is used to have the cursor jump to a particular line (specified by number) in the document. The line number may be entered directly into the text box or graphically by clicking on the up or down arrow spin controls at the side of the text box. The little up arrow will increase the line number and the down arrow decrease it. The <guimenu>Tools</guimenu> Menu ToolsSpelling... This initiates the spell checking program - a program designed to help the user catch and correct any spelling errors. Clicking on this entry will start the checker and bring up the speller dialog box through which the user can control the process. There are three text boxes lined up vertically just to the left of center with their corresponding labels further to the left. Starting at the top they are: Misspelled word: Here, the spell checker indicates the word currently under consideration. This happens when the checker encounters a word not in its dictionary - a file containing a list of correctly spelled words against which it compares each word in the editor. Replacement: If the checker has any similar words in its dictionary the first one will be listed here. The user can accept the suggestion, type in his or her own correction, or choose a different suggestion from the next box. Suggestions: The checker may list here a number of possible replacements for the word under consideration. Clicking on any one of the suggestions will cause that word to be entered in the Replacement: box, above. On dialog box are 8 buttons that allow the user to control the spell check process. They are: Replace This button has the checker replace the word under consideration in the document with the word in the Replacement: box. Replace All This button causes the checker to replace not only the current Misspelled Word: but to automatically make the same substitution for any other occurrences of this Misspelled Word: in the document. Ignore Activating this button will have the checker move on without making any changes. Ignore All This button tells the checker to do nothing with the current Misspelled Word: and to pass over any other instances of the same word. This only applies to the current spell check run. If the checker is run again later it will stop on this same word. Add Pressing this button adds the word in the Misspelled Word: box to the checker's dictionary. This means that in the future the checker will always consider this word to be correctly spelled. Help This invokes the &kde; help system starting at the &kedit; help pages (this document). Stop This button stops the spell check process. Cancel This button cancels the spell check process. Located horizontally along the bottom of the spell check dialog is a progress bar. As the checking process proceeds the bar will fill from left to right providing a graphical representation of how far along in the document the process has reached. A numerical display of the spell check process is simultaneously displayed in the status bar of the editor. The status bar is the horizontal strip at the bottom of the editor just outside of the text entry area. The <guimenu>Settings</guimenu> Menu SettingsShow Toolbar When checked, this displays a movable toolbar containing buttons used to initiate frequently used commands. The toolbar is most commonly located at the top of the editor just under the menu. When unchecked the toolbar is hidden. Clicking on the striated grip will hide or unhide the bar. Clicking and dragging on this grip allows the user to move the bar. SettingsShow Statusbar When checked, this displays a small bar at the bottom of the editor containing information about the status of the current document. When unchecked the status bar is hidden. SettingsSave Settings This saves the current editor settings to be used for future documents. SettingsConfigure Shortcuts... This command opens a dialog box whereby the key bindings may be changed. A display window at the top of the dialog box shows the list of commands available. Below the display are three radio buttons. The user may choose a modifier key from None, Default, and Custom. Note that a set of radio buttons only allows the selection of one of the offered items - in the way that buttons on a car radio only offer the selection of one preset station. Also, the Default Key selection is only available for those commands that actually have a default shortcut.) Selecting the Custom key option activates the three check boxes and key button at the bottom of the dialog. The user may then select a combination of keys for the command in question by means of the check boxes and key button. For example, with the About &kde; command selected in the display window, the user could select &Ctrl; and &Alt;, click on the key button, and then press the K key on the keyboard. This would mean that anytime he or she held down the &Ctrl; and &Alt; buttons and pressed K (while using &kedit;) the About &kde; display box would be called. SettingsConfigure Toolbars... This will open the dialog whereby the toolbar configuration may be changed. The user can choose which shortcut buttons should appear on the toolbar, as well as whether and where any text should appear with the buttons. Other choices include button (icon) size and toolbar location (top, left, right, floating, or flat.) Flat causes the toolbar to be retracted. A click on the striated grip icon will extend it for use and another click retract it again. A display window on the left lists the commands available to be placed on the toolbar. A display on the right lists those commands already on the toolbar. A set of four arrow buttons between the two displays manipulates the selections. The right pointing arrow places any command selected in the left pane onto the right pane, &ie;, it is added to the toolbar. The left arrow does just the opposite, removing any action selected in the right window from the toolbar. The up and down pointing arrows change the position of an action selected in the right window which changes the position of its button in the toolbar. SettingsConfigure KEdit... This menu item opens a dialog whereby several different settings may be adjusted. The <guimenuitem>Help</guimenuitem> Menu &help.menu.documentation; The Preferences Dialog Selecting SettingsConfigure KEdit from the menu brings up the preferences dialog box. This dialog can be used to alter a number of different settings. The settings available for change vary according to which category the user chooses from a vertical list on the left side of the dialog. By means of a row of five buttons along the bottom of the box the user can control the process. She or he may invoke the Help system, set the options to their Default values, accept the current settings and close the dialog by means of the OK button, Apply the current choices to the document without closing the dialog, or Cancel the process. The categories Font, Color, Spelling, and Miscellaneous are detailed below. Font The preferences dialog opens with this, the first category, chosen. Here the user can change four settings and see the effects of any changes in the text sample displayed in the rectangle at the bottom or the box. The settings are: Font: This scroll box allows the user to select by name from among the various fonts available. The appearance of any selected font may be seen in the sample text displayed in the rectangle at the bottom of the dialog. Font style: This, the center, selection box is used to choose between the four basic styles of Regular, Italic, Bold, and Bold Italic. The appearance of the selected style may be seen in the sample text displayed in the rectangle at the bottom of the dialog. Size: This, the rightmost scroll/selection box allows the user to change font size. The larger the number chosen the larger the font size will be. The sample text displayed in the rectangle at the bottom of the dialog will reflect the choice of size. Color This section provides access to two different color settings, described below. Each of these settings may be changed by clicking on its corresponding button. These are special wide buttons that are the color of the current setting. Clicking on one of the buttons calls a special color dialog box used to change the setting. The color dialog box provides a convenient and graphical way to select a color. In the upper left of the box is a rectangular display of a spectrum of colors. To the immediate right of this, is a vertical bar displaying a range of intensity from the most dark at the bottom to the most light at the top. The user may select and adjust a color by clicking in these two boxes. Clicking in the rectangular display selects a particular mix of red, green, and blue colors and in the vertical bar selects a level of intensity (value). The various color attributes are displayed in numerical form in small text boxes located directly below the spectral rectangle and the user can see them change as the color is adjusted. These attributes include the mix of the basic color components (red, green, and blue) as well as hue and saturation levels. Alternatively the user can enter figures directly in these boxes. There is also a square at the bottom center of the dialog box which displays the color which is under consideration at any time. To the right of this display is another text box labeled HTML: This shows the user the color code that would be used to specify the particular displayed color in HTML code which is widely used for web pages. In addition to the above, the color dialog allows the capture of any color currently displayed on the desktop or in another program. Clicking on the button with the dropper icon (located on the right side of the dialog box) changes the shape of the mouse cursor to a set of cross hairs. Clicking again will pick up the color attributes of whatever color is displayed under the cross hairs. Furthermore the user has the option of adding any color to a personal palette of Use custom colors by clicking on the wide button labeled Add to Custom Colors (which is located above the display square.) This adds the current color to the custom color palette. This palette and any other available palettes can be displayed using the drop down selection box located directly above the palette display at the top right of the dialog box. Besides the custom colors, the user can access a number of pre-prepared palettes. Use custom colors By default &kedit; will use your system color scheme. If this is enabled, you may choose a Foreground and background color below. Foreground color: Here the user can specify a color for the text used in &kedit;. Background color: Here the user can specify a color for the general background of &kedit;. Spelling A spell checker is a program designed to help the user catch and correct any spelling errors. This section of the preferences dialog allows certain key settings to be adjusted in this regard. Create root/affix combinations not in dictionary Selecting this option allows the spell checker to register as correct combinations of root words with suffixes or prefixes even if the particular combination is not listed in its dictionary database of words. Consider run-together words as spelling errors Selecting this will cause the spell checker to register as misspelled two or more correctly spelled words that are run-together, &ie;, that do not have spaces separating them. Dictionary: Depending on the user's installation, one or more different language spelling dictionaries may be available. This drop down box allows the user to choose which language the spell checker should use. Encoding: There are different coding systems used to associate particular codes with particular characters and symbols. If the user knows which code he or she is using this drop down box allows this code to be specified so that the spell checker can do its job correctly. Client: Since &kedit; does not contain its own spell checker, an external one must be chosen. This is where the user may specify which spell check program to use. Miscellaneous This category deals with three different properties detailed below. Word wrap: Word wrap is a feature that causes the editor to automatically start a new line of text and move (wrap) the cursor to the beginning of that new line. The drop down box at the top of the dialog provides the following three word wrap choices: Disable Wrapping Choosing this will keep the editor from doing any wrapping. The user will have to start new lines manually (with the Enter key.) Soft wrapping This choice has the editor automatically adjust the line lengths to fit its current width. In other words, the wider the user makes the editor the longer the lines will be; and the narrower the editor, the shorter the lines will be. These line breaks are not saved in the file. At specified column Choosing this activates a text box immediately below, labeled Wrap column:. Here the user may specify the maximum number of characters in a line of text. Each character including spaces fills one column. Make backup when saving a file This check box tells the editor to rename the last saved version of the current document before carrying out a save command. The editor does this by adding a tilde (~) at the end of the name of the original file. In this way the user has a chance to recover a document if she or he had mistakenly saved something over it. Credits and Licenses &kedit; Copyright 2000 by Bernd Johannes Wuebben wuebben@math.cornell.edu Documentation Copyright 2000 by Thad McGinnis ctmcginnis@compuserve.com. This version of the &kedit; Handbook is based on the original by: Bernd Johannes Wuebben wuebben@math.cornell.edu &underFDL; &underGPL; Installation &install.intro.documentation; &install.compile.documentation;