Home Download Buy Blog Forum Support

Functions, Classes - Underlined (full row)

Functions, Classes - Underlined (full row)

Postby sneila on Wed May 29, 2013 7:56 am

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: Select all
/* ------------------------------------------------------------------ */
function bla(){
  ...
}

Would be nice to have something like:

_________________________________________________________________________________________________________________________
function bla(){
   ...
}
sneila
 
Posts: 12
Joined: Mon May 27, 2013 2:52 pm

Re: Functions, Classes - Underlined (full row)

Postby skuroda on Thu May 30, 2013 12:25 am

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.

Image
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: Functions, Classes - Underlined (full row)

Postby sneila on Thu May 30, 2013 2:08 pm

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??
sneila
 
Posts: 12
Joined: Mon May 27, 2013 2:52 pm

Re: Functions, Classes - Underlined (full row)

Postby skuroda on Thu May 30, 2013 5:05 pm

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

Code: Select all
<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.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 6 guests