Alex,
Yes you can. It’s on an editor-by-editor basis since people often like different settings for different languages (java vs XML, for example). You can set it in the preferences at Window > Preferences > MyEclipse > Files and Editors > “editor name” > “editor name” Source page.
For the non-MyEclipse editors it’s at Window > Preferences > General > Text Editors