Sublime Forum

Functions, Classes - Underlined (full row)

#1

Function declaration, Classes should have a visual separator throughout the entire line.

Maybe there is a plugin, or this can be skinned/styled, but i did not find anything.

phpStorm (and i presume other Jetbean software) have something like that.

Currently i put 1 line comment above like:

[code]/* ------------------------------------------------------------------ */
function bla(){

}

Would be nice to have something like:


function bla(){

}
[/code]

0 Likes

#2

Comment blocks above your functions are probably the best way to go (since documentation of your functions is a good thing right?). Alternatively, you could try modifying your color scheme file to apply a background color to the function, so it is distinguishable from the rest of the content. Obviously neither is the clean horizontal rule you have seen in PhpStorm, but just thought I would throw out an alternative solution.

0 Likes

#3

this would work too, can u paste me the “command” to do that?

ps: is there a location / section where all these color coding tweaks are listed, as in all the labels and what they do??

0 Likes

#4

I inserted something like this into a custom color scheme file, change the background color to something else.

<dict> <key>name</key> <string>Function highlight</string> <key>scope</key> <string>meta.function.php</string> <key>settings</key> <dict> <key>background</key> <string>#6699CC</string> </dict> </dict>

The colors being applied are based on the scopes applied by the tmLanguage file. You can view the scopes by entering “ctrl+shift+alt+p” in windows and linux or “ctrl+shift+p” in os x.

0 Likes