星期一, 7月 06, 2009

Source Insight 3.5 筆記

Source Insight 3.5 筆記

常用熱鍵
========
Ctrl+O : Open (在有 Project 狀態會開啟右邊 Project Window,無則變成 Browser Files)
Ctrl+= : Jump to definition
Alt+/ : Look up reference
F3 : search backward (F3 與 F4 與一般 Windows 軟體設定不太一樣)
F4 : search forward
F5 or Ctrl+g : go to Line
F7 : Look up symbols
F8 : Look up local symbols
F9 : Ident left
F10 : Ident right
Alt+, : Jump backword
Alt+. : Jump forward
Shift+F3 : search the word under cusor backward
Shift+F4 : search the word under cusor forward
F12 : incremental search
Shift+Ctrl+f : search in project
Shift+F8 : highlight word


存檔時移除不必要的白字
======================
Options -> Preferences...
-> Files (tab)
-> (Saving File Section)
-> Remove extra white space when saving (checkbox)


Tab = 4 Space
=============
/*
Options -> Preferences...
-> Syntax Formatting (tab)
-> Doc Types...(button)
*/
Options -> Document Options... (alt + t)
-> Document Type (Menu)
-> (Editing Options)
-> Expand Tabs (checkbox)
如果要設定數個語言,每個 Document Type 都要設定。(如 C 與 C++ 是分開的)


利用 AStyle 來排版原始碼
========================
AStyle = Artistic Style
Download at: http://sourceforge.net/projects/astyle

Step 1.設定 Custom Command
Options > Custom Commands...
按右邊的 Add 按鈕輸入 AStyle
Run: C:\util\AStyle.exe --style=linux -s4 %f
Dir: %d

Step 2.設定按鍵
Options > Key Assignments...
找 Costom Cmd:Astyle
按 Assign New Key 然後按 Ctrl + Shift + 0 (這裡與 Ultraedit 相同以免錯亂)


調整背景顏色
============
Options -> Preferences -> Colors(tab) -> Windows Background(item) -> Color(button)
淡藍色背景 R:232 G:232 B:255


Symbol Lookup
=============
Options -> Preferences -> Symbol Lookups
勾選 Parse locally before lookup (slower but more accurate)


修改 CTRL+A
============
Source Insight 的 CTRL+A 預設是 Save All
對常用 Windows 預設 Hot key 的人來說非常不習慣。
可以透過 Key Assignments 把 CTRL+A 改回 select all

Options -> Key Assignments -> (search in the textbox below the "command" label)

search: save, choose "save all", click "Assign New Key..." button, press CTRL+SHIFT+A
(remember to delete original assignment: CTRL+A)

search: select, choose "select all", click "Assign New Key..." button, press CTRL+A


取消 Auto Indent
================
Options -> Document Options... (alt + t)
-> Document Type (Menu)
-> Auto Indent... (button)
Auto Indent Type: None or Simple
如果要設定數個語言,每個 Document Type 都要設定。(如 C 與 C++ 是分開的)


使用 Explorer 開啟現在檔案目錄
==============================
Step 1.設定 Custom Command
Options > Custom Commands...
按右邊的 Add 按鈕輸入
Command: Open Current Folder
Run: ShellExecute open explorer /e,/select,%f
Dir: %d

Step 2.設定按鍵
Options > Key Assignments...
找 Costom Cmd: Open Current Folder
按 Assign New Key 然後按 Ctrl + Shift + j


使用 UltraEdit 來編輯目前檔案
=============================
參考設定 Astyle 的方式
Custom Name: UltraEdit
Command: "C:\Program Files\IDM Computer Solutions\UltraEdit-32\uedit32.exe" %f
key Assignment: ctrl + shift + 1 (ctrl + alt + u)

沒有留言: