Change tab spacing to 2

0 votes
asked Sep 11, 2015 by anonymous
Hi,

I use \t to allign fields with a structure say in an object defination.

Is tere a way I can changed the dispaly to allign by 2 instead of the default to 4.

(My settings in Eclipse are set to 2)

thanks.

3 Answers

0 votes
answered Sep 11, 2015 by jeroentbt (380 points)

A bit of a workaround but have a look at http://editorconfig.org/, it should agressively overwrite and apply settings like this in your editor.

http://marketplace.eclipse.org/content/editorconfig-eclipse

commented Sep 12, 2015 by anonymous
Thanks for the quick reply.
Didn't work for me. I put this file in the same folder as eclipse.ini
Also put it in the same folder as the code.

# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# 2 space indentation
[*.*]
indent_style = space
indent_size = 2
commented Sep 12, 2015 by jeroentbt (380 points)
When I read the answer below, I think I completely misunderstood your question. I thought it was about the source file being represented with too much spaces, did not think you were talking about spacing in plantuml's output...

So please disregard my answer (although editorconfig really is a great project! :))
commented Sep 12, 2015 by anonymous
No problem, appreciate your response.
Thanks.
0 votes
answered Sep 12, 2015 by plantuml (132,110 points)

Hello,

Could post a simple example of the diagram you are using ?

My guess is that you are using something like that:

@startuml
object foo {
\tfield1
\tfield2
\tfield3
\tfield5\tfiled6
}
@enduml

 

Which give:

Is this the case ?

In that case, the size of \t is hardcoded to 8 in PlantUML (and not 4).

But we may add a skinparam attribute to let people change it to another value.

Is this what you are looking for ?

Thanks!

 

commented Sep 12, 2015 by anonymous
Yes, this is why I am trying.
Object Obj2{
uint32_t abc
union
\t{
\t\tuint32_t
\t}
}

skinparam would be nice.
Thanks
0 votes
answered Sep 16, 2015 by plantuml (132,110 points)

In the last beta, https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
we have added a skinparam tabSize.

Example:

@startuml
skinparam tabSize 2
object foo {
\tfield1
\tfield2
\tfield3
\tfield5\tfield6
}
@enduml


Does is work for you ?
Thanks,

...