Sublime auto indent children

indentation, pug, stylus, sublimetext, sublimetext3

Solution

There's "Expand selection to indentation" to select lines with the same indentation level. The default keyboard shortcut is Ctrl+Shift+J.

To add a wrapper:

- move the cursor to the first child

- hit Ctrl+Shift+J to expand the selection

- indent with Tab or Ctrl+]

- hit ↑ to move the cursor above the selection

- hit Ctrl+Enter to insert a new line

Problem

Often I come to the same problem, If I need to add a wrapper (another element to wrap elements), I have to manually select the children tab them etc... I was wondering is there anything out there for sublime text 3, to recognise that you are indenting a parent, therefore all children should be indented automatically ? Edit I feel stylus, less and other tab based hierarchy language could suffer from the same symptoms. Cheers.

Original source