Text editorsXeditCommon features of text editors

Common features of text editors

File operations

All text editors have a means to save files to disk and to open existing files. Usually there is a menu along the top or bottom of the window. Typically clicking the mouse on the "File" item opens a drop-down menu with Save and Open options. The more sophisticated editors can display a directory listing and let you choose a file name with the mouse.

Cursor motion

Usually you can move the cursor around the screen with the arrow keys; sometimes with the Page up and Page down keys. You can also position the cursor with the mouse; you may or may not need to click the mouse to reposition the cursor. Editors with mouse support usually have a scroll bar too. Most editors have keyboard shortcuts for cursor motion.

Cut and paste

All editors let you select or cut text and copy or move it elsewhere. If you have mouse support, you typically select text by highlighting it: hold down the left mouse button and drag the mouse across the text. Usually the highlighted text is automatically put on the clipboard: paste it elsewhere by clicking the middle mouse button.

There is usually an Edit item on the menu bar. The drop-down Edit menu will have cut and paste options on it.

Search and replace

Any editor lets you search for specified strings of characters. Decent ones let you replace strings either locally or globally and either with or without confirmation. Good editors can also handle Unix "regular expressions". Look for search and replace on the drop-down Edit menu; there are usually keyboard shortcuts too.

Buffers and windows

Most editors support multiple buffers: temporary storage locations for pieces of text. Good editors also allow you to open multiple windows on the screen (useful for working with two different files or two parts of the same file).

Customization

You can change the appearance and operation of many editors. Look for a Preferences or Options menu entry. Some editors will store a "dot file" in your home directory that records your preferences. The look and feel of X-Windows editors can be modified through your .Xdefaults file.

Exercise on text editing

Here is a little game to make sure that you can perform basic editing tasks. Use the mouse to cut out the following and paste it into your text editor:

Izalp3aalp3ak Walp3alotwoedelotwoeatwo wrdelotwoeaotwoebeotwoea, "Atwoglgammatwog malp3ay bbeotwoea 2alp3agammad otwoedelotwoea bbeotwoea 2delotwoea lgammakbeotwoea otwoe3beotwoea malp3aotwoe3beotwoeamalp3aotwoegammac2, otwoe3alp3aotwoe gammaotwoe calp3atwo twobeotwoeavbeotwoear bbeotwoea fep2ilotwolly lbeotwoeaalp3artwootwoe."

To unscramble this mishmash, use your text editor to make the following global substitutions in this order: 3->h, 2->s, two->n, one->t, epsilon->u, delta->o, gamma->i, beta->e, alpha->a. What does the sentence say?


logo The Math 696 course pages were last modified April 5, 2005.
These pages are copyright © 1995-2005 by Harold P. Boas. All rights reserved.
 
Text editorsXeditCommon features of text editors