Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Change tab spacing to 2

0 votes
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.
asked Sep 11, 2015 by anonymous

3 Answers

0 votes

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

answered Sep 11, 2015 by jeroentbt (380 points)
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
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! :))
No problem, appreciate your response.
Thanks.
0 votes

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!

 

answered Sep 12, 2015 by plantuml (117,910 points)
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

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,

answered Sep 16, 2015 by plantuml (117,910 points)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...