Source Insight使用配置[phunxm]

来源:互联网 发布:开淘宝网店怎么弄客服 编辑:程序博客网 时间:2024/06/05 20:17
一.Options->DocumentOptions

1.Document Type& File Filter

Document Type

File Filter

C Source File

*.h;*.c;*.m;*.pch

C++ Source File

*.cpp;*.hpp;*.cxx;*.hxx

X86 Asm Source File

*.asm;*.inc;*.s;*.S

Make File

*.mak;*makefile

(1)FileFilter之间以半角分号(;)隔开。

(2)默认已勾选“Include when adding to projects”,每次“Project->Add and Remove ProjectFiles”时,勾选“Show only known document types”。

2.EditingOptions

(1)默认已勾选“Allow auto-complete”、“Enter key->new line”和“SymbolWindow”;默认“Tab width”=4(一个Tab键折合四个空格键宽) ,“Margin width”=80。

(2)勾选“Allow Smart Paste”。

(3)如果要将一个Tab键展开ab width为个空格键,则勾选“Expand Tabs”;不勾选则保留tab键。一般取决于公司的代码对齐规范。

(4)勾选“Show line numbers”,将显示代码行号。

(5)勾选“Show right margin”,将在“Margin width”处显示分割线(line breaks)。

3.Auto Indent

(1)AutoIndent Type:选择Smart

(2)SmartIndent Options:去掉Indent Open Brace和Indent Close Brace

勾选AutoIndent和SMART的效果: 在C程序里, 如果遇到行末没有分号的语句,如IF, WHILE, SWITCH等,写到该行末按回车,则新行自动相对上一行缩进四列。

勾掉indentOpen Brace和IndentClose Brace的效果: 继上一段,在相对缩进行里, 如果输入"{"或"}",则自动和上一行列对齐。

4.Screen Fonts

Deja Vu Sans Mono/小四

二.Options->Preferences

1. SyntaxFormatting

勾选“Useonly color formatting”,这样函数名就不会黑体凸显,影响等宽排版。

2. Typing

勾选“Typingtab indents line,regardlessof selection”(与“Typingtab replaces current selection”二选一),这样能够使用Tab键使选中的文字往后缩进4个空格,Shift+Tab则可以使选中的文字往前缩进4个空格。整体调整代码缩进时非常有效!

3. Symbol Lookups

勾选“Findsymbols across different language types”,这样就可以在*.h、*.c、*.s间统一查找符号。

4. Searching

勾选“Alwaysreplace old Search Results”

三.Symbol Windowleft

1.SymbolOperation

可以对symbol执行“Cut”、“Copy”、“Paste”和“Duplicate”操作。

2.Sort Symbol

可以SortSymbol by“Name”、“Line”或“Type”。

3.SymbolWindow Properties

(1)Font:Monaco/五号;

(2)可以配置“Text Color”和“Back Color”。

四.Context Windowleft bottom

1.ContextWindow Properties

(1)Font:Consolas/四号

(2)可以配置“Text Color”和“Back Color”。

五.Relation Windowright bottom

1.RelationWindow Properties

(1)将Levels修改为2。

(2)ViewRelationShip->For Functions,默认为calls显示调用关系,修改为References显示被调用关系。

(3)Font:AndaleMono/小四

(4)可以配置“Text Color”和“Back Color”。

2.Relation WindowGraph Properties

    略。

六.Save/Load Configuration

1.保存当前配置

Options->Save Configuration(*.CF3)

2.加载配置文件

Options->Load Configuration(*.CF3)

七.常用快捷键(shortcut

1.Ctrl+单击

跳转到当前光标所在符号的定义处,相当于双击底端的Symbol窗口。

2.Ctrl+=

跳转到当前选中符号的定义处。

3.Alt+,/.

Go Back/GoForwad。

4.Ctrl+g

跳到指定行。


5.F7/F8

Browse Project/Local Symbols。


6.Ctrl+F

当前文件查找,F3/F4跳转到上/下一个。

7.Ctrl+/

全局文件查找,Shift+F9跳转到下一个。

8.Shift+F8

高亮光标所在位置的符号。

9.Ctrl+Shift+[/] / Ctrl+-

括号匹配/块选。

 

10.Ctrl+’

重命名(Smart Rename),更改函数内局部变量的名字。

11.Alt+F12

View->Draft View:让每个字符的宽度一致。

 

12.Ctrl+W

关闭当前文档。

13.Ctrl+Shift+W

关闭所有打开的文档。

14.Alt+F4

退出Source Insight

0 0
原创粉丝点击