]>
gedit1998, 1999, 2000Alex Roberts and Evan Lawrence2000Eric Baudais (Documentation Author)
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.1 or any later version published
by the Free Software Foundation with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy
of the GNU Free Documentation License from
the Free Software Foundation by visiting their Web site or by writing to:
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Many of the names used by companies to distinguish their products and
services are claimed as trademarks. Where those names appear in any
GNOME documentation, and those trademarks are made aware to the members
of the GNOME Documentation Project, the names have been printed in caps
or initial caps.
This is version 1.0 of the gedit manual.
IntroductionGedit is a light-weight text editor. It has
all the basic features you come to expect from a simple text editor, but
gedit has a native graphic user interface (GUI).
Gedit also has command line arguments available to
users to quickly and easily view and edit files from a terminal.
Overall, gedit is an easy to use text editor with
utilizing the powerful capabilities of the GNOME desktop.
Gedit has a verastile plug-in architecture to extend its
capablilties. This allows you to perform functions you don't normally except from a text
editor, such as piping the outputing of a shell command to the screen.
The plug-in architecture also lets you email people,
browse the internet, or produce a diff from gedit.
Gedit provides a variety of ways to accomplish all your
text editing needs. Gedit has the traditional menu,
with all the commands, tools, and options. It also has a toolbar, where the commands
you use most often will be found. You can also place the menu and the toolbar anywhere on
the desktop you choose, for quick access. Gedit also has
a menu in the text window. You need to click the right mouse button
to access the menu. Inside you'll see the common editing commands you use the most.
Gedit provides a menu,
toolbar, and right click menu in order to
give you the quickest and easiest access to gedit's commands.
To run gedit, select
gedit from the
Applications submenu of the Main
Menu, or type gedit on the
command line.
Gedit is a basic application of the
GNOME desktop environment. This document describes version
&version; of gedit.
Using gedit
A text editor is an essential tool for your GNOME desktop. From
writing a small document, editing a configuration file, or composing
a webpage, gedit will fill your
need.
Starting gedit opens
the Main window.
gedit Main Windowgedit Main Window
From here you see the menu bar
which has all the options and tools for gedit.
You also see the toolbar with all
the basic commands you will probably use the most in
gedit. If you right-click on the text window,
under the toolbar, a pop-up menu
will appear displaying some common editing and file commands.
Gedit has plug-ins
so you can send a quick email to a friend, lookup a
webpage if you need help with your work, or produce a file that tells
the difference between two other files, using the diff command.
The shell output plugin inserts the output of any shell command into
gedit. Gedit's
plug-ins will let you insert the current time in your document, as it
appears in date, insert the phrase Hello World
in your current document, reverse the letters in the current document
you're editing, or convert a decimal number to either a hexidecimal
or octal number
Decimal, hexidecimal, and octal numbers are number with a different base.
A decimal number has a base of 10, these are numbers you see everyday,
hexidecimal number has a base of 16, and octal numbers have a base of 8.
So, a decimal number of 45 would be 2D in hexidecimal, and 55 in octal.
and back again.
Using gedit from the Command lineGedit can also be started from the command line,
by typing gedit with the name of the file you want to
edit. This will open a new Main Window of
gedit with the file you typed in the command line.
You can also open multiple files in gedit from
the command line. You type gedit with each file's
name, separated by a space, after the command gedit.
So, to open the three files file1.txt,
file2.txt, and file3.txt, you
need to type geditfile1.txtfile2.txtfile3.txt in a terminal
and gedit will open the three file listed above.
This feature is very handy to quickly edit a configuration file or script
while you are using your favorite shell.
If you open a file using gedit from a
X terminal and then kill the
X terminal, the gedit
you opened will also be killed. This happens because
gedit is a child process of the
X terminal, the parent process. In the
Unix environment if you kill the parent process, all the child processes
that are spawned by the parent process are killed. Killing all the
children of the parent process is very useful in
a Unix environment. It's really okay if you don't understand the above
explanation. Just remember if you open gedit in a
X terminal and kill the X terminal,
gedit will also be killed.
Gedit also has support for pipes when you use it
in a console or X terminal.
When you use a pipe with gedit, on the command line,
Gedit is opened and the output of the other
command that is piped to gedit is displayed as
a text file in gedit'sMain Window.
For example if you want to display a listing of what files are in a specific
directory using the ls command, you will type ls|gedit.
The | (pipe) character varies from keyboard to keyboard, but it will, most often, be
underneath the \ (backslash)character. Some common places to look for the pipe
character is: to the right on the shift key on the right side of the keyboard, to
the right of the ] (square bracket) key or above the enter key on the right side
of the keyboard, or to the left of the backspace key on the right side of the keyboard.
The output of ls,
that is normally displayed on the console or
X terminal, will be displayed in
gedit as a new text file. This option is very useful
for commands that display their output too fast or if you want to use the output
in a text file.
Plug-ins
There are many plugins that come with gedit. They are meant
to extend and enhance the abilities of gedit. The plugins are
separate from the main program and thus supplement gedit while
only adding the capabilities and size to gedit that you want.
Plugin Managerplugin manager
When gedit starts, you will see in the Plugins
menu a menu item for each of the installed plugins. You need to open the
Manager… to choose which plugins
you want to enable in gedit. The plugin manager lets you choose
only the plugins you want to use. You will notice only the plugins you install will be shown
in the Plugin menu. Click on which plugin you want to install,
in the left window, and then press the Add button. This will install one plugin in
gedit and put the plugin in the Plugin menu, so
you can run the plugin. If you want to install all the plugins, just press the
Add All button. To uninstall a plugin in gedit,
click on the plugin you want to uninstall, in the right window, and press the Remove
button. If you want to disable all the plugins, just press the Remove All
button.
The Browse PluginBrowse Pluginbrowse plugin
The browse plugin has a text window to enter the url of the webpage
you want to visit. When you enter the url, gedit displays the
webpage in the main window. If Lynx does
not have the correct path, at the bottom
of the dialog, you can change it by clicking the Change button.
Change Lynx Pathchange lynx path
You then need to enter the correct path for your system in the text window or click the
Browse button to find lynx on your system.
After you have all the correct fields filled in, press the OK to
display the webpage.
The Diff PluginDiff Plugindiff plugin
The diff plugin has two ways to select the file you want to
determine its difference. You can select the original file from the list of files you have opened
in gedit. You can also enter the original file in
the first text window (the one on the left). You then enter the revised file in the second text
window (the one on the right) or by selecting the file from the list of opened files in
gedit (on the right). The difference of the files will then be seen in the
Main Window.
Gedit runs the diff command on the two files
you enter in the dialog. The output is then displayed in gedit'sMain Window. If the first file entered is file1.txt
and the second file entered is file2.txt, then the gedit will display the
output of the command $difffile1.txtfile2.txt.
The Email PluginEmail Pluginemail plugin
The email plugin lets you send the text file you are editing as the body of
the email. The subject will automatically be the filename, but can be changed in the dialog.
The From: text window will automatically have the email address provided by
your system. You can also change it, if you wish the receiving party to send a reply to a different
email address. You need to enter the receiver's email address in the To:
text window. If the path to your sendmail compatible mailer
A sendmail compatible mailer is a program that delivers your email to the correct server on the
internet, so your email will reach its destination. The program uses SMTP
(Simple Mail Transfer Protocol) to send your email. The distinction between a sendmail
compatible mailer and a non-sendmail compatible mailer is the command line arguments.
A sendmail compatible mailer will have the same command line arguments as
sendmail, even if the way it handles everything else is completely
different.
is not displayed at the bottom
of the dialog, you can change it by clicking the Change button.
Change sendmail directorychange sendmail
You then need to enter the correct path of your sendmail compatible mailer, for your system,
in the text window or click the
Browse button to find the sendmail compatible mailer on your system.
If you do not have a sendmail compatible mailer, you need one to use the email plugin.
After you have all the correct fields filled in, press the OK to send
the email or press the Cancel to not send the email.
The Insert Time Plugin
The insert time plugin puts the date and time into the document. It
uses the date command and inserts the output into the text.
The Hello World Plugin
The hello world plugin puts the text Hello World into
the document. It is meant to be a template for all the other plugins. If you are interested in
writing a plugin for gedit, take a look at the source code for the
hello world plugin and contact the maintainers
, so your work isn't duplicated.
The Shell Output PluginShell Output Pluginshell output plugin
The shell output plugin executes the command in the directory that is
displayed and puts the output in the Main Window.The shell output
plugin is designed for inserting text resulting from the execution of a console based command.
However, gedit will not stop you if you try to launch another
application, such as gnumeric. So, should only execute commands
displaying text on the console and commands which are not interactive.
The shell you are using
will stay the same for the shell output plugin. So, if you use bash as your shell,
gedit will execute the command in bash. This lets
you put output you would normally see in a console or terminal in the middle of the text file
you are editing.
Customization
To change the application settings, select
Preferences… from the
Settings menu. This opens the
Preferences dialog.
You can make gedit your default editor. The default editor will start when a
document opens, you need to edit, by another application. To make
gedit your default editor, enter export
EDITOR='gedit' in the terminal. This will only change your
system settings until you reboot again. To make the change permanent, edit your
.bash_profile, if you are using bash.
Add the line export EDITOR='gedit'
to .bash_profile. If you are using another shell, you need to find
out what file to change and change the environment variable $EDITOR to gedit.
GeneralThe Preferences Dialog with the General Tab HighlightedPreferences dialog with General tabAppearance
This section contains:
Show Statusbar —
This option determines whether the status bar at the bottom of the
Main Window is shown or hidden. The status bar
gives you a brief description of the various menu items or messages about
what gedit is currently doing.
Set toolbar according to system settings —
This option displays the toolbar with the system settings for GNOME. You can
change the system settings for the toolbar in the
Control Center. To change the system settings for
GNOME, start the Control Centerby selecting
GNOME Control Center from the
Settings submenu of the Main
Menu. Then select the Applications submenu
from the User Interface menu.
Set toolbar to Icons only —
This option displays the toolbar with just the icons. There is no text under
each icon to tell you what it does. The option overrides whatever you have
selected for the toolbar behavior in the Control Center.
Set toolbar to Icons with text —
This option displays the toolbar with the explanatory text under each icon.
The option overrides whatever you have selected for the toolbar behavior
in the Control Center.
Editor Behavior
This section contains:
Enable Auto-indent —
This option turns on the auto-indent ability in gedit.
Auto-indent automatically indents the text at the same place in the line as the
text in the previous line. Auto-indent is very useful when you are writing
configuration files, scripts, code, etc… If you want to write paragraphs
of text, the auto-indent function can be a hassle.
DocumentsThe Preferences Dialog with the Documents Tab HighlightedPreferences dialog with Documents tabMDI (Multiple Document Interface)
This section contains:
Mode: —
This option specifies the way gedit displays the
Main Window and how it opens new documents. The option
determines the user interface you like to use for the Main Window
There are 4 types of modes gedit can use. They
are the notebook, toplevel, modal, and default modes.
The notebook style looks strikingly similar to the
Preferences… dialog. The most notable thing about
this style is the tabs at the top of the Main Window. The
highlighted tab is the document you are currently viewing. To change the document
to another open document, just click on the cooresponding tab. In the notebook
style you cannot view multiple documents at the same time. Only the current
document can be seen.
The toplevel style opens a new occurance of gedit for
each document opened. The windows are stacked one on top of another, so they
completely overlap. From this position, you can move the multiple
gedit windows around to your liking. This lets you
see more than one document, or different positions in the same document.
The modal style will only open one occurance of gedit, no matter how many documents
you open. You have to use the Documents menu to change between
different documents. The default style is the same style as the modal style. This
is a change from previous versions of gedit. The modal
style is a very plain style for gedit.
Notebook Tab Position: —
This option changes the place the tabs for the notebook style are located.
Undo
This section contains:
Set limit on undo levels to: —
This option sets the number of times you can undo a mistake. So, if
you set the limit to 5 undo levels, then you can only use the undo button
five times. If you make a lot of mistakes, like me, you might want to set
this level higher than the default of 5 undo levels.
Users with low memory, under 16 MB, should set the number of undo levels
lower because gedit stores each
command into memory to the undo level limit. So, if you set the undo
level limit to 50, then gedit will store
up to 50 commands in your main memory.
Fonts/ColorsThe Preferences Dialog with the Fonts/Colors Tab HighlightedPreferences dialog with Fonts/Colors tabFonts
This section contains:
Default Font —
This option changes the font used in gedit.
Colors
This section contains:
Background: —
This option lets you choose the background color in gedit.
This is the background color of the Main Window.
Foreground: —
This option lets you choose the foreground color in gedit.
This is the background color of the Main Window.
PrintingThe Preferences Dialog with the Printing Tab HighlightedFonts/Colors dialog with Printing tabPrinting
This section contains:
Add header —
This option adds a header to each page you print in gedit.
As of gedit version 0.8.0, you cannot configure
the header.
Enable word wrapping —
This option turns on wordwrap. Wordwrap automatically puts the text you typed on the next
line, if you exceed the page's width you select in the Paper tab
of the Preferences dialog. So, you do not have to explicitly press the
return key for each line you wanted printed.
Print line numbers every: —
This option prints the line number of the file. You also have to select how often
you want to line numbers printed. The default is to print the line number every five
lines.
Portrait —
This option selects to print the page using the portrait style. The portrait style
has the text printed across the smallest side of the paper.
Landscape —
This option selects to print the page using the portrait style. The portrait style
has the text printed across the largest side of the paper.
PaperThe Preferences Dialog with the Paper Tab HighlightedFonts/Colors dialog with Paper tab
This section contains:
Paper: —
This option selects the type of paper you will use to print the document.
The width and height boxes will
change automatically for the correct paper size.
Width: —
This option selects the width of the paper you will use to print the document.
To the right of the width box is another box you can use
to change the units the paper is measured in for the width
and height boxes.
Height: —
This option selects the height of the paper you will use to print the document.
To the right of the height box is the units the height
of the paper is measured in.
Set System Paper Size —
This option sets the paper size in the width and
height boxes to the system paper size. The system
paper size is determined by the number in the environment variable $PAPERCONF
or in the file paperconf.
Menus
In gedit there are three different type of menus. The
menu bar contains all the commands, options, and plug-ins.
The toolbar contains selected commands the user uses the
most. The right click menu in the text window,
contains the commands that are useful while editing a file. Only the menu bar
is described in this section because it is so large. The
toolbar and
right click menu are talked about in other sections of
gedit's manual.
Menu Bar
The menu bar can be moved around the
desktop. When you click on the far left side
of the menu bar, on the raised dotted portion, you
can drag
Dragging refers to the action in which you click on an object, with your mouse,
and move the mouse pointer without releasing the previously clicked button.
You can then release the mouse button and the object you were moving with the
mouse will stay on the desktop where you released the mouse button. This
action is generally called drag and drop.
the menu bar with your mouse and move it anywhere on your desktop. The
menu bar can also snap into place on all four sides
of the Main Window, if you place your mouse close
to the edge of the Main Window. The menu bar's
default position is located at the top of the Main Window
and contains the following menus:
File
The menu contains:
New —
This item opens a new file.
F3Open… —
This item brings up the Open File… dialog. From there
you can open an existing file.
Ctl-SSave —
This item saves the current file, if the file was previously saved, or brings
up the Save As&hellip dialog to save the file.
Save All —
This item saves all the files that are open in gedit.
Save As… —
This item brings up the Save As… dialog to save the selected file
in gedit. You should use this command if you want to save the
file under a different name.
Revert —
This item discards all changes you made to your unsaved file and opens the
original file in the Main Window.
1. —
This part of the File menu shows the four most recent
files you opened with gedit. When you click on
one of the files displayed, that specific file is opened.
Print —
Print Document DialogPrint Document dialog
This item brings up the Print Document dialog.
The Print Document dialog is divided into two
parts: the Select printer section and the
Print Range section.
The Select printer section lets you specify whether
the file will be printed to a printer or printed to a pre-press
A pre-press file is one that a professional printing company can take
and produce brochures, flyers, letterheads, etc. The file formats which
are referred to are PS (Postscript) and PDF
(Portable Document Format).
file format.
The button for the Printer and File
options are on the left side of the dialog. If you choose to print the file
to a printer, you need to verify the printing command is correct, in the text
window to the right of the Printer button. If you
choose to print the file to a pre-press file, you need to enter the name of
the file, in the text window to the right of the File
button. The default file name is output.ps.
You also can choose the type of pre-press file format from the pull down
menu Name:.
The Print Range section lets you specify what parts of the
file you wish to print. When the All button is pressed the
whole file will be printed. If you want to specify certain pages, of the file,
to be printed, you need to press the Pages button and enter the
starting and ending page number. If you only want a certain selection of the file,
which you have highlighted, to be printed, you need to press the
Selection button.
There are three buttons at the bottom of the Print Document
dialog. The Print button will print the document using the
options in the Print Document dialog. The
Preview button exits the Print Document
dialog and brings up the Print Preview dialog. The
Print Preview dialog lets you preview the document before
you print it.
Print Preview —
Print Preview Document DialogPrint Preview Document dialog
The Print Preview dialog lets you preview the document before
you print it.
Ctl-WClose —
This item closes the current document in gedit. If
the item isn't saved, gedit will ask you if you
want to save the file or discard the changes you made to the file.
Close All —
This item closes all the documents in gedit. If
any files aren't saved, gedit will ask you if you
want to save the file or discard the changes you made to the file.
Ctl-QExit —
This item exits gedit. If
any files aren't saved, gedit will ask you if you
want to save the file or discard the changes you made to it.
Edit
The menu contains:
Ctl-ZUndo —
This item returns the document to its previous state before each command is executed
or word is typed; it essentially takes back each command or typed word in the order
they were performed. You can only take back a certain number of commands. The
option is configured in the Preferences…
dialog.
Ctl-RRedo —
This item returns the document to its state before the
Undo command was executed. It's the opposite of
Undo.
Ctl-XCut —
This item puts the highlighted text, in the text window,
in a buffer and then deletes the text that is highlighted from the file.
The Paste command takes the text
out of the buffer and inserts it in the file you are editing.
Ctl-CCopy —
This item puts the highlighted text, in the text window,
in a buffer, but does not delete the text that is highlighted.
The Paste command takes the text
out of the buffer and inserts it in the file you are editing.
Ctl-VPaste —
This item takes any text in the buffer and inserts it into the document. The
Cut and Copy commands
are the only way to put text into the buffer.
Select All —
This item highlights all the text in the current file you are editing.
F6Find —
Find DialogFind dialog
This item brings up the Find dialog. You enter the
string you want to search for in the Search For:text window. You can either start your search at the beginning of
you file, pressing the beginning of the document button,
or start it where the cursor is located in the Main Window,
using the cursor position button. You can also specify if
you want gedit to search for the string with the case
how you entered it or have gedit ignore the case of the
search string.
Shift-F6Find Again —
This item searches for the string you previously entered in the
Find dialog.
F7Replace —
Replace DialogReplace dialog
This item brings up the Replace dialog. This allows
you to search for a string and replace it with another string. You enter
the string you want to search for in the Search For:text window. You then enter the string, you want
to replace the string you searched for, in the Replace with:text window. You can either start your search at the beginning of
your file, pressing the beginning of the document button,
or start it where the cursor is located in the Main Window,
using the cursor position button. You can also specify if
you want gedit to search for the string with the case
how you entered it or have gedit ignore the case of the
search string.
When you have the string you want to search for and the string you want to replace
it with entered, click on the Find button, at the bottom
of the Replace dialog, to find the correct string you are
wanting to replace. Then, click the Replace button to
replace the highlighted string with the string in the Replace with:text window. If, instead, you want to replace all
occurances of the string in the Search for:text window, click the Replace All
button.
Goto Line —
Goto Line DialogGoto Line dialog
This item brings up the Goto Line dialog. You enter
the line number you want to move the cursor, in the Main Window,
to. Click the Okay button and your cursor is put at
the line number you specified, starting at the beginning of the file. If the
line number you specified exceeded the maximum number of lines in the file, your
cursor will be placed on the last line of the file.
View
The menu contains:
Add View —
This item opens another window to the current file you are editing. If
you edit the file in one view, the other views of the same file are
updated and your changes are seen across all views of the same file.
Remove View —
This item closes a window to the file you are editing.
You cannot remove a view, if there is only one view open. You need
to have more than one view open to close a view.
Settings
The menu contains:
Show Status Bar —
This item controls whether you see the status bar or not. The status bar
gives you a brief description of the various menu items or messages about
what gedit is currently doing.
Preferences… —
This item brings up the Preferences…
dialog.
Files
The menu contains all the files currently opened in gedit. If
you click on one of the files, the Main Window shows the file
you clicked on so you can edit it.
Help
This menu contains:
Help —
shows this manual.
About — shows
basic information about
gedit, such as
the author's name, current developers, and the application version number.
Right Click Menu
The right click menu is accessed by clicking
the right mouse button in the Main Window of
gedit.
This menu contains:
Ctl-XCut —
This item puts the highlighted text, in the text window,
in a buffer and then deletes the text that is highlighted from the file.
The Paste command takes the text
out of the buffer and inserts it in the file you are editing.
Ctl-CCopy —
This item puts the highlighted text, in the text window,
in a buffer, but does not delete the text that is highlighted.
The Paste command takes the text
out of the buffer and inserts it in the file you are editing.
Ctl-VPaste —
This item takes any text in the buffer and inserts it into the document. The
Cut and Copy commands
are the only way to put text into the buffer.
Select All —
This item highlights all the text in the current file you are editing.
Ctl-SSave —
This item saves a file, if it is an existing file, or brings up the
Save As… dialog to save the new file.
Ctl-WClose —
This item closes the current document in gedit. If
the item isn't saved, gedit will ask you if you
want to save the file or discard the changes you made to the file.
Print —
This item brings up the Print Document dialog.
See the Print Document
dialog to find out more about the Print command
in gedit.
Known Bugs and Limitations
At this point gedit does not have syntax highlighting.
The current text widget that gedit uses is not
suitable for this feature.
Frequently Asked Questions
I want syntax highlighting. When will it be included?
Currently, the GTK+ Text widget isn't suitable for syntax highlighting to be implemented
reliably. We might add syntax highlighting when we migrate to the new text widget.
On the other hand, gedit intends to be a simple text editor.
If you are looking for syntax highlighting, we strongly recommend you use a full featured
text editor like VIM, emacs, or
elvis.
Authorsgedit was written by Alex Roberts
(bse@error.fsnet.co.uk) and Evan Lawrence.
gedit is currently being maintained by
Chema Celorio (chema@celorio.com) and Jason Leach
(leach@wam.umd.edu). The artwork for
gedit was done by Steve Hall
(steve_hall@mindspring.com). To find more information about
gedit, please visit the gedit web
page at http://gedit.sourceforge.net. Please send all comments and suggestions to
the gedit mailing list
(gedit-list@sourceforge.org). Send all bug
reports to the GNOME
bug tracking database. (Instructions for submitting bug
reports can be found
on-line.) If you are using
GNOME 1.1 or later, you can also use Bug Report
Tool (bug-buddy), available in the
Utilities submenu of Main
Menu, for submitting bug reports.
This manual was written by Eric Baudais
(baudais@okstate.edu). Please send all comments and
suggestions regarding this manual to the GNOME Documentation Project
by sending an email to docs@gnome.org. You can also
add your comments online by using the GNOME Documentation Status
Table.
License
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is
included as an appendix to the GNOME Users
Guide. You may also obtain a copy of the
GNU General Public License from the Free
Software Foundation by visiting their Web site or by writing to
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA02111-1307USA