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.
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.