Works a treat. Thanks!
Another feature which is now also supported by the tool is the group formatting.
So the tool recognizes tabs in front of group designators and leaves them as they are. So thatâs how you can generate group and sub-groups of that group. They are separated visually:
However for me it doesnât work for multiline defined items It just inserts an empty line after the first line of each declaration
Like:
I have this:
Switch ChromeCastOnline
"Chromecast Online"
{ channel="network:pingdevice:10_0_0_119:online" }
And after that I get:
Switch ChromeCastOnline
"Chromecast Online"
{ channel="network:pingdevice:10_0_0_119:online" }
I get this. Tried uninstalling reinstalling without a success.
Hmm⊠Strange. I tried it on my setup. Here it works:
May you send me your full file for testing, @rkrisi?
Ok, I have found the problem
I had the other formatter installed, after removing that one, it works as it should!
I donât know why it needs removingâŠ
Thank you for the information. Maybe the other extension is formatting all the time, or on saving, entering a new line, etc.? I donât use it so i actually donât know how it works.
No it is not.
The thing I found and maybe suspicious:
In that extension you can reformat the file with shortcuts (like Ctrl + I and Ctrl + P or something like this). When I had both installed that combination also appered at your extension as well, but didnât worked with the shortcuts or calling from the action menu.
It only formats on demand.
This likely is the culprit.
Just released version 1.0.7. Problem should be fixed, but it would be great if you can check it.
Thank you!
Hey guys,
first of all thank you for over 400 installs on my extension in the last week. Thatâs incredible.
But now the real reason for my post⊠If you have any feature wishes on the extension, please let me know an comment is this thread or even better open a pull request on github.
Thank you!
Hi Max_Bec
Great Work looking out the same similar tool for Sitemap.
I am getting following error while installing âopenHAB Alignment Toolâ from extension Marketplace.
âUnable to install âmaximilian-beckenbauer.oh-alignment-toolâ extension because it is not compatible with the current version of VS Code (version 1.37.1).â
Minimal supported Vscode Version is 1.38.
So you should if there is an Vscode update available for you.
Good morning everyone,
due to installation problems of many users i had to delete the old extension.
You can find the new extension under the exact same name and link:
With this release (1.3.0) i also implemented the features of Mark Hilbush (@mhilbush) openHAB Formatter extension. I had a chat with Mark about our extensions and we came to the conclusion to join forces and - even in preparation for the implementation into the main openHAB VSC Extension - implement both formatting styles in one extension.
With the new version you now have the possibility to use the multiline formatting style of Marks extension as well. Just change it in the extension settings.
Thrilled to hear some feedback from you.
Kind Regards,
Max
Thanks very much @Max_Bec for incorporating my multi-line formatting into your extension. Very much appreciated!
The extension removes comments at the end of a line of code. The comment should be preserved.
Version 1.3.3. i reported them on github:
https://github.com/MaxBec/openHAB-Alignment-Tool/issues/5
Hi, this sounds as a great extension. but Ive an issue when selecting the command, I get an error: 'extension.reformat-file' not found
Iâve the latest VSC version.
edit: I was trying it on laptop from work. on my home computer, everything works fine! thanks!!
Thank you for your feedback.
Version 1.3.4 should fix it for â//â-Comments. Please test it.
@wars: Strange. I double checked all the commands. Please try to uninstall and reinstall the extension.
Hello @wars,
i was able to reproduce your error.
The binding only works on *.item files at the moment. So in the active editor must be an item file opened.