### 16.4 The Plug-ins Editor

GPS can be extensively customized through external plug-ins. You can write your own plug-ins (see Customization files and plugins), but GPS also comes with its own collection of plug-ins.

Some of them are loaded by default when GPS starts (for instance the support for the CVS version management system or support for highlighting in various programming languages); others are available for any user but not loaded automatically by GPS, for instance an Emacs emulation mode.

Among the plug-ins that are provided with GPS, you will find:

- Emacs emulation Several plug-ins emulate some of the functions provided by Emacs, such as the interactive search, manipulation of rectangles, navigation in the editor, and of course the usual Emacs key shortcuts

  This emacs mode used to be activated in the preferences dialog, on the Themes page, but you should now activate it by loading the `emacs.xml` plug-in.

- Makefile support A plug-in is provided that parses a Makefile and creates menus for each of its possible targets, so that you can easily start a make command.
- Cross-references enhancements Various plug-ins take advantage of GPS's cross-references information to create additional menus to navigate (for instance to jump to the primitive operations of Ada tagged types, to the body of Ada separate entities, ...)
- Text manipulation Several plug-ins provide support for advanced text manipulation in the editors, for instance to be able to align a set of lines based on various criteria, or to manipulate a rectangular selection of text.

You can chose graphically which plug-ins should or should not be loaded on startup. To do so, select the menu `/Tools/Plug-ins`. This brings up a new window, containing two parts:

- On the left is the list of all known plug-ins.

  As described in See Customization files and plugins, GPS will search for candidates in various directories, and based on these directories decide whether to automatically load the plug-in or not.

  This list indicates the name of the plug-in, and whether it has been loaded in this GPS session (when the toggle button is checked).

- On the right are the details for the selected plug-in

  This window is displayed as a notebook with two pages: on the first one you will see the exact location of the plug-in, the reason why it was loaded or not, and, more importantly, the source of the plug-in. By convention, each plug-in starts with a general comment that indicates the purpose of this plug-in, and some more detailed documentation on its usage.

  For those interested, this also contains the plug-in itself, so that this can act as an example to create your own customization script.

  Technically, the list of plug-in to load or not to load are stored in the file `HOME/.gps/startup.xml`.

  If you have modified anything through this dialog (the list of plug-ins to load or unload), you will need to restart GPS. GPS cannot unload a module, since it can have too many possible effects on GPS (adding menus, overriding key shortcuts, ...).

  A dialog is displayed asking you whether you would like to exit GPS now. This will properly save all your files.