Block comments correction in AS Code

I’m not sure how many people are keyboard shortcut in AS Code. I found that the default shortcut for block comment (* *) is mapped to C/C++ comment /* */ and it seems not corrected for many versions.

To correct it open file C:\Program Files\BRAutomation\Automation Studio Code\resources\plugins\st-lsp-extension\language-configuration.json and modify line 6 to "blockComment": ["(*", "*)"]

To trigger this, the shortcut is Alt+Shift+A.

I know that B&R practice not recommend using it:

image

But if you are using “line comment” in .var file. you will get:

image

1 Like

Thanks for sharing! You’re right; that style guide is aimed at program code. The .var files have a specific structure that has to be followed, which includes using (* *) to define comments.