Cloud9 has a command under Tools called "Strip Trailing Space". I want to automatically run this command before every time I save a file, so I can be sure my files never contain trailing spaces. How is that done?
After frustratedly Googling for quite a while, I can find no documentation on how to achieve stuff like this. They claim Cloud9 is the most hackable IDE in the world though, so it ought to be possible.
On the menu bar, choose AWS Cloud9, Preferences. To view the project settings for the current environment, on the Preferences tab, in the side navigation pane, choose Project Settings. To change the current project settings for the environment, change the settings you want in the Project Settings pane.
Type M-x delete-trailing-whitespace to delete all trailing whitespace. This command deletes all extra spaces at the end of each line in the buffer, and all empty lines at the end of the buffer; to ignore the latter, change the variable delete-trailing-lines to nil .
To save the file, choose File, Save. Name the file fish. txt , and then choose Save.
Well this is embarrassing, but I combed through the preferences again and found the option On Save, Strip Whitespace
under Cloud9 -> Preferences -> Code Editor (Ace)
.
As of July 2015 it is under Cloud9 > "Open your Project Settings" in the top menu bar.
"general": {
"@stripws": false
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With