How to makeEditPlusSupportedLUAThe course is the content to be introduced in this article.EditPlusInLUAFor more information, see the detailed description.
This article mainly introducesLuaPreparations.
1) download the Lua installation package, the latest version is lua-5.1.3. It is small, only 210 K
- http://luaforge.net/frs/?group_id=377
This is a WINDOWS version. It comes with an editor that can even get environment variables done once.
2) install the lua package
3) install the EditPlus Editor:
EditPlus is simple and easy to use, I like the Chinese version of http://www.crsky.com/soft/1578.html. 2.3 or later versions can use the registration code:
- Name:www.cnzz.cc
- Code:60A8E-21F10-5BZ83-ADW4E-F3TC9
4) Enable EditPlus to support lua highlighting
Select "Syntax" from the drop-down menu "Tools" -- "Preferences ". click "add" to add a file type. In the "Description" and "extension" column below, enter lua.
Set the syntax file below.
Lua. stx file: http://download.csdn.net/source/257667. Be sure to press the "LOAD" button.
Set "automatic line feed" and "indent ".
5) Enable EditPlus to call Lua5 debugging code
Select "user tools" on the left and click "add" -- "application" on the right"
Enter Run_Lua5 in the "menu text ".
In the "command" column, specify the location of the lua5 system installed in step (2.
In the "Parameters" column, select "file path" or $ (FilePath)
In the "Initial directory" column, select "file directory" or $ (FileDir)
After changing all the settings, do not forget to click "Apply" to make the settings take effect.
6) LetEditPlusThe error line can be located. It is troublesome to edit large files without this function.
This requires EditPlus to understand Lua5 output.
Note that there is a "Capture output" switch under the "Initial directory" column, which should be checked.
Press the "output mode" button to open the output mode setting box.
Remove the "use default output mode" option.
In the regular expression, enter "^ (.: \. *) :( [0-9]):. *"
Select "mark 1" for the file name, and select "Mark 2" for the row ".
7) Now, let's try syntax highlighting and debugging settings.
Create a new Lua file and write a line of code: print ("Hello, Lua ")
Select the "tool" in the menu. The following is the custom command Run_Lua5. Click this command to complete the execution of the lua file.
The execution result is a console written with "Hello, Lua.
8) try to locate the error line.
Add a line x = 1 before the Code. This is an incorrect expression.
Run the command again. Double-click the error prompt line in the pop-up console.
EditPlusAre the error lines correctly located?
Now, learnLuaAfter the preparation is complete, you can start learning.
Summary: How to makeEditPlusSupportedLUAThe course content will be completed. I hope this article will help you!