Smart indentation for multiline expression [message #267698] |
Wed, 18 August 2004 20:32  |
Eclipse User |
|
|
|
Originally posted by: jl+eclipse.lists.wasmer.ca
Hi,
When I write an expression on many lines, I expect Eclipse to insert a
space (and not a tab) in every position where the chracter on the previous
line is not a tab. I don't know if there's a setting somewhere to enable.
Right now Eclipse only indents with tabs (in the following example,
Eclipse would put tabs <t> when I want spaces <s>).
<t>METHOD_A
<t>{
<t><t>EXPRESSION;
<t><t>EXPRESSION;
<t><t>IF(CONDITION)
<t><t>{
<t><t><t>EXPRESSION;
<t><t><t>METHOD_B_WITH_LONG_NAME(ARGUMENT_A,
<t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_B,
<t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_C);
<t><t><t>EXPRESSION;
<t><t>{
<t><t>EXPRESSION;
<t>}
Thanks for your help,
JL
|
|
|
|
Re: Smart indentation for multiline expression [message #267797 is a reply to message #267706] |
Thu, 19 August 2004 12:36  |
Eclipse User |
|
|
|
Originally posted by: jl+eclipse.lists.wasmer.ca
Thanks for the help.
Perhaps this should be added in the TODO list?
The main reason for this feature is to make sure the indentation looks
good on any editor. If the tab size is different in another tool and
there's no way to set it (like the output of a diff) the tabs inserted by
Eclipse will not end at the right position.
JL
Tom Eicher wrote:
> There is no setting for precisely what you want at all times,
> auto-indent will create the indentation based on your formatter and tab
> settings.
> Disabling Smart Typing (Edit>Smart Insert Mode) will help in the case
> you describe, because then simply the edit of the previous line is copied.
> -tom
> Jean-Luc Wasmer wrote:
> > Hi,
> >
> > When I write an expression on many lines, I expect Eclipse to insert a
> > space (and not a tab) in every position where the chracter on the previous
> > line is not a tab. I don't know if there's a setting somewhere to enable.
> > Right now Eclipse only indents with tabs (in the following example,
> > Eclipse would put tabs <t> when I want spaces <s>).
> >
> > <t>METHOD_A
> > <t>{
> > <t><t>EXPRESSION;
> > <t><t>EXPRESSION;
> > <t><t>IF(CONDITION)
> > <t><t>{
> > <t><t><t>EXPRESSION;
> > <t><t><t>METHOD_B_WITH_LONG_NAME(ARGUMENT_A,
> > <t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_B,
> > <t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_C);
> > <t><t><t>EXPRESSION;
> > <t><t>{
> > <t><t>EXPRESSION;
> > <t>}
> >
> > Thanks for your help,
> >
> > JL
> >
|
|
|
Powered by
FUDForum. Page generated in 0.25069 seconds