My configuration.yaml is starting to get outrageously long so I was thinking of splitting the file into multiple pieces using the !include function for my automations, scripts, scenes, etc…
Because I’ve set everything up in configuration.yaml, my spacing is like so:
So I have to delete the leading two spaces of every line for every scene to get it to work in the new scenes.yaml (at least that’s my understanding). Does anyone know of an easy way to do that aside from manually deleting it from each line?
if you’re using the Configurator panel in HA and on a Mac, you can hold down the option key on your keyboard and select characters at the same index on multiple lines. Try it by holding down option, then click & drag in the editor. (Most desktop code editors implement this as well)
If you’re on Windows or Linux, it’s probably a different keyboard key, not sure which
Yep, most code editors have that feature. In fact many popular editors (notepad++ and atom come to mind) don’t even require a shift; you just highlight the section, hit tab, and everything highlighted moves over.
Thank you all for your help! I use a Mac with Atom and @truglodite & @fanaticDavid’s suggestion of highlighting and then Shift + Tab moved everything back perfectly. Thanks!
I believe atom works in a similar fashion to VScode, if so you can also hold Left ALT+Shift and Right Mousebutton to drag and select a column only, you can then use space, tab, delete, backspace or even type on all those lines at the same time.
looks like your suggestion was completely ignored. And it was the easiest of the whole bunch.
But yes, as long as everything in the file has consistent indentation it pretty much doesn’t matter. I’ve used it both ways (with two spaces indentation on the first column and with no indentation at all on the first column) and both ways work fine with no complaints.