EditPlus Builds LUA development environment

Source: Internet
Author: User
Tags function definition lua

Before you get ready to learn a language, it's necessary to have a handy editor (the editor is an eternal topic in the Programmer's circle), because I've been using EditPlus, so here's how to build a Lua development environment in EditPlus.

Of course before I did the internet search a bit, find a lot, but all the same (are reproduced in the same old article), and after the configuration of some problems, almost can not use (I do not know whether the Lua upgrade or EditPlus upgrade caused)

The configuration described here is based on the EditPlus 3.50 and Lua 5.1, and after my test of the successful configuration scheme, if you have any questions after trial, please do not hesitate to enlighten us, greatly appreciated.

First set User Tools:

Menu: Tools-> Configure User Tools ... Open a dialog box


Select an empty group, rename it to Lua, click the Add Tool >> button, select Program,command to select the Lua.exe file under the Lua installation directory, and the Argument key is set to "$ (FilePath)" (note that quotation marks are important and do not However, if the file name contains a space to perform an error, it is recommended that the $ (FilePath) parameter of the program item for any User Tools be enclosed in quotes), the Initial directory entry is set to $ (filedir), and the action option capture Output


Click the Output parrern button to open the dialog box to set error message resolution, the regular content is set to ^.:\ \.*: (.:\ \.*):(\d+):. *,file Name Selection match 1,line select match 2 (the configuration is important here, otherwise the error message for double-clicking the Output window cannot be correctly positioned to the file and the error line)

Now open a LUA file, select good User Tools Press ctrl+1 directly to debug the LUA program (after the language support is configured without manual selection)

You can also add Help files, click the Add Tool >> button, select the Html Assist file (*.chm) item, and then locate the file in the CHM file under the LUA installation directory docs, but the LUA CHM file cannot be directly positioned off Key words, otherwise ctrl+2 (this shortcut key number according to the configuration order) search the current cursor location keyword is quite convenient.

Add language support:

EditPlus The most commendable point is that you can customize the syntax highlighting configuration, of course, this profile does not need to write their own, can be downloaded to this page: Http://www.editplus.com/dn.php?n=lua51.zip

There is only one lua51.stx file in the compressed package, which is extracted to the EditPlus installation directory for standby.

Menu: Tools-> Preferences Open Preferences dialog box, left list select File-> Settings & Syntax


Click Add ... button to add language support, rename to Lua (of course the name can be casually written), extension fill in the Lua,syntax file to select the syntax files just extracted, User tools Item Select the LUA item created earlier (this will automatically select the appropriate use when you create or open a LUA file) R Tools)

Click the Func pattern button to set the function definition regular, and the content is function\s+ ([\w\.] +) \s*\ ([\w\s\.,]*\) \s*\n.*\n\s*end (if this is not available, it may be that you did not open the use TR1 regular expression items, it is recommended to open, otherwise it does not support \w \d and other metacharacters), other settings as shown in the figure


Once configured, Ctrl+f11 opens the Function List dialog box, which is very convenient for locating function definitions.


Turn from: http://blog.csdn.net/dofy/article/details/8513698

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.