AppCode doesn't strip trailing spaces anymore

I'm using 108.809, with "Strip trailing spaces on Save" set to "All" (IDE Settings - Editor - Limits), however a quick test shows that AppCode no longer removes trailing spaces. Has anyone else experienced this? Is there a fix (i.e. am I missing something?)

6 comments
Comment actions Permalink

Sorry to bring up an old thread.  Can we confirm that the option "Strip trailing spaces on Save: Modified Lines/AllNone" is not supposed to work on AppCode?  I see the same problem on the latest AppCode and tt's not clear from reading the bug if it should work nor not.  Thanks.

0
Comment actions Permalink

I've checked and it actually works on 2.0.1.

Could you please describe the case in which spaces are not trimmed after save? There is an option "Preferences | Editor | Appearance | Show whitespaces" that can help you with it.

0
Comment actions Permalink

Thanks for your confirmation.  I went back and figured out why it wasn't working for me.

#1.  I thought Cmd+S will save the file, but apparently it doesn't.  So I kept on hitting Cmd+S, and nothing happened, no spaces stripped.  Then I found that there is a Cmd+Alt+S (Save All) shortcut instead, and that one works!  Is there, by any chance, a keyboard shortcut to save just the active file?

#2. Apparently the strip trailing space option doesn't touch the current line where the caret is at even though there are trailing spaces.  So you have to navigate away from the active/current line before you save.  

0
Comment actions Permalink

About you observations:

#1 JetBrains IDEs never had "save single file" action because they work with entire project tree.
BTW "Save all" can happen any time without you explicitly invoking it, e.g. when you switch to another application.
Default AppCode keymap has "Save All" assigned to "Cmd+S". "Shift+Cmd+S" is used in Xcode keymap for compatibility reasons.

#2 AppCode should strip whitespaces from any line if "All" is set or changed (in terms of version control) lines for "Modified Lines" setting. What you described sounds like a buggy behavior.

0
Comment actions Permalink

Thanks Dmitry.  Not really critical, but I have filed a comestic issue: http://youtrack.jetbrains.com/issue/OC-7052

0

Please sign in to leave a comment.