[OT] Spaces/tabs (Was: simple display (from: GUI library for D))

Bruno Medeiros brunodomedeiros+spam at com.gmail
Wed Apr 13 06:02:03 PDT 2011


On 11/04/2011 20:54, Steven Schveighoffer wrote:
> In most of the editors I use, the default is to use spaces for
> indentation.  So what happens is someone opens a file that uses tabs for
> indentation, then adds some lines.  However, their editor only uses
> spaces *for those lines they added*, which results in a hybrid.
> However, the person editing doesn't notice because it all lines up on
> their screen.

Just FYI, in Eclipse, the auto-indentation that happen when you press 
Enter will use the indentation from the previous line (whether it's 
spaces, tabs, or even mixed).
However, other editing operations that generate lines of code (like code 
templates, auto-generated code, refactorings like extracting a method, 
etc.) are not so smart and will indent with according to the default 
indentation you specify in the settings, they won't look at how the file 
is already indented.


-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list