Skip to content

gedit (GNOME text editor) plugin which adds multiple improvements and functionalities to it

License

Notifications You must be signed in to change notification settings

pedrovernetti/metagedit

Repository files navigation

Metagedit

Metagedit is a python plugin for Gedit (GNOME Text Editor, usually shipped with Debian, Fedora, openSUSE and Ubuntu) which adds various improvements and functionalities to it.

Characteristics

  • Metagedit-related settings/prefs are all stored using GSettings, persisting through Gedit sessions and being externally modifiable via gsettings interfaces;
  • Saved sessions are stored as files at a subfolder inside Gedit's config folder, to be easily copied around;
  • Most operations work both on the whole document (when nothing is selected) and on selected parts only (when something is).

Features It Adds

  • Color Picker: adds a better "Pick Color" dialog, accessible via Tools menu;
  • Dark Theme: adds a toggle at View menu to enable/disable the GTK dark theme for Gedit;
  • Document Statistics: adds a real-time/self-refreshing "Document Statistics" dialog, accessible via Tools menu;
  • Encoding Utilities: adds functionalities to better auto-detect or manually set the actual encoding of documents and more, all accessible via context menu (dialog for manually setting encoding allows for previewing the effects), and shows the current encoding on the status bar;
  • Extra/New Keyboard Shortcuts: adds some extra keyboard shortcuts, like ctrl+Y for undoing, ctrl+E for deleting current line (or selected ones) and ctrl+Tab/ctrl+shift+Tab/ctrl+PageDown/ctrl+PageUp to switch tabs;
  • Line Operations: adds an improved Sort dialog to Gedit (at Tools menu and context menu) and also some quick linewise sort-like (removing empty lines, sorting, deduplicating, reversing and shuffling) and joining operations to context menu (works both on selections and whole-document-wide);
  • Open as Administrator: adds a File menu option to re-open file as administrator (Root), making it possible to quikcly edit protected file;
  • Overlay Scrollbar: adds a toggle at View menu to enable/disable overlay scrollbars for Gedit;
  • Remove Trailing Spaces: adds a context menu option to remove trailing spaces (incl. trailing newlines when applied to the whole document);
  • Restore Unsaved Documents: when auto-resuming of previous session is enabled (see Sessions feature), unsaved documents are remembered and restored along with the other tabs;
  • Scroll Past Bottom: adds a bottom margin to Gedit view, which can be enabled/disable via toggle on View menu;
  • Sessions: adds a "Sessions" submenu where you can save/load Gedit tab sessions and toggle auto-resuming of previous session on startup (remembering tabs);
  • Smart Home/End/Backspace: enables the Smart-Home, Smart-End and Smart-Backspace behaviors (pressing Home moves first to the end of indentation, pressing End acts similarly and pressing Backspace on indentations removes as many spaces as needed to remove one indentation level).

Previews

Context Menu

Context Menu

Sessions Menu and Dialog

Sessions Menu and Dialog

Switching Themes

Switching Theme

"Edit as Administrator"

"Edit as Administrator"

Additional Color Schemes ("Editor Color Themes")

You can find the dark color scheme used in the above previews here (plus 3 others - not all dark).


Installation

Using Installer Script

Run: ./install.sh or, for a re-installation: ./install.sh --reinstall (no sudo).

Dependencies

Metagedit depends on the following third-party Python libraries/modules:

  • chardet
  • iso-639

Uninstall

Using Installer Script

Run: ./install.sh --uninstall or, if you want to remove settings and related files, too: ./install.sh --full-uninstall.


Bugs

If you find a bug, please report it at https://github.com/pedrovernetti/metagedit/issues.


License

Metagedit is distributed under the terms of the GNU General Public License, version 3 (GPL-3.0). See the LICENSE file for details.