Per-token font size in Sublime Text 2

后端 未结 1 1017
礼貌的吻别
礼貌的吻别 2020-12-06 14:29

Apologies if this has already been answered but I couldn\'t find any duplicates.

Is it possible to set font sizes on a per-token basis in Sublime Text 2? For example

相关标签:
1条回答
  • 2020-12-06 14:59

    Unfortunately, this is not possible, as there are no directives in the API or in color schemes for dealing with font size at that level of granularity.

    However, it is possible to provide additional highlighting to your color scheme (.tmTheme file) so that function definitions stand out. It looks like you're using Monokai, so open Packages/Color Scheme - Default/Monokai.tmTheme and add the following to the end, just before the final </array>:

            <dict>
                <key>name</key>
                <string>Function definition</string>
                <key>scope</key>
                <string>meta.function</string>
                <key>settings</key>
                <dict>
                    <key>background</key>
                    <string>#000080</string>
                </dict>
            </dict>
    

    This will highlight your function definition lines in a dark blue:

    monokai highlight

    It also works for alternate function definition syntaxes:

    jquery1 jquery2

    Good luck!

    0 讨论(0)
提交回复
热议问题