Automatically Remove Trailing Whitespace in XCode

I like XCode, and I use it to edit all of my source for SymPy. But, like many editors, it likes to auto-indent new lines to the level of indentation of the previous line. This is a useful feature, but it makes for training whitespace out the wazoo, since blank lines will be indented in. I am constantly finding myself using SymPy’s strip_whitespace script to clean up my files.

This bugged me enough that I Googled a solution, and found this. It is a simple XCode plugin that, among other things, adds an option to strip trailing whitespace on save. Just install in the PlugIns folder in the XCode package and enable the option in the new Google pane of the XCode preferences.

About these ads

One Response to Automatically Remove Trailing Whitespace in XCode

  1. [...] been using for Python files, didn’t work very well with the new version (in particular, the essential plugin that I’d been using to clear trailing whitespace on save doesn’t yet work in XCode 4). [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 122 other followers

%d bloggers like this: