posts - 311, comments - 0, trackbacks - 0, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

(搬运工)Lua Editor Support

Posted on 2012-03-06 16:19 点点滴滴 阅读(1569) 评论(0)  编辑 收藏 引用
Editor support may include syntax highlighting, auto-formatting, syntax checking, build and debug integration, etc.

The following editors have some Lua support (at least highlighting or formatting) out of the box:

  • [Koneki Lua Development Tools] (Windows/MacOS/Linux, 32 & 64 bits, Open Source (EPL))
    • Eclipse-based IDE, available as a standalone distribution
    • Auto completion
    • Syntax highlighting
    • Syntax error markers
    • Code formatter
    • Code folding
    • Code snippets
    • Occurence highlighting
    • Code navigation ("Go to definition")
    • Visual debugger

  • [Decoda Lua IDE] (Win32)
    • Auto completion
    • Syntax highlighting
    • Debugger for Lua 5 and later using Visual Studio PDB to allow debugging of embedded lua code
    • Supports Debugging on 360 and PS3
    • Supports LuaJIT and LuaPlus?
    • Watch, Globals, Locals, Call Stack, Lua Stack, etc
    • Used Commercially by large and small games studios

  • [LuaEdit IDE] (Win32, Win64, freeware)
    • Completion proposal
    • Syntax highlighting
    • Watch, Globals, Locals, Call Stack, Lua Stack, etc
    • Debugger (local and remote) for Lua 5.0.2 and 5.1.4

  • [DForD LuaCoding] (Win32, shareware, [free license])
    • Auto completion
    • Syntax highlighting
    • Code folding
    • Code snippet
    • Symbol list
    • Organises projects
    • Watch, Globals, Locals, Call Stack, Lua Stack, etc
    • Debugger for Lua 5.1

  • [Vim] (most platforms)
    • Vim comes with syntax highlighting and indentation for Lua. Vim 7 supports Lua 5.1
    • [ftp.vim.org] You can download the lastest version of the syntax and indent files here.
    • [luarefvim] is the Lua reference manual for Vim.
    • [lua-support] Lua-IDE for Vim.
    • LuaInspect - has plugin for VIM

  • [Scintilla/SciTE] (Win32/GTK+)
    • Lua syntax highlighting (4.0, 5.0, 5.1), including nested literal strings and block comments.
    • Lua scripting extension [1]
    • SciteScripts is a community area for disseminating Lua extension scripts
    • [lua5api.zip] Lua 5 C API and Lua functions for SciTE calltips (with optional annotations)

    • [SciTE Setup Wizard] provides a batteries-included installation for Windows; it is pre-configured with Lua function calltips and Lua 5 keywords.
    • [Lua for Windows] includes a customized version of SciTE which can also debug Lua scripts.
    • LuaInspect - has plugin for SciTE

  • [NsEditor] (Win32, freeware) NsEditor? for the Apocalyx Engine is a stand-alone script editor written to develop games for the Apocalyx engine. NsEditor? is written in Delphi. It's main target is to simplify Apocalyx game development by means of offering a rich set of features and a game framework. The most important editor features include:
    • Multiple script editor windows, Lua syntax highlighting, Apocalyx syntax highlighting, context dependent syntax.
    • Auto proposal and completion plus parameter proposal, Templates, Zipfile support, Media preview, Direct control of Apocalyx allowing in-game editing and control, Unlimited custom Apocalyx control commands, Function list, etc.
    • NsEditor? is set up to also supports a complete game framework. The game framework is based on a set of prefab entities and macro functions. Entities are predefined code snippets, written as normal Lua functions, that can be insert into your personal game scripts.
    • Project template files, zip file support, media preview, goto function, insert Variable, GlGooey? skin editor (to skin the GUI elements), XML highlighter, INI highlighter, etc.

  • [Geany] (Unix, Windows and most other platforms)
    • Code folding, Syntax highlighting (since Geany 0.11)

  • [Textadept] (Windows/Linux/OS X, MIT, GTK+)
    • Extremely extensible editor written in C and Lua using Scintilla

  • [Zeus for Windows] (Win32, shareware)
    • Code folding
    • Syntax highlighting
    • Project/Workspace manager
    • Class browser
    • Code templates
    • Tools and macros
    • The [QuickHelp] feature can open the [Lua Helpfile] at the topic of current word.
    • [Debugger] for Lua 5.1.2
    • Editor is fully configurable using embedded Lua 5.1.2 scripting module

  • [PSPad for Windows] (Win32, freeware)
    • Support of Lua 4.0 syntax highlighting
    • Can be re-configured to support Lua 5.0 syntax highlighting
    • Keyboard F-keys can open [Lua Helpfile] at the topic for a word the cursor is on.

  • [Crimson Editor for Windows] (Win32, freeware)
    • Support of Lua 4.0 syntax highlighting
    • Can be re-configured to support Lua 5.0 syntax highlighting
    • F1 can open [Lua Helpfile] at the topic for a word the cursor is on.

  • [EmEditor] (Win32, shareware)
    • Lua 5.0 syntax highlighting configuration file

  • [jEdit] (Java, freeware)
    • Support of Lua 5.0 syntax highlighting

  • [TextWrangler] (OS X, freeware)
    • Support of Lua 5.0 syntax highlighting

  • [SubEthaEdit] (OS X, commercial)
    • Support of Lua 5.0 syntax highlighting

  • [TextMate] (OS X, commercial)
    • Support of Lua 5.0 syntax highlighting
    • Lua macro support

  • [BBEdit] (OS X, commercial)
    • Support of Lua 5.0 syntax highlighting

  • [Smultron] (OS X, freeware; discontinued)
    • Support of Lua 5.0 syntax highlighting

  • [FXiTe] (Windows/Linux/FreeBSD, GPL)
    • Lua syntax highlighting
    • Built-in Lua scripting engine

  • [ScriptDev] - script IDE for Python, Ruby, Lua, Tcl, Perl

Editors requiring 3rd party add-ons, and miscellaneous editor tools:

  • [Emacs] and [XEmacs] (most platforms)
    • [lua-mode] with syntax highlighting, auto-indent, interactive lua shell, paren and brace matching, auto-move to function or block begin/end, online documentation look-ups, postprocess output buffer (jump to error lines using traceback).
    • [lua2-mode] - semantic highlighting for Lua (e.g. differentiate globals and locals).

  • [Coda] (OS X, commercial)
    • Requires copying the Lua syntax module from the [SubEthaEdit] demo

  • [NEdit] (most platforms)
    • visit site to download Lua pattern

  • [MC-Cooledit] (Unix, win32)
    • [Syntax coloring scheme] Use this with the internal editor of the GNU Midnight Commander to get your scripts with fancy colors. Includes small Lua script to perform installation.

  • [UltraEdit] (win32)
    • [Syntax coloring scheme] Copy/paste this at the bottom of the wordfile.txt configuration file in the installation folder to add syntax coloring for Lua 5.

  • [Epsilon] (win32)
    • Epsilon is an emacs-like editor that has been around for quite a few years in the DOS, OS/2, Windows, and lately Mac OSX and Linux platforms. A [simple Lua mode] is available, written in Epsilon's C-like extension language EEL. It is known to work with Epsilon 13, and probably works with some earlier versions as well. Save the liked file locally as luamode.e, compile to bytecode and load into the running Epsilon state with the compile-buffer command (which is probably bound to Alt+F3). Save the modified state file as usual (with the write-state command). The resulting major mode handles simple syntax highlighting and code indentation cases, but it does have blind spots and limitations.

  • [Eclipse] (open-source, EPL) is a Java IDE that can be extended to support Lua 5.1 with one of these plugins
    • [Koneki Lua Development Tools] wich comes with syntax highlight, code completion, compilation errors, code and comment folding, code navigation, and a debugger.
    • [LuaEclipse] wich comes with syntax highlight, code completion, compilation errors, code and comment folding (and) script execution with a pre-configured interpreter.
    • [LunarEclipse] wich comes with syntax highlight, code completion, compilation errors, code and comment folding and an ouline view.

Comments on Specific Editors

UltraEdit

Add code-folding ability by adding these lines to the syntax highlighting file above:

/Open Fold Strings = "{" /Close Fold Strings = "}"

jEdit

Here's a basic jEdit macro that filters the currently selected text through a Lua function. --DavidManura

Process p = java.lang.Runtime.getRuntime().exec(
    "lua -e\"io.stdout:write((io.stdin:read'*a':gsub('[a-z]','-')))\"");
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
bw.write(textArea.getSelectedText());
bw.close();

BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String text = "";
String buffer;
while ((buffer = br.readLine()) != null) { text += buffer + "\n"; }
textArea.setSelectedText(text);