Giter VIP home page Giter VIP logo

luasublime's Introduction

LuaSublime

A collection of various different support files useful for use when programming in Lua using Sublime Text 2.

Installation

These files should be placed into the Lua package directory. For those on OS X, this can be found at:

/Users/[USERNAME]/Library/Application Support/Sublime Text 2/Packages/Lua

For Windows, this directory is here:

C:\\Users\\[USERNAME]\\AppData\\Roaming\\Sublime Text 2\\Packages\\Lua

Contents

Syntax Coloring

Lua.tmLanguage Lua.JSON-tmLanguage

These files define a language grammar for syntax highlighting lua files. Compared to the one that ships with Sublime Text, you get the following:

  • More tokens: Things like function calls and variables are now tagged, so they will show up correctly colored.
  • Better scopes: Most blocks now have some nested scoping support. This means that if the carat is on a variable in an if-block inside a function inside another function, then it knows this. This doesn't affect the coloring, but if you use the 'expand selection to scope' command then you will find that you'll get far better matches now.

For comparison, here's how the old syntax-highlighting looks with the Twilight color scheme:

Old

And here's the new one:

New

Build System

Lua.sublime-build

This is a simple build system that compiles and runs the current lua file. You can jump between errors using F4.

Live Parser

ParseLua.py

This is a small plugin that continually parses the current lua file and highlights any errors by placing a dot in the margin.

Syntax Error

Lua appears to stop at the first error, so you should only ever see one dot. The error message will be shown in the status bar.

Status Bar

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.