smarter spaces

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


2 thoughts on “smarter spaces

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


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s