Sublime Forum

Autocomplete curly brace

#1

Hi All,

I have just come across ST2 and must say seems like a great application and will certainly evaluate alot more.

Is there any way to when using the autocomplete (keyword -> tab) to not have it hug the curly brace and to place it on a new line?

From:

foreach ($variable as $key => $value) {
	# code...
}

To:

foreach ($variable as $key => $value)
{
	# code...
}

Ideally this would be a global setting and not a per function setting…

Any help would be appreciated.

Thanks.

0 Likes

#2

You’ll have to edit the .sublime-snippet file. You can drag PHP folder from your packages directory (Preferences > Browse Packages) and do a find and replace to fix the problem across all the snippets if you need to.

0 Likes