Use the Lua For Windows environment configuration and Editplus editing tool

Source: Internet
Author: User

LuaFor Windows environment configuration andEditplusThis document describes how to use the editing tool.EditplusFor details about how to use the editing tool, see this article.EditplusUsed as an editing toolSciTESupports Chinese Characters

Environment: lua for windows (lfW)

Home: http://luaforwindows.luaforge.net/

Lua for windows is actually a complete Lua development environment, which includes:

 
 
  1. Lua InterpreterLua Interpreter)
  2.  
  3. Lua Reference ManualLua Reference manual)
  4.  
  5. Quick Lua Tour Lua Quick Start)
  6.  
  7. Examples Lua example)
  8.  
  9. Libraries with documentation some Lua Libraries and documents)
  10.  
  11. SciTE is a great multi-purpose editor that has made special settings for Lua)

For more details, go to the luaforge homepage.

This environment is recommended because it integrates everything you need to learn and develop Lua in windows. It is very considerate for new users, with SciTE, you can easily compile, compile, run, and debug the Lua program after simple configuration. It also comes with automatic prompts and code auto-completion functions. for developers who are familiar with VC + VA, it is really kind.

The entire lfW is introduced below:

Download lfw. The latest version is V5.1.4.28. Install lfw directly. Note that the last step will ask if the SciTE editor uses the "black" style. I prefer the black background color, so check it here, and then proceed.
After the installation is complete, it is very easy to learn all the environments required by Lua.

Next, we can test whether the installation is successful.

Open SciTE, create a new file, and enter a line of lua code:

 
 
  1. print("hello,lua") 

Save as hello. lua. Note that the file name suffix. lua must be added when saving the file; otherwise, the file may not run correctly.

Press F5. If the output window of SciTE appears

 
 
  1. >lua -e "io.stdout:setvbuf 'no'" "hello.lua"   
  2. hello,lua  
  3. >Exit code: 0 

Indicates that the entire lua development environment is successfully installed.

If you are not satisfied with the default SciTE color scheme or font, click Open Global Options File in Options to view the Global configuration File of the SciTE environment. You can modify the font, color, window layout, and other values. If you cannot find the project you want to modify, go to Open black in Options. properties: if a white background is used, white is used here. properties) file, which stores more detailed property configuration.

Modifying these two files can basically satisfy the personal interests of most learning or developers. Also, in the Global Options File, find command. help. *. lua, followed by the lua manual file path in chm format popped up by pressing the F1 key in the editor. You need to modify the path here, correct the file path. Version 5.1.3 does not seem to have this problem ).

The whole environment also comes with a QuickLuaTour, which is a small console-based tutorial written in Lua, which is easy to understand.

SciTE supports Chinese:

Start scite and click Options and Open User Options file to Open Sciteuser. properties.

Enables the scite text editor to support Chinese characters,

65001 is UTF-8 encoded. Yidabu.com has tried, and there will be garbled characters when autoit processes utf8.

If character. set = 134 is not enabled, Chinese characters may be garbled in the output area.

 
 
  1. code.page=65001 
  2. code.page=936 
  3. output.code.page=936 
  4. character.set=134 

# Set the font size and font size

 
 
  1. Fontfont. monospace = font:, size: 10

How to Use editplus as an editing tool

Open EditPlus, select Tools -- Preferences, select setting & syntax, click Add on the right to Add a file type, and enter Lua in the Descr partition ption column below, in the FIle extension column, enter lua. Note that you can select Syntax File in the following column. This is where the Lua Syntax File is provided. With this feature, EditPlus can support the highlighted keyword display of lua code. This highlighted support code can be found on the Internet and made into a file with the suffix stx.

Select the User tools option on the left and click Add Tool -- Program on the right.

Then, enter Run_Lua in the Menu Text column.

Enter lua in the Command column.

Enter $ (FileName) in the Argument column)

Enter $ (FileDir) in the Initial directory column)

After changing all settings, do not forget to click Apply and then click OK.

Select File -- New -- Others..., select the New Lua File, and write a line of code as follows:

 
 
  1. print("Hello,Lua") 

Save it. Select the Tools menu. The custom command Run_Lua is displayed at the bottom. Click this command to complete the execution of the lua file or press Ctrl + 1 ). The execution result is a console written with "Hello, Lua.

Summary: The Lua For Windows environment configuration and the use of Editplus as the editing tool has completed the introduction of SciTE support For Chinese content. 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.