Giter VIP home page Giter VIP logo

sublime-levels's Introduction

Levels

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

By Sasha Mazurov ([email protected])

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

sublime-levels's People

Contributors

mazurov avatar varemenos avatar

Stargazers

Janaka Dissanayake avatar

Watchers

James Cloos avatar

Forkers

jdiss

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.