How to Make EditPlus support LUA tutorial

Source: Internet
Author: User

How to makeEditPlusSupportedLUAThis document describes the tutorials.LuaPreparations. AboutEditPlusImplementationLuaFor more information, see this document.

(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) InstallationLuaPackage

(3) install the EditPlus Editor:

EditPlusSimple 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 following registration code:

 
 
  1. Name:www.cnzz.cc  
  2. 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. In the "menu text", enter the Run_Lua5 "command" column, and enter your step (2) the location of the installed lua5 system. in the "parameter" column, select "file path", or $ (FilePath) in the "Initial directory" column, select "file directory", or $ (FileDir) to change all settings, do not forget to click "application" to make the settings take effect.

(6) Enable EditPlus to locate the error line. It is troublesome to edit large files without this function.

This requires EditPlus to understandLua5 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 line ".

(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 custom command Run_Lua5 is at the bottom, 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 a line of error expressions. Execute it 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.

Define a function template.

Why? Because a lua file usually contains many functions, it is very troublesome to find a function. If you press ctrl F11 to display the function list, it will be much better, and there will be a clear number of functions. To do this, click [function TEMPLATE] in the configuration syntax window just now. In the function template definition expression, enter the following: function [a-zA-Z0-9] + \ ([a-zA-Z0-9,] + \) \ n. * \ nend

Summary: Explain how to makeEditPlusSupportedLUAThe content of this tutorial has been introduced. I hope this article will help you!

Related Article

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.