XCode LUA Syntax highlighting

Source: Internet
Author: User
Tags lua

For C + + programmers accustomed to using Visual Studio + Visual Assistx, using powerful Xcode to write code is inconvenient, and if you write Lua scripts, you have to use sublime Text, that's not much to say, Tears are rushing ...

The answer to whether Xcode has a LUA-syntax-highlighting plugin is absolutely yes. Although writing this article has the suspicion of imitating others, but in order to deepen the memory, please understand.
The next step is to install the LUA highlight plugin in Xcode in the general process:

(1) Download LUA syntax plugin, URL:

Https://github.com/breinhart/Lua-In-Xcode

Its main file is add-lua.sh, Lua.xclangspec, after downloading the file, assume that the file directory is named: Lua-in-xcode-master

(2) Open terminal, enter Lua-in-xcode-master directory, enter command: sudo./add-lua.sh (enter) note to ensure that Xcode is turned off

(3) Enter the machine's password, note that the terminal is not displayed the password of the machine, so, after input, directly click Enter.

(4) Open the terminal again and enter the command:

Rm-f/private/var/folders/*/*/*/com.apple.developertools/*/xcode/plugincache-debug.xcplugincache

This command, which is used primarily to clear out its cache

(5) Open Xcode, choose Editor---Syntax coloring, find Lua, click to make the corresponding LUA syntax color, if you switch to other LUA files, you need to select Syntax coloring

  

That's probably the way it is, but here's what you'll want to say about the settings for the Xcode syntax discoloration:

(1) Go to application, find Xcode, right click to select "Show Package Contents", then go to contents/shareframeworks/dvtfoundation.framework/versions/a/resources , note that these files are hidden files.

(2) in the above directory, you will find a lot of such as, C++.xclangspec, C.xclangspec and so on. Xclangspec files, these are the relevant language documentation, you can use Sublimetext to open their files to see the contents of the relevant grammar file.

(3) in the same directory, find Dvtfoundation.xcplugindata, the file is a plist configuration file in various languages, after opening, you can view the configuration of the following Lua file, as follows:

These are the general steps of the language configuration, say a bit more, but hope to bring you some gains.

Reference:

Http://www.jianshu.com/p/79c0824f2b31

http://blog.csdn.net/cen616899547/article/details/24378567

http://blog.csdn.net/XiaoYuWen1242466468/article/details/50906912

XCode LUA Syntax highlighting

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.