Source Insight使用指南
第1页 共12页
目录
1. Source Insight 基本设置 ..................................................................................................................... 3
1.1 字体设置...............................................................................................................................................................................................3 1.2 自动缩进设置.......................................................................................................................................................................................3 1.3 其它设置...............................................................................................................................................................................................4
2. Source Insight中的宏 ............................................................................................................................. 5 2.1 使用宏...................................................................................................................................................................................................5 2.2 指定快捷键...........................................................................................................................................................................................6 3. Source Insight中的自定义命令 ............................................................................................................... 6 3.1 如何自定义命令...................................................................................................................................................................................6
3.2 指定快捷键...........................................................................................................................................................................................7 3.3 正则表达式语法...................................................................................................................................................................................7 3.4 集成编译器...........................................................................................................................................................................................8 3.5 集成版本控制工具.............................................................................................................................................................................10
4. 其它.....................................................................................................................................................11 4.1 特殊的注释.........................................................................................................................................................................................11
第2页 共12页
Source Insight使用指南
1. Source Insight 基本设置
1.1 字体设置
Option-〉Document Options 文档设置。
Screen Fonts 设置显示字体。推荐使用等宽字体,如“Courier”,这样在代码对齐时容易处理,但中文字体显示有锯齿。使用“宋体” 字时,代码可能存在对齐问题。
1.2 自动缩进设置
Option-〉Document Options-〉Auto Indent 自动缩进设置。详细缩进样式请参考Source Insight 帮助的Command Reference-> Document Options-〉Auto Indenting。
第3页 共12页
Source Insight使用指南
Auto Indent Type 选择 Smart
Smart Indent Options 两个复选框都不要选择
缩进后样式如:
if() { }
1.3 其它设置
? Editing Options 编辑器设置
Show line numbers 显示行号
Show right margin 显示右边界线(边界线显示在Margin width 处) Tab width TAB键宽度,设置为 4
Margin width 页空白宽度,页面右边界线的位置,设置为80。选择后在编辑窗口右
第4页 共12页
Source Insight使用指南
侧设置的宽度处出现分割线
Show page breaks 显示页面分割线,选择后在编辑窗口出现打印页分割线
? 如果编辑窗口中的中文字符中间分割过大或者出现对齐问题时,请尝试如下设置:
Options-> Preferences-> Display-> Spacing
选择 Layout tabstops using monospace calculations 和 Layout spaces using monospace calculations
? 定制Open命令
Options-> Preferences-> Files-〉Custom “Open” Command
2. Source Insight中的宏
2.1 使用宏
首先关闭当前使用中的Source Insight,然后复制macro\%utils.em 到 我的文档\\Source
第5页 共12页