Go笔记 1.3 让SourceInsight支持Golang

1 SourceInsight 介绍

在我看来,SI还是最好用的编辑器,简单而强大,最爽的是函数调用和被调用都清晰无比。

在Golang开发时,虽然可以用 IDE 工具,但代码查看终究不够方便。notepad 看单个文件还行,项目文件一多的话,还得再搞个SI来耍。

工欲善其事,必先利其器。这篇笔记研究下如何让 SI 支持 Golang。

我正在学习酷酷的 Golang,可点此查看帖子Golang学习笔记汇总

2 如何在SI中添加新语言支持包

SI 提供了 Go 语言包,具体操作方法可以见 https://www.sourceinsight.com/download/

这是SI的自定义语言文件目录。后缀 .xclf 的文件是 SI 4.0版本及以后的版本。后缀 .clf 的文件适用于 3.x 版本。

Custom Language files for adding new language support to Source Insight.

This is [a directory of custom language files](https://www.sourceinsight.com/download/custom-languages/). Files with .xclf extension are used for Source Insight version 4 and newer. Files with .clf extension are used for version 3.x.

To import a custom language file into Source Insight:

1.Select Options > Preferences. Click the Languages tab.
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.
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.
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".
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.

因此先下载 SI 4.0,具体破解方法可参考:
http://blog.csdn.net/biubiuibiu/article/details/78044232

重要操作记录如下:

Step2. 把 golang.xclf 加载进去。

Step4. 添加 文件类型,如图。

Step5 and 6.配置文件过滤类型和解析语言,如图。

3 SI的个人喜好配置

安装好之后,来个工程感受下。最大的变化是窗口文件不再需要 “TabSiHost”,直接在主窗口上方展示已打开的文件。

大家可以根据个人喜好对工程做些调整。

  1. view -> panels -> 勾选 Project Window // 展示出项目窗口
  2. Project File 窗口-> Setting -> 可以去掉 File size, File Date 等细节 // 这样不会展示过多文件信息
  3. view -> panels -> 勾选 Relation Window // 展示关联窗口
  4. view -> panels -> 勾选 Symbol Window // 展示关联窗口

End


已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页