Answer the question
In order to leave comments, you need to log in
How to fix code syntax in Sublime Text 3 on OC Linux (Mint 18.3)?
Hello.
I write code in PHP and often use the Tab button and I wanted to tweak the basic syntax of the code a little.
For example:
// по умолчанию php+Tab
<?php ?>
// мне нужно
<?php
code...
?>
// Если написать ifelse+Tab
// по умолчанию
if (condition) {
# code...
} else {
# code...
}
// Нужно
if ( condition ) {
# code...
}
else {
# else code...
}
Answer the question
In order to leave comments, you need to log in
So it seems to be platform independent, still create a snippet ( Packages\User\my-awesome.sublime-snippet ) and declare a trigger:<snippet>
<content><![CDATA[
<?php
${1:code...}
?>
]]></content>
<tabTrigger>php</tabTrigger>
</snippet>
You need to change the default snippet for .php, for example, using Package Resource Viewer :
1. Install Package Control,
2. Install Package Resource Viewer,
3. Using prv: Open Resource go to PHP/Snippets/php.sublime-snippet, change it .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question