One item from the list of good coding standards which always seems to catch me out is that lines of code shouldn’t have trailing white space. Some editors offer functionality to prevent this, GEdit doesn’t by default. A quick search took me to a page of plugin’s including the ‘trailsave’ plugin. When enabled, this plugin trims off all white space from the end of lines; exactly what I want. One small gripe is that it trims off the last line of a file if it is empty, not ideal.
In the spirit of open source, I modified the code slightly and you can now get the remove-trailing-white-space-but-not-the-last-blank-line plugin from here.
Unpack the two files into your ~/.gnome2/gedit/plugins directory (create one if its not there) and start up GEdit. Select ‘Plugins’ from the Edit->Preferences menu and enable the “Save without trailing space’ plugin from that menu.