Column Alignment Tool

Tags: #<Tag:0x00007f74648fe708> #<Tag:0x00007f74648fe4d8> #<Tag:0x00007f74648fe3c0>

Hey guys,

i am searching for a tool (would be the best if it is a VSC Extension) which can align my items file in columns. How are you guys handeling the problem? And do you know a tool for it?

Thanks!

Here my problem:

Switch Sonoff_CLAS20004					"TV-Licht" 										          <light> 				  (Lights_ClaudiusZimmer, Lights)   {channel="mqtt:topic:Sonoff_CLAS20004:switch"}
Number Sonoff_CLAS20004_RSSI 			"TV-Licht RSSI [%d %%]" 						    <signal_p>				(RSSI_Group)      					      {channel="mqtt:topic:Sonoff_CLAS20004:rssi"}
Switch Sonoff_CLAS20004_Unreach 	"TV-Licht Offline" 							    <siren> 				  (Unreach_Group)   					      {channel="mqtt:topic:Sonoff_CLAS20004:unreachable"}
String Sonoff_CLAS20004_FW		"TV-Licht Firmware [v%s]"						    <settings>				(Firmwares)							          {channel="mqtt:topic:Sonoff_CLAS20004:firmware"}
String Sonoff_CLAS20004_IP				"TV-Licht IP [%s]"							      	<playlist-check>	(IPs)								              {channel="mqtt:topic:Sonoff_CLAS20004:ip"}

Should look like:

Switch Sonoff_CLAS20004					"TV-Licht" 									<light> 				(Lights_ClaudiusZimmer, Lights)   	{channel="mqtt:topic:Sonoff_CLAS20004:switch"}
Number Sonoff_CLAS20004_RSSI 			"TV-Licht RSSI [%d %%]" 					<signal_p>				(RSSI_Group)      					{channel="mqtt:topic:Sonoff_CLAS20004:rssi"}
Switch Sonoff_CLAS20004_Unreach 		"TV-Licht Offline" 							<siren> 				(Unreach_Group)   					{channel="mqtt:topic:Sonoff_CLAS20004:unreachable"}
String Sonoff_CLAS20004_FW				"TV-Licht Firmware [v%s]"					<settings>				(Firmwares)							{channel="mqtt:topic:Sonoff_CLAS20004:firmware"}
String Sonoff_CLAS20004_IP				"TV-Licht IP [%s]"							<playlist-check>		(IPs)								{channel="mqtt:topic:Sonoff_CLAS20004:ip"}

Thank you guys! I hope you have some tips for me!
Kind Regards, Max

I use the space bar… :slight_smile:

// *********************************************
// **                GROUPS                   **
// *********************************************

Group House
Group GroundFloor   "Downstairs"     <groundfloor>  (House)	
Group FirstFloor    "Upstairs"       <firstfloor>   (House)
Group Porch         "Porch"          <porch>        (GroundFloor)	
Group LivingRoom    "Living Room"    <sofa>         (GroundFloor)	
Group Kitchen       "Kitchen"        <kitchen >     (GroundFloor)	
Group Hallway       "Hallway"        <corridor>     (GroundFloor)	
Group Pantry        "Pantry"         <pantry>       (GroundFloor)	
Group Conservatory  "Conservatory"   <conservatory> (GroundFloor)
Group Garden        "Garden"         <garden>       (House)
Group MasterBedroom "Master Bedroom" <bedroom>      (FirstFloor)	
Group LargeBedroom  "Large Bedroom"  <bedroom>      (FirstFloor)	
Group SmallBedroom  "Small Bedroom"  <bedroom>      (FirstFloor)	
Group Bathroom      "Bathroom"       <bath>         (FirstFloor)
Group Toilet        "Toilet"         <toilet>       (FirstFloor)
Group Landing       "Landing"        <corridor>     (FirstFloor)
Group Loft          "Loft"           <attic>        (FirstFloor)
Group Batteries     "Batteries"      <battery>      (House, Persist)
Group Persist
Group Misc                                          (House)
Group MQTTv2

// **********************************************
// **                 HOUSE                   **
// *********************************************

String	House_HomeAway "Home/Away [MAP(homeaway.map):%s]" <present> (House, Persist)
String  House_Mode     "House Mode [%s]"                  <house>   (House, Persist)
String  Holiday_Type   "Holiday Type [%s]"                          (House)
String  Day_Of_Week    "Day of the week [%s]"                       (House) { mqtt=">[mybroker:Misc/DayOfWeek:state:*:default" }
String  CurrentTime    "Current Time [%s]"                          (House) { mqtt=">[mybroker:Misc/Time:state:*:default]" } //{ channel="mqtt:topic:8c4878b0:MQTT-Time" } ///

I avoid the problem completely by formatting my items this way. It makes the files longer, but I no longer spend my time messing with column formatting.

Number:Temperature          Office_Temperature
                            "Office Temperature [%.1f °F]"
                            <temperature>
                            (gSF_Office,gSensor,gTemperature)
                            ["Measurement","Temperature","Sensor"]
                            { channel="zwave:device:zstick:node42:sensor_temperature" }

And, I use my handy VS Code extension to format (and reformat) the items…

3 Likes

I use the space bar… :slight_smile:

That’s what i want to avoid! :smiley:

I avoid the problem completely by formatting my items this way. It makes the files longer, but I no longer spend my time messing with column formatting.

Thank’s. But i prefer the line format. So i see every section of each item below each other.

Maybe this function can be added in the official extension? I use the formatting function for my PS1 scripts and json files all the time. Saves a lot of time!

1 Like

There is the textfx plugin for notepad++ although your mileage may vary. https://www.cathrinewilhelmsen.net/2014/10/15/notepad-column-editing/