How to auto-discard trailing spaces
Hi,
Does the RubyMine 3 IDE provide a way to automatically discard all trailing whitespaces in the source files? Meta Alt L seems to do the trick, but for some reason it has no effect on the last line.
Thanks!
Pai-Hung
Please sign in to leave a comment.
> Does the RubyMine 3 IDE provide a way to automatically discard all trailing whitespaces in the source files?


Hi, please check "RubyMine | Preferences | Editor | Strip trailing spaces on Save:"
You can make whitespaces visible in:
> Meta Alt L seems to do the trick, but for some reason it has no effect on the last line.
Seems it doesn't strip trainling spaces and I'm not sure that it should strip. I noticed that our "Strip trailing spaces on Save:" doesn't remove blank lines in the end of file.
This is the option I am lookimng for, thanks!
There is a sub-option below it as follows:
Ensure blank line before end of file on Save
I tried it, but it didn't seem to work for me. That is, if the file has 10 lines in it, it stays as 10 lines afterwards. Am I missing something?
Thanks,
Pai-Hung
> Ensure blank line before end of file on Save
See http://www.jetbrains.com/ruby/webhelp/editor.html
Yes, I looked at the same online documentation, but it doesn't do what it says -- There is no empty line added at the end of the file. Maybe my understanding of "empty line" is different from the documentation here?
Thanks,
Pai-Hung
Hmm, looks you are right. Could you submit an issue at http://youtrack.jetbrains.net/issues/ruby ?
I am not sure how to submit an issue on that website. Help?
Register and press "New issue" blue button at the top of window.
Cool, done!