Comment installer un plugin pour gEdit v3?


45

Je viens d'installer ubuntu 11.10 et je souhaite installer un plugin for gEdit.

J'ai décompressé le plugin dans le dossier suivant: ~/.gnome2/gedit/plugins mais dans le gedit n'apparaît pas le plugin.

44

gEdit 3

The version of gEdit in Oneiric & above is v3 built using gtk+3 libraries. The plugin folder locations are slightly different than from gEdit v2.

Every plugin needs at least two files.

One file (pluginname.plugin) is to tell gedit:

  • where the plugin can be found,
  • what it's called,
  • a short description,
  • who is the author, etc.

This file is in the .desktop format.

The second file is the actual code.

Both of these files need to be placed in either:

  • the system-wide plugins directory /usr/lib/gedit/plugins/, or
  • in the user plugins directory, which may have to be manually created - ~/.local/share/gedit/plugins/.

Installing Plugins

First create the plugin folder:

mkdir -p ~/.local/share/gedit/plugins

Now create a .plugin file using gedit N.B. these files have the format:

[Plugin]
Loader=python
Module=examplepy
IAge=3
Name=Example py
Description=A Python plugin example
Authors=Jesse van den Kieboom <[email protected]>
Copyright=Copyright © 2006 Jesse van den Kieboom <[email protected]>
Website=http://www.gedit.org

source


For your v2 plugin you already have a file called project-manager.gedit-plugin so you can rename it:

mv project-manager.gedit-plugin project-manager.plugin

Then edit the plugin file and change the section header to "[Plugin]"

You will now see this in your gedit plugin list.

However for me it threw errors about "import gedit, gtk, gtk.glade".

You need to change the source code to import the gtk+3 variants - called python introspection.

An excellent tutorial for converting from gtk+2 to gtk+3 see


6

I finally found where the gEdit plugins are stored. Try putting the two files to whatever plugin here: /usr/lib/gedit/plugins.


8

2016 Update

To install all the gedit plugins, try:

sudo apt-get install gedit-plugins

This worked great on Ubuntu 14.04. I'm currently using gedit version 3.10.4.

You will need to activate them by navigating to Edit - Preferences - Plugins. Then select the desired plugins to activate.


2

I have a 64-bit Ubuntu 14.04 LTS and the folder with the plugins is /usr/lib/x86_64-linux-gnu/gedit/plugins/

Copying inside it the *.plugin and *.py files made the trick for me


1

For Auto install, try the following

sudo add-apt-repository ppa:gedit-bc-dev-plugins/releases
sudo apt-get update
sudo apt-get install gedit-plugins
sudo apt-get install gedit-projects-plugin

0

For easy installation of additional 3rd party plugins there is a plugin installer plugin

https://github.com/lwindolf/gedit-plugininstaller

which might simplify discovering and installing plugins.