How do you guys move whole block of text 2 spaces?

Hi guys bit of a daft question this.
But I’ve been making a custom alarm panel mainly using custom:stack-in-card and custom buttons.
So anyway I got it how I wanted it but on the dashboard I want it as a conditional card so if I copy the code into a blank conditional card the text is 2 spaces out and if I do it the other way by adding the conditional part to the top that’s not far enough left :laughing:
So do any of you guys know a way of copying a whole bunch of text into a box so it formats at the correct spacing ?
Or is there a way of adding 2 spaces to the whole thing I’m copying and pasting…
I don’t think I’ve explained this very well I hope you can get what I mean.

Indentation buttons in Lovelace yaml editor - Month of “What the heck?!” - Home Assistant Community (

1 Like

use any text editor:

visual studio code: Hold shift+alt and perform a vertical drag, it will allow you to type in multiple rows. vscode docs about feature

notepad++: Hold alt and perform a vertical drag, it will allow you to type in multiple rows. notepad++ docs about feature

both links have gifs that show the abilities. Way easier than any indent button. Also allows you to type repeated text as well. This is why everyone should move to yaml over the UI imo. Text editors just do everything better than what can be offered in the UI.


Thanks @petro @Hellis81 that’s great.
I did go through all the settings in notepad++ last night but couldn’t get any to work and didn’t realise I could do that on my keyboard.
Bookmarked them links.
Thanks again.

In both VSCode and Notepad++ highlight the stuff to move,

Tab to move it all two spaces to the right

Shift + Tab to move it all two spaces to the left

This also works in the Lovelace UI.


I’d throw in “SublimeText” as the editor of choice. Does all the two above mentioned do, but way, way more. :slight_smile:

One of the neat features is to mark different lines (not mark the content, only the cursor position in these lines) and to add some things. Or you can set your cursor into one word and can easily mark all the exact same phrase all over the document.

I started with Notepad++ and was very happy, than tried different IDEs and ended up with SublimeText as THE editor of choice. Really, try it, you will never move away from that one.

I personally find the trial period to short and the price is honestly hard to swallow, but to try it out, install the demo version, use it as long as you want, but disable the update message via Pi-Hole or something similar.
If you find it useful, please think about paying, it really is a well maintained piece of software with near endless possibilities. If you use it for the job (eg. as a programmer), it is more than worth the money. :slight_smile:

1 Like

Too late but maybe someone else need it.
In editor directly:

CTRL [ move right

CTRL ] move left

CTRL / add # in at beginning of the line and same to remove it

The text must be selected of course …

1 Like