sourceInsight官网介绍及插入定制语言支持

sourceInsight官网介绍及插入定制语言支持

版本说明

版本 作者 日期 备注
0.1 ZY 2019.6.4 初稿

目录

一、sourceinsight的官网:

https://www.sourceinsight.com/

二、sourceinsight的下载页:

https://www.sourceinsight.com/download/

可以看到除了4.x和3.5的下载和lincense购买外,还可以找到custom language files和Sample Macro Files,也就是定制语言文件和宏文件,我们这里需要的就是定制语言文件里的lua语言文件。

三、定制语言下载页:

https://www.sourceinsight.com/download/custom-languages/

四、自定义语言使用方法

下面还有使用方法的教学,这里简单翻译一下:

自定义语言文件为非内置语言的源代码提供语法格式化和一些解析支持。

扩展名为.xclf的文件用于Source Insight version 4及更新版本。
扩展名为.clf的文件用于版本3.x。

要将自定义语言文件导入Source Insight:

  • 1、Select Options > Preferences. Click the Languages tab.

Options->Preferences。单击Languages选项卡。

在这里插入图片描述

  • 2、Click the Import button. Select and load the custom language file (extension .clf for v3, and .xclf for v4). You should now see the new language in the list of languages.

单击导入按钮。
选择并加载自定义语言文件(v3扩展名为.clf, v4扩展名为.xclf)。
您现在应该在语言列表中看到新语言。

只要文件没有错就会出现语言,比如这里的Lua:

在这里插入图片描述

  • 3、Click the File Types button to open the File Type Options dialog box.

单击“文件类型”按钮打开“文件类型选项”对话框。

  • 4、If you don’t have a file type already created for the type of language file, you will need to create one now. If you already have a file type created, select it in the list and go to step 7.

单击“文件类型”按钮打开“文件类型选项”对话框。
-如果您还没有为语言文件类型创建一个文件类型,那么现在就需要创建一个。
如果已经创建了文件类型,请在列表中选择它并转到步骤7。

在这里插入图片描述

  • 5、Click the Add Type button to create a new file type. Give it a name that describes the type of file. For example, “Ant File”. Click OK and then fill in the file filter text box with a wildcard. For example, “*.ant”.

单击Add Type按钮创建一个新的文件类型。给它一个描述文件类型的名称。例如,“Ant文件”。单击OK,然后用通配符填充文件筛选器文本框。例如,“* .ant”。(如上图)

  • 6、In the Parsing section of the File Type Options dialog box, select the newly imported language in the language drop-down list. This is what associates your file type with the custom language.

在“文件类型选项”对话框的“解析”部分中,在“语言”下拉列表中选择新导入的语言。这就是将文件类型与自定义语言关联起来的方法。(如上图)

  • 7、Click the Close button to close File Type Options. Then click OK to close the Preferences dialog box.

单击“关闭”按钮关闭文件类型选项。然后单击OK关闭Preferences对话框。

五、Lua.xclf

.xclf的文件需要自己把网页的内容复制下来然后保存为.xclf文件(要把网址中的第一行删掉),对于.clf文件可以直接下载下来。

原网址是这样的:

在这里插入图片描述

处理后生成的Lua.xclf:

链接:https://pan.baidu.com/s/1gUkrmx902F07AWPY4lFStA
提取码:9n5r

发布了119 篇原创文章 · 获赞 138 · 访问量 19万+

猜你喜欢

转载自blog.csdn.net/weixin_39510813/article/details/90814602
今日推荐