D
D
Dmitry Sergeev2012-10-25 09:23:33
css
Dmitry Sergeev, 2012-10-25 09:23:33

Is it possible in Sublime 2 to change the output of the Symbol List (ctrl+r) for a css file?

It is more convenient for me to navigate through the file with “block” styles, the blocks themselves are highlighted like this:

/* Reset
-----------------------------------------------------------------------------*/
ol, ul {
    line-height: 17px;
    list-style: none outside none;
    margin: 0 0 0.1em;
}

/* Header
-----------------------------------------------------------------------------*/
#header {
    color: #4F5155; 
    position:relative;
    padding:0 0 10px;
    background: #FFE680;
    width: 100%;
    min-height:13em;
}



Symbol List (a layer that appears when pressing ctrl+r) allows you to move only through each individual property, which is not very convenient if there are a lot of styles. Picking my nose

a little in the editor files, I found the files in the C:\Users\Jetmaster\AppData\Roaming\Sublime Text 2\Packages\CSS\ directory . In particular, the Symbol List.tmPreferences file, which, it seems to me, is responsible for displaying the list of styles in the layer, this is clear from the line s/^\s*/CSS: /;s/\s+/ /g You can change it to s/^ \s*/ASS: /;s/\s+/ /g and press ctrl+r But I can't find where and with what help the data is parsed for output. I want the Symbol List to have a Reset Header , etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Sergeev, 2012-10-25
@JetMaster

The solution is this.
1. Add another asterisk to block names

/** Reset
-----------------------------------------------------------------------------*/

Already now if you press ctrl+r you can see this block. But again, all the style names are visible.
2. Edit the file \Sublime Text 2\Packages\CSS\Symbol List Group.tmPreferences Change the
line
source.css meta.selector
to
source.dcss meta.selector We rejoice
.

L
leMar, 2012-10-25
@leMar

I can only give advice: write directly to the developers, or look at their forum. Or if there are difficulties with English or the developers do not answer, ask this person: github.com/sergeche . At least he won't leave you without attention.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question