You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,16 @@
2
2
3
3
All notable changes to the openHAB Alignment Tool extension will be documented in this file.
4
4
5
+
## [2.0.0] - 21.07.2020
6
+
7
+
## Changed
8
+
9
+
- Implemented the Visual-Studio-Code formatter API. The extension is now a proper formatting tool and can use all the formatting functions integrated in the standard vsc installation (Like format-on-save, etc.).
10
+
11
+
## Fixed
12
+
13
+
- Fixed a lot of bugs regarding special formatting features for the \*.items files.
Copy file name to clipboardExpand all lines: README.md
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,31 @@
5
5
[](https://img.shields.io/visual-studio-marketplace/v/max-beckenbauer.oh-alignment-tool?color=orange)
6
6
[](https://img.shields.io/visual-studio-marketplace/stars/max-beckenbauer.oh-alignment-tool?label=Rating&logo=visual-studio-code)
7
7
8
-
This extension adds support for formatting and indenting [openHAB](http://www.openhab.org) files like `*.items`, `*.things`, etc. At the moment only `*.items` and `*.sitemap` files are supported. They can be formatted in a column or multiline style. In the future the other file types and other
9
-
format-types will be added. Feel free to enter feature-requests.
8
+
This extension adds support for formatting and indenting [openHAB](http://www.openhab.org) files like `*.items`, `*.sitemap`, etc. At the moment only `*.items` and `*.sitemap` files are supported. They can be formatted in a column channel-column or multiline style. In the future the other file types
9
+
and other format-types will be added. Feel free to add feature-requests on the github repository.
If you've found the extension helpful or useful, then please consider throwing a coffee my way to help support my work. As i am a student and would like to invest more time and effort in this project this would really help me.
The tool is available via the Command-Palette. Just type `cmnd+shift+p` and enter `openHAB Alignment`. Then you get the option to format the whole file.
17
+
The tool is available as a standard Visual-Studio-Code formatter as it uses the original vsc formatter API. You can force to formatting with right-clicking the document and clicking `Format Document...` or `Format Selection...`. If you have enabled the function in the vsc settings it even can
@@ -26,20 +39,21 @@ The tool is available via the Command-Palette. Just type `cmnd+shift+p` and ente
26
39
27
40
The formatting is available for the following openhab file types:
28
41
29
-
-`.items`
30
-
-`.sitemap`
42
+
-`.items` (Fully functional)
43
+
-`.sitemap` (Under development)
44
+
-`.things` (Under development)
31
45
32
46
## Extension Settings
33
47
34
48
### New Line After Item
35
49
36
-
With this option you can choose if you want to have a new line after each item.
50
+
With this option you can choose if you want to have a new line inserted after each item. If there is already a single empty line after an item this settings is ignored.
37
51
38
52
`"oh-alignment-tool.newLineAfterItem": true`
39
53
40
54
### Preserve Whitespace
41
55
42
-
Whitespaces in front of items get preserved and won't be deleted.
56
+
Whitespaces (tabs or spaces) in front of items get preserved and won't be deleted.
43
57
44
58
`"oh-alignment-tool.preserveWhitespace": true`
45
59
@@ -57,7 +71,8 @@ The format style option gives you two styles between you can choose.
57
71
- ChannelColumn
58
72
- Multiline
59
73
60
-
The Column style formats the files in a column-way. Each item will be on one line and the item parts are separated in columns. The Multiline format prints every part of an item in a new line and indents the different parts.
74
+
The Column style formats the files in a column-way. Each item will be on one line and the item parts are separated in columns. With the ChannelColumn style only the channel part of an item gets formatted into multiple lines. The Multiline format prints every part of an item in a new line and indents
0 commit comments