ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Levels

by mazurov ALL

SublimeText plugin for scope context coloring (ST2/ST3)

Details

  • 2013.08.18.12.03.29
  • github.​com
  • github.​com
  • 11 years ago
  • 59 minutes ago
  • 11 years ago

Installs

  • Total 3K
  • Win 901
  • Mac 1K
  • Linux 410
Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 1 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

Levels

SublimeText plugin for scope context coloring. Inspired by Douglas Crockford idea

By Sasha Mazurov (alexander.mazurov@gmail.com)

Supported languages

  • JavaScript: Uses my eslevels and V8 Python binding — PyV8

How to install

WARNING: this plugin may not work at all in some OSes since it written in JavaScript and uses PyV8 and Google V8 binaries to run.

  • Use Package Control: Preferences -> Package Control -> Install Package - > Levels

or

  • Clone or download git repo into your packages folder (In SublimeText Preferences->Browse Packages... menu item to open this folder):

WARNING: When plugin is installed, it will automatically download required PyV8 binary so you have to wait a bit (see Loading PyV8 binary message on status bar). If you experience issues with automatic PyV8 loader, try to install it manually.

Available commands

  • Enable scope context coloring: Levels: Update Ctrl+Shift+L
  • Restore original coloring: Levels: Off Ctrl+Shift+O

  • The code is automatically colored after a save action.

Options

  • The live coloring mode is switched off by default (the current plugin version works slow for large scripts). You can enable it in settings by "live": true.

  • Javascript coloring support two modes: "mini" - highlight only “important” language constructions and "full" - highlight whole scopes. You can set this options by changing javascript_mode value in settings.

Mini mode

Theme customization

By default the plugin use a modified version of the default theme Solarized (Light). If you want to use your favorite theme, you need to add new scope coloring rules like in plugin's Levels-light.hidden-tmTheme:

<dict>
            <key>name</key>
            <string>Level0</string>
            <key>scope</key>
            <string>level0</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#FDF6E3</string>
            </dict>
        </dict>
    ...
        <dict>
            <key>name</key>
            <string>Level9</string>
            <key>scope</key>
            <string>level9</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#cf9369</string>
            </dict>
        </dict>

, and update color_scheme value in plugin settings (applied only for scope coloring mode) or in default user settings.

Known issues.

Eslevels library

If you would like to be sure that your coloring problem is in eslevels and not in this plugin you can check your code on this page. If you have the same problems there then it means that the problem is in Eslevels library (or in your code)

Credits