Gedit should support editorconfig out of the box

The most annoying problem I have with gedit is when I quickly need to edit some files in a project and don’t want to open a full IDE (like GNOME Builder) for that.

In contrast to gedit GNOME Builder supports editorconfig out-of-the-box, so I don’t get indentation or other problems when I quickly want to edit a file there.
gedit does not. There you only have an plugin that is not really easy to install (it’s quite cumbersome, actually).
Especially contributors to FLOSS projects may not have this installed and thus sent code contributions/PRs with wrong formatting.

So I’ve opened an issue to argue for full support/inclusion of editorconfig by default in gedit:

Let’s tackle these annoying style guide problems with wrong indentation etc! They can be solved so easily when you use editorconfig. Just everyone has to do so. Because editorconfig’s aim is consistency and only with widespread adoption of it, this goal can be reached.

I… don’t know how you installed it, but I downloaded the zip file via the link labeled " Click here to download the latest version" in that project’s README, unzipped it, and ran the install.sh script inside. It was not what I’d call difficult.

Manually installing it would be a pain, which is why there’s a script included to do the fiddly stuff for you! :wink:

That being said, I’m all for the plugin being included by default. Since it was developed by the editorconfig team, and is licensed under a BSD license, a good first step would probably be to find out whether they’d be amenable to re-licensing (or dual-licensing) it GPLv2 and letting it be incorporated into the GEdit source tree. (Not that re-licensing is a requirement, BSD and GPL are compatible licenses, but it’d presumably make things simpler all around.)

Another approach might be to at least get distros to start packaging it as an optional plug-in, because I notice that (for instance) there’s no Fedora gedit-plugin-editorconfig RPM — and Fedora has a lot of GEdit plugins packaged (EDIT: Actually, I guess this is really just the default set, broken out into individual packages, huh?):

$ sudo dnf list gedit-plugin\*
Installed Packages
gedit-plugin-bookmarks.x86_64                   3.32.2-1.fc30           @updates
gedit-plugin-bracketcompletion.x86_64           3.32.2-1.fc30           @updates
gedit-plugin-charmap.x86_64                     3.32.2-1.fc30           @updates
gedit-plugin-codecomment.x86_64                 3.32.2-1.fc30           @updates
gedit-plugin-colorpicker.x86_64                 3.32.2-1.fc30           @updates
gedit-plugin-colorschemer.x86_64                3.32.2-1.fc30           @updates
gedit-plugin-drawspaces.x86_64                  3.32.2-1.fc30           @updates
gedit-plugin-findinfiles.x86_64                 3.32.2-1.fc30           @updates
gedit-plugin-git.x86_64                         3.32.2-1.fc30           @updates
gedit-plugin-joinlines.x86_64                   3.32.2-1.fc30           @updates
gedit-plugin-multiedit.x86_64                   3.32.2-1.fc30           @updates
gedit-plugin-smartspaces.x86_64                 3.32.2-1.fc30           @updates
gedit-plugin-terminal.x86_64                    3.32.2-1.fc30           @updates
gedit-plugin-textsize.x86_64                    3.32.2-1.fc30           @updates
gedit-plugin-wordcompletion.x86_64              3.32.2-1.fc30           @updates
gedit-plugin-zeitgeist.x86_64                   3.32.2-1.fc30           @updates
gedit-plugins-data.x86_64                       3.32.2-1.fc30           @updates
Available Packages
gedit-plugin-commander.x86_64                   3.32.2-1.fc30           updates 
gedit-plugin-synctex.x86_64                     3.32.2-1.fc30           updates 
gedit-plugin-translate.x86_64                   3.32.2-1.fc30           updates 
gedit-plugins.x86_64                            3.32.2-1.fc30           updates 

(Wow, and I have way too many GEdit plugins installed.)

Also, I notice you’ve been campaigning for this for a while. :laughing:

I take that back, somewhat — I realize now that it was only quite that easy because Fedora does already package python3-editorconfig, AKA the EditorConfig core. Which does streamline things.

Otherwise, the core has to be installed first, which adds at least two more steps to the install process. (Three, if you count BOTH the cd editorconfig-core-py to enter the directory and the cd .. when you’re done. :wink:)

Edit: In the spirit of “doing my part”, I’ve just submitted a package-review request to add a gedit-plugin-editorconfig package to the Fedora repos.

Well… I’m not really into downloading random scripts from the internet and executing them.
If it was all included, that would have been a trusted source etc. :smiley:

Yeah, seems o. Also noticed this while I was writing the new issue/request… :laughing:

Ha! I knew there was a catch… :wink:

Great! Thanks. :smiley:

That said, part of why I am urging for inclusion by default is, because of Fedora Silverblue, respectively gedit flatpaks. AFAIK, there, you cannot easily install such plugins. :thinking: (unless you put them into your $HOME)

I mean… I read it first. It’s like 20 lines. :laughing:

That’s kind of where GEdit plugins are meant to go, though — it fully supports $HOME/.local/share/gedit/plugins/ as a plugin source, and doesn’t in any way need plugins to be installed systemwide. They can be, but like Gnome Shell extensions, it’s expected they often won’t be.

Anyway, for Fedora users, gedit-plugin-editorconfig is already in rawhide, and around 12 hours from now should be in updates-testing for F30 and F31. (It appears there’s a 24 hour delay before packages are pushed to testing, now.) Once it’s there, feel free to test and leave karma.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.