How to remove trailing space (upon save)?

Asked by Filipe Manuel Azinhal Funenga

I'm trying to write a plugin for scratch in order to strip trailing spaces upon saving. So far I'was able to write this: https://gist.github.com/ffunenga/5166490

Look at this python implementation: https://github.com/jonleighton/gedit-trailsave/blob/master/trailsave.py

Is there a way to write a similar plugin to scratch in Vala?

Question information

Language:
English Edit question
Status:
Solved
For:
Scratch Edit question
Assignee:
No assignee Edit question
Solved by:
Filipe Manuel Azinhal Funenga
Solved:
Last query:
Last reply:
Revision history for this message
Mario Guerriero (mefrio-g) said :
#1

Write a scratch plugin is quite simple but it is also a bit different from writing a plugin for Gedit. Here is an example of complete scratch plugin: http://bazaar.launchpad.net/~elementary-apps/scratch/scratch/view/head:/plugins/contractor/contractor.vala

you can easily convert it to python and adapt to whatever you want to do. I would be happy to review and push your plugin in trunk too :)

Revision history for this message
Filipe Manuel Azinhal Funenga (ffunenga-deactivatedaccount) said :
#2

Solved! New plugin commited