Happy sublime user here.
Just a minor niggle. Is it easy to change the the bracket style? It defaults to:
[code]if (operation) {
}[/code]
but I’d like:
[code]if (operation)
{
}[/code]
to fit in with the project style guide.
Happy sublime user here.
Just a minor niggle. Is it easy to change the the bracket style? It defaults to:
[code]if (operation) {
}[/code]
but I’d like:
[code]if (operation)
{
}[/code]
to fit in with the project style guide.
Can you give a bit more information? Are you using a snippet to get that? If so, which one?
you just have to modify all your snippets in %appdata%\Sublime Text\Packages\PHP
but i don’t recommend to do so for if, switch, for, … statements, take a look at framework.zend.com/manual/en/cod … ndard.html
Thought so, not what I wanted to hear.
That’s not a reason, different projects have different coding styles. To say I should use the Zend Framework standard without reason is stupid.
I’ll be editing the files
Just an idea:
Instead of modifying the actual snippets, you might write a short plugin that looks for braces and moves them one line down? The following regexp might not cover all cases, but it’s a starting point:
[code]// search
^((?: |\t))(^\s].?))\s*({)\s*$
//replace
\1\2\n\1\3
[/code]