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

8 comments
Comment actions Permalink

> 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:"
Screen Shot 2011-08-29 at 12.38.59.png

You can make whitespaces visible in:

Screen Shot 2011-08-29 at 12.40.24.png

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

0
Comment actions Permalink

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

0
Comment actions Permalink

> Ensure blank line before end of file on Save

Select this check box to have RubyMine automatically add an empty line in the end of a file during the save procedure.



See http://www.jetbrains.com/ruby/webhelp/editor.html

0
Comment actions Permalink

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

0
Comment actions Permalink

Hmm, looks you are right. Could you submit an issue at http://youtrack.jetbrains.net/issues/ruby ?

0
Comment actions Permalink

I am not sure how to submit an issue on that website. Help?

0
Comment actions Permalink

Register and press "New issue" blue button at the top of window.

0

Please sign in to leave a comment.