Tuesday, July 17, 2012

Quick IntelliJ Tip - Disable Unlimited Whitespace

It drives me nuts when my code has trailing spaces at the end of a line when programming.  Why anyone would want this is beyond me.  I'm a Mac and running IntelliJ 11.1 Ultimate.  To disable this wonky feature I had to do some digging.

What you need to do is go to your IntelliJ IDEA menu and click 'Preferences'.  Select 'Editor' from the preferences panel (under IDE Settings) and in the upper right you will see a heading for 'Virtual Space'.  Uncheck 'Allow placement of caret after end of line'.  Not sure why it is named caret instead of cursor, but who cares.  I can now cmd-arrow to the front and back of the line as with Eclipse.