Today, I am a gedit-plugins hacker! Here you’ll find my first code contribution to gedit-plugins. I’m calling it “SmarterSpaces”. This is an extension to the excellent “SmartSpaces” plugin.
This plugin automatically treats the usage of spaces for indentation as if they were tabs. Now even though someone chose the wrong character for indentation, you don’t have to waste time mashing your cursor keys to move through all those 0x20h‘s. Alternatively, you could use vim. :)
To install this plugin you need to put: smarterspaces.py, smarterspaces.plugin and org.gnome.gedit.plugins.smarterspaces.gschema.xml in your ~/.local/share/gedit/plugins directory. The code is GPLv.3+, so share and enjoy under these terms.
It is recommended that you use this plugin in combination with the autotab and/or modelines plugins.
I have tested this code, and it works perfectly for me. Please have a look at the source comments, for a few unresolved items.
For more information, you can read my original mailing list announcement and the bugzilla entry.
It would be awesome if someone could point me to, or hack together something similar in vim. Maybe purists don’t need this kind of functionality, but dammit, sometimes I use my arrow keys while in insert mode.
Happy Hacking,
James
James, I found a silly issue on one of your repositories, and I had a few questions for you. Can you shoot me an email so we may open a discussion regarding my questions?
As per the silly issue I found, you are using your standard, templated puppet copyright for a python project: https://github.com/purpleidea/jmwbot/blob/master/COPYRIGHT
Hey Josh!
Good catch, I’ve updated the repo, thanks!
If you’ve got code discussion related to one of my projects on github, please open an issue and let’s have the discussion there, that way others will benefit. Similarly, if it relates to a blog post, please comment on the relevant page. Lastly, if it’s private, you can send me an email with my contact form, which I can reply to should it need discussion.
HTH!
James