I remembered that I changed the line ediing of my code to unix-like
ended line "\n" so that when I opened the source code in UNIX, the code
will looks like the same as the code that is opened using IDEA in
Windows. I forgot to how I changed that. Anyone know how to do it?
Thanks a lot!
You didn't mention which version of IntelliJ/IDEA you are using. I'm using
version 4.5. If you are using the same this should work for you.
You can set the end of line character(s) either globally or on a project
by project basis. You can set the project template for new files:
* Make sure there are no projects open
* Go to the 'File' menu and select 'Settings'
* Go to the 'Template Project' tab, if necessary
* Select 'Project Code Style'
* On the right select 'Use global code style' radio button
* Select 'Edit Global Settings...' button
* At the bottom left select the appropriate setting for 'Line separator'
You can set the global settings for the IDE:
* Make sure there are no projects open
* Go to the 'File' menu and select 'Settings'
* Go to the 'IDE' tab, if necessary
* Select 'Global Code Style'
* On the right, select the 'General' tab
* Find 'Line separator' and choose the appropriate setting
If you have a project open then choosing 'Settings' will open the project
settings and 'Project Template Settings' will do the same as above.