gedit
<<< Previous |  | Next >>>

# 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.

Figure 2. Plugin 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 Plugin

Figure 3. Browse 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.

Figure 4. Change 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 Plugin

Figure 5. Diff 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's` Main 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 `$`diff `file1.txt` `file2.txt`.

## The Email Plugin

Figure 6. Email 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 [1] is not displayed at the bottom of the dialog, you can change it by clicking the Change button.

Figure 7. Change sendmail directory

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 Plugin

Figure 8. Shell 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.

### Notes

[1] | 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.

<<< Previous | Home | Next >>>
Using gedit |  | Customization