Imitation

Imitation is a plugin for the gedit text editor, that allows the user to edit a document in multiple places simultaneously, to aid repetitive programming tasks.

About

With Imitation, you can edit a document in multiple places simultaneously by placing marks in different parts of a document that act as virtual text cursors.

It is best explained by a demo video:

History

To save some confusion over plugin names:

Download

Latest versions

Previous releases

Install

  1. Install the GSettings schema (needed for config)
    1. Locate your system's gschema directory (assuming /usr/share/glib-2.0/schemas)
    2. Place "org.gnome.gedit.plugins.imitation.gschema.xml" in the gschema directory
    3. Apply the changes by running "glib-compile-schemas /usr/share/glib-2.0/schemas"
  2. Install the plugin
    1. Identity gedit's plugin directory: /usr/lib/gedit/plugins (may be in lib64)
    2. Place "imitation.plugin" (file) and "imitation" (folder) in there and make sure they are readable by all
    3. Activate Imitation in gedit's preferences

Feedback

Any feedback is most welcome and appreciated. You can email jon@ this website.

Please also feel free to package this for your OS. I would like to for Ubuntu, but haven't found the time.

Known issues

These will hopefully be fixed in the future, but let me know if you find a solution.

Config

Imitation relies on GSettings for configuration, and GSettings currently uses dconf as the default backend. So you can simply use dconf-editor, and edit settings at the GSettings path /org/gnome/gedit/plugins/imitation. I might at some stage bother creating a config GUI but at the moment it doesn't seem necessary.

Usage

Imitation may seem a bit complex at first, but it is easy to learn, and powerful to use. There are two main aspects to Imitation: marking and editing.

Marking

Before you can start editing in imitation mode, you need to first mark the places you'd like to edit. Marking can be done in five different ways, depending on the key you press and whether you have selected any text or not.

Unlike Multi-edit, Imitation's vertical marking will skip lines with less characters than the cursor's line offset. This is useful when there are blank lines between code segments.

Clearing all marks: Move the cursor (unless in sticky mode) or press Escape

Sticky mode: Using "mark toggle" will also trigger "sticky mode", where you can move your cursor around with marks staying in place. In vertical marking, they will be cleared as soon as you move your cursor, unless you enable sticky mode. Sticky mode stays enabled until you clear all marks.

Editing

For the most part editing with Imitation is mostly similar to editing with a normal cursor. There are however a few differences: