Sublime Forum

I'm using sublime on Windows

#1

I’m using sublime 3 on Windows, so I edit text-type Windows’ registry file which has block header with character pair of ‘[’ and ‘]’, as it’s common in ini files; a section is initiated by a text string enclosed by [ and ] character then followed by another strings as its member. The question is How can I fold (and unfold) these blocks when I’m editing it… Thank you so much in advance

0 Likes

#2

Since sublime does this code folding thing only based on indentantion, you won’t be able to do it with one click.

However, you could do it manually:

  1. while you’re inside of square braces ( e.g. [ke|y] )
  2. press ctrl+shift+m to select the text between matching brackets;
  3. then press ctrl+shift+[ to collapse the selected text.

Probably you could do the last two steps with a macro, but i’m not sure.

To uncollapse, you just need to press ctrl+shift+] while your text cursor is touching the collapsed block or ctrl+k, ctrl+0 to uncolapse everything.

0 Likes