Is there an equivilent of c#\'s #region in PHP?
In Sublime Text there's a package called SyntaxFold.
Ensure that it has a default with the strings you want (for some odd reason mine had a quote before the hash: '#Start
). I ended up changing it to:
{
//you can change in here other config options
"default":
{
"endMarker": "#EOB",
"name": "Default",
"startMarker": "#BOB"
}
}
You can also alter the key bindings (the ones below in the Usage section) on Windows by changing them in the file:
C:\Users\YOUR_USER\AppData\Roaming\Sublime Text 3\Packages\SyntaxFold\Default (Windows).sublime-keymap
Add the enclosing tags you defined in the config file (you can add a description after each tag), in my case:
#BOB pandora box
public function alpha()
{
# code...
}
public function omega()
{
# code...
}
#EOB pandora box
If you are just interested in folding comment blocks then with Fold Comments package you can press Ctrl+Shift+C to hide and show all comments (it may hide tags of SyntaxFold though).