# Format document improvments

**URL:** https://tech-community.robotics.abb.com/t/format-document-improvments/11049
**Category:** UpFeed
**Created:** [March 2, 2023, 1:40pm UTC](https://tech-community.robotics.abb.com/t/format-document-improvments/11049 "2023-03-02T13:40:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Tompanhuhu](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/tompanhuhu/32/3366_2.png) [@Tompanhuhu](https://tech-community.robotics.abb.com/u/Tompanhuhu)
#### Post date: [March 2, 2023, 1:40pm UTC](https://tech-community.robotics.abb.com/t/format-document-improvments/11049/1 "2023-03-02T13:40:44Z")

</div>

I don’t know if this is the right place to request features, but it would be very nice if Format Document feature in robotstudio didn’t move comments to a new line.

For example, this line:

```auto
reg1:= 55; !Here i'm setting reg1 to 55.

```

will be formated to this:

```auto
reg1:= 55; 
!Here i'm setting reg1 to 55.

```

It would be nice if comments was allowed to be after semicolons.

---

<div class="post-metadata">

### Author: ![Maxim](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/maxim/32/4429_2.png) [@Maxim](https://tech-community.robotics.abb.com/u/Maxim)
#### Post date: [March 3, 2023, 8:17am UTC](https://tech-community.robotics.abb.com/t/format-document-improvments/11049/2 "2023-03-03T08:17:13Z")

</div>

This is the right place.

And I agree with this suggestions as well.

I’ll run this by R&D when I have a chance.

---

<div class="post-metadata">

### Author: ![DenisFR](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@DenisFR](https://tech-community.robotics.abb.com/u/DenisFR)
#### Post date: [March 7, 2023, 11:16am UTC](https://tech-community.robotics.abb.com/t/format-document-improvments/11049/3 "2023-03-07T11:16:30Z")

</div>

Hello,  
In same time, if you can ask:

- To use the same indent as controller (tab)

- Add space after comma as controller

- Take care of casing of \Inpos in (WaitTime, WaitRob, etc.)  
So the code write in RS or by the pendant are the same.

PS: Didn’t see your post in other thread. 😉

PPS: And well indent when using space to format. Like:  
SomeCode withsomeparam,  
 otherparam…  
For now it add in new line. And Format don’t change it.

---

<div class="post-metadata">

### Author: ![Maxim](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/maxim/32/4429_2.png) [@Maxim](https://tech-community.robotics.abb.com/u/Maxim)
#### Post date: [April 5, 2023, 8:53am UTC](https://tech-community.robotics.abb.com/t/format-document-improvments/11049/4 "2023-04-05T08:53:14Z")

</div>

> [@Tompanhuhu](#):
>
> I don’t know if this is the right place to request features, but it would be very nice if Format Document feature in robotstudio didn’t move comments to a new line.
> 
> For example, this line:
> 
> ```auto
> reg1:= 55; !Here i'm setting reg1 to 55.
> 
> ```
> 
> will be formated to this:
> 
> ```auto
> reg1:= 55; 
> !Here i'm setting reg1 to 55.
> 
> ```
> 
> It would be nice if comments was allowed to be after semicolons.

I spoke to RobotStudio R&D and they’ve said that this is a difficult issue to implement for them, because it relies on the RAPID interpreter/compiler built into the controller.

So my suggestion is to reach out to your local ABB and send this in a feature request to the controller team. If they accept it and implement it, the RobotStudio devs will adapt the RAPID editor in RS to follow the syntax.

This is also in a way related to the other \>[suggestion](https://forums.robotstudio.com/discussion/11507/wish-rs-format-document-adjust-case-like-real-controller)\<, regarding formatting of RAPID-code. I.e. RS should format the code like it is formatted in the controller.
