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

Sublime​Love

by minism ALL

LÖVE support for SublimeText2

Details

  • 2016.05.04.22.20.45
  • love2d.​org
  • github.​com
  • 8 years ago
  • 2 hours ago
  • 12 years ago

Installs

  • Total 7K
  • Win 5K
  • Mac 1K
  • Linux 1K
May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27
Windows 0 1 0 0 0 0 0 0 2 1 0 0 0 0 1 0 0 1 2 0 1 0 0 0 0 0 0 1 0 0 1 3 2 0 0 0 0 0 2 3 0 0 0 1 0 1
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 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Description

SublimeLove is a package for Sublime Text 2 supporting the Love2D API.

Currently in alpha and still heavily a work in progress.

Installation

You can install this package by running the following command in your ST2 Packages directory:

git clone git://github.com/minism/SublimeLove.git

Features

Syntax highlighting

Hit ctrl/cmd+P, or go to View > Syntax, and set the syntax of your open file to “Lua (Love)” to enable highlighting for the Love2D API functions. On my editor, lua files are now defaulting to this syntax, but I'm not sure how to control that.

If you create a new pixel effect, and make the argument a multi-line string, then Sublime will use C syntax highlighting for the GLSL content.

Auto completion

Pressing ctrl+space in an open Love file will show the autocompletions for the API functions. ST2 currently has some issues with autocomplete that other plugins are also dealing with, so its not perfect yet. One major issue is that the period key breaks tokens and doesn't get included as part of the autocomplete query.

Those Love2D functions which are not overloaded (only one possible argument combination), will fill in the argument names for you.

Build system

To use the build command, the Love executable needs to be on your system PATH. Then, go to Tools > Build System and select “Love”. Hit F7 or cmd+B to run your Love program.

The build system will automatically be selected for lua files.

Links

Development

Go to the src directory. If Love2D has been updated, run scrape_api.py, which generates api.txt and callbacks.txt, then run build.py which assembles the Sublime files.

Love.JSON-tmLanguage is an expanded version of the Lua syntax highlighter. Leave the lua-love repository entry empty, as its filled in by build.py