Enabling user plugins for pluma, and how to use with Git

Before anyone else mentions it, yes, I know, Git isn't the only version control software; the below would work if a plugin was acquired via Mercurial or Subversion, and Subversion works with Git links et cetera. That's not the point; The point is to use a specific, practical example of using any online repository to easily keep developing plugins for any extensible software up-to-date, with a result that would be immediate to this userbase.

#Introduction
The title makes very little sense at first, but imagine this; you're either using a plugin that is in active, and rapid development, or you're using a plugin you are developing yourself. You can try new or developing plugins in a rather easy fashion; This guide will use pluma as an example, as there are some rather useful plugins not included by default.

The example we'll use for this is Split View 2 for Pluma. The end result should be plugin files linked into your user plugin path for pluma, thus making our example plugin, Split View 2 usable.

#Gits as friends
Without going into details beyond the scope of this guide, Git is a very flexible, albeit user-unfriendly tool for software revision control; You can use it to upload software to your own server, use with existing services such as GitHub and develop software for other people, which can then be cloned to different machines.

Software can also be updated, which means so long no extra libraries or files are required due to a change in code, updating is as easy as downloading the latest files via git.

#About Split View 2
Our example plugin, Split View 2 is a rather useful addon which gives split view functionality similar to (but not exactly as) Notepad++ for Windows. While the author states it's explicitly for Linux Mint, I found that it works alright in Ubuntu MATE too, so I figured I'd write this guide to not just provide useful instructions, but a useful example as well.

#Gitting it on
This series of commands will allow you to actually do it;

sudo apt-get install git #You REALLY should have this by now. Also, you can use apt over apt-get if you like.
mkdir -p ~/.local/share/pluma/plugins #The missing pluma plugins folder
mkdir -p ~/git/plumaplugins #Make this whatever you wish, this is to help you stay organized. Will affect lines below.
cd ~/git/plumaplugins
git clone https://github.com/maciejzgadzaj/split-view-pluma-plugin.git
ln -s ~/git/plumaplugins/split-view-pluma-plugin/SplitView.pluma-plugin ~/.config/pluma/plugins/SplitView.pluma-plugin
ln -s ~/git/plumaplugins/split-view-pluma-plugin/SplitView.py ~/.config/pluma/plugins/SplitView.py

After that, you should be able to activate Split View 2 in Pluma's Preferences window, accessible from the Edit menu. Split View 2's functionality is kept in View, or alternatively it can be used with keyboard shortcut <Shift> + <Ctrl> + T.

Beyond this example, you can do this for a variety of plugins, compatible with a variety of applications. Just remember; When you remove a plugin, their links will become broken, so tidy up your plugin directories as well to keep from having a whole bunch of broken links, which could (although should not) slow down an extensible program.

4 Likes

Thanks for the tip on split-view :slight_smile:

Thank you for this post. I’m trying to use this same plugin, Split View 2. Following the author’s directions, I originally put the files into ~/.config/pluma/plugins. Then following your directions, I put the files into ~/.local/share/pluma/plugins/. In both cases, the plugin failed to show up in the list of installed plugins.

I notice in your instructions that after creating ~/.local/share/pluma/plugins, you don’t actually use it. The subsequent soft links you create are in ~/.config/pluma/plugins. No matter, since ~/.local/share/pluma/plugins doesn’t work for me anyway.

Any ideas? Thanks.

I’m really late for the party but if your intent is to use Pluma as your default Git editor you’ll need to type this command line in your terminal: git config --global core.editor "pluma". That solves part of your problem.