Sven Koluem
Sven Koluem

Reputation: 687

Sublime Text 2 folding tags

Is there functionality to fold only specified html tags in Sublime Text 2/3? For example: <span>lot of text</span>.

Upvotes: 4

Views: 3425

Answers (3)

umesh bhanderi
umesh bhanderi

Reputation: 681

Ensure Package Control is installed. Instructions are found here.

In Sublime Text, press CtrlShiftP (Win, Linux) or CmdShiftP (OSX)

To bring up the quick panel and start typing Package Control: Install Package

Select the command and it will show a list of installable plugins.

Start typing BracketHighlighter, when you see it, select it.

preferences > package setting > BracketHighlighter > key bindings - user

[{
  "keys": ["ctrl+alt+]"],
  "command": "bh_key",
  "args": {
    "plugin": {
      "type": ["__all__"],
      "command": "bh_modules.foldbracket"
    }
  }
}]

Restart to be sure everything is loaded properly.

ctrl+alt+] -shortcut key Enjoy!

Upvotes: 1

wbj
wbj

Reputation: 1469

This is an older post, but as I was looking for the same thing I thought I'd post the solution I found.

If you hover your mouse in the gutter, arrows will show up for folding/unfolding blocks of code.

Upvotes: 1

Abhigyan
Abhigyan

Reputation: 651

Yes, there is. You just have to find the required starting tag using ctrl+F, then select them all using ctrl+D. After that to fold them just press ctrl+shift+[.

Upvotes: 2

Related Questions