Link: http://blog.csdn.net/zhangxaochen/article/details/8104034
Write Lua in Windows. The best editor I can find is the scite IN THE luaforwindows project. NPP (Notepad ++) will also be used, but onlyCodeHighlighting and simple word/function prompts are really simple compared with scite. Many people say that Vim is the best, but I don't know why I am more distant from vim, that is, I don't like it very much. I will explore Vim when necessary.
Scite is really good. You can perform one-step debugging on Lua Code, set breakpoints, view variable values, stack tracking, and code prompts (more powerful than NPP ). For debugging, scite in luaforwindows has been configured, mainly because the default code prompts still need to be improved.
By default, scite only prompts the function parameter list. When you enter print and press '(', a prompt is displayed.
But if I don't know the print function or whether it is print or printf, what should I do if I want scite to prompt me?
Only need to changeSciteglobal. PropertiesAdd a sentence to the file:
AutoComplete. *. Start. characters =. $ (chars. Alpha)
It means that when you press the period '.' And the period key, an automatic completion prompt is displayed. If you press 'P', The 'pairs, pcall, and print 'prompt is displayed. We can see that there is no printf in the standard library.
Of course, this prompt can be customized by yourself.Lua. PropertiesThe API file is specified:
Api. $ (file. patterns. Lua) = $ (scitedefaulthome) \ lualib5_annot.api
OpenLualib5_annot.apiThis file shows a line like this:
Print (E1, E2,...) Prints values to stdout using tostring
This is the so-called code prompt content.
If you want to write your own API file, add the custom file name xxx. API to the configuration file, so:
Api. $ (file. patterns. Lua) = $ (scitedefaulthome) \ lualib5_annot.api; $ (scitedefaulthome) \ XXX. API
Note that the two API file paths are separated by semicolons. Do not use spaces after the semicolons.
Then you can write your own code prompts in XXX. API.
In addition, you can add the following sentence to the sciteglobal. properties file:
AutoComplete. *. fillups = (
After the code prompts, You need to press the tab key to complete it. Now press the left brace '(', saving you the need to press the tab button to relieve fatigue.
Link: http://blog.csdn.net/zhangxaochen/article/details/8104034
{Over }}