Bookmark this page

Editing Text Files with a Graphical Editor

Using an editor in a graphical desktop environment to change file content and move text between windows and files.

Objectives

After completing this section, students should be able to:

  • Edit text files with gedit.

  • Copy text between graphical windows.

Editing files with gedit

Editing text files with a graphical editor

The gedit application is a full-featured text editor for the GNOME desktop environment. Launch gedit by selecting ApplicationsAccessoriesgedit from the GNOME menu. Like other graphical applications, gedit can be started without navigating the menu. Press Alt+F2 to open the Enter a Command dialog box. Type gedit and press Enter.

Figure 4.11: gedit text editor

GNOME Help includes a gedit help guide, which may be found by selecting ApplicationsFavoritesHelp from the GNOME menu. Then select GoAll Documents to view the list of graphical applications. Scroll down to select the gedit Text Editor hyperlink.

Basic gedit Keystrokes

Perform many file management tasks using gedit's menu:

  • To create a new file in gedit, click the blank paper toolbar icon, or select FileNew (Ctrl+n) from the menu.

  • To save a file, click the disk-drive save toolbar icon, or select FileSave (Ctrl+s) from the menu.

  • To open an existing file, click the Open toolbar icon, or select FileOpen (Ctrl+o) from the menu. The Open Files dialog window will display from which users can locate and select the file to open.

Multiple files may be opened simultaneously, each with a unique tab under the menu bar. Tabs display a file name after being saved the first time.

Copying text between graphical windows

Text can be copied between documents, text windows, and command windows in the graphical environment. Selected text is duplicated using copy and paste or moved using cut and paste. Whether cut or copied, the text is held in memory for pasting into another location.

To select text:

  • Click and hold the left mouse button before the first character desired.

  • Drag the mouse over and down until all required text is in a single highlighted selection, then release the left button. Do not click again with the left button, as that deselects the text.

To paste the selection, multiple methods can accomplish the same result. In the first method:

  • Click the right mouse button anywhere on the text area just selected.

  • From the resulting context menu, select either cut or copy.

  • Move the mouse to the window or document where the text is to be placed, click the left mouse button to position where the text should go, and click the right mouse button again, now choosing paste.

Here is a shorter mouse technique to practice:

  • First, select the text.

  • Hover the mouse over the destination window and click the center mouse button, just once, to paste the text at the cursor.

This last method can only copy, not cut. The original text remains selected and can be deleted. As with other methods, the text remains in memory and can be repeatedly pasted.

Figure 4.12: Select and paste using middle mouse button

The keyboard shortcut method can also be used in graphical applications:

  • First, select the text.

  • Use Ctrl+x to cut or Ctrl+c to copy the text.

  • Click the location where the text is to be placed to position the cursor.

  • Use Ctrl+v to paste.

Note

Ctrl+c and Ctrl+v will not copy and paste within a terminal window. Ctrl+c will actually terminate the current running process within a terminal window. To copy and paste within a terminal window, use Ctrl+Shift+c and Ctrl+Shift+v.

References

gedit(1) man page

gedit Text Editor

  • yelp help:gedit

gedit Wiki

Revision: rh124-7-1b00421