天天看點

source Insight常用設定和快捷鍵大全

1.括号配對高亮:

“在前括号左側,後括号左側” 輕按兩下滑鼠左鍵,可以標明比對括号和其中内容(<>,(),L{R},[]之間)

2.讓{ 和 } 不縮進:

Options -> Document Options -> Auto Indenting -> Auto Indent Type 選 Simple

還有:讓{ 和 } 不縮進: options->document options->auto indent 去掉indent Open Brace和Indent Close Brace。 (不好使,括号無法配對對齊!)

3.添加檔案類型

使用者可以定義自己的類型,Options->Document Options->add type,定義檔案類型名以及檔案名字尾。

勾選include when adding to projects在添加目錄下檔案到工程是該類檔案就會添加進SI的工程。

如果需要将所有檔案添加進SI的工程,可以定義一種檔案類型*.*。

4.恢複ctrl+a的全選功能

Options -> Key Assignments:通過關鍵詞save 找到save all,更改為ctrl+shift+a,通過關鍵詞select找到select all,更改為ctrl +a

5.設定背景色:

Options->preference->color->windows background設定背景色(護眼色:85,90,205)

6.字元大小不一:

方法1:選上"view --> draft view", 就可以讓每個字元的寬度一緻了。快捷鍵是 "Alt + F12" 

方法2:解決中文注釋字型間距太大:

(1).Options->Style Properties

(2). 在左邊Style Name下找到Comment Multi Line和Comment.在其右邊對應的Font屬性框下的Font Name中選“Pick...” 設定為宋體、正常、小四。确定,退回Style Properties界面,Size設為10。最後設定Clolors框下Foreground,點“Pick...”選擇一種自己喜歡的顔色就OK了

注:以上方法1為通用設定,方法2中可以設定注釋字型以及字型大小!

7.删除注釋時半個漢字問題(删除一個漢字,漢字沒有了,但會多出一個問号?)

方法:

① 将 SuperBackspace.em 複制到 Source Insight安裝目錄;

② Project→Open Project,打開Base項目;

③ 将複制過去的SuperBackspace.em添加入Base項目;

④ 重新開機SourceInsight;

⑤ Options→Key Assignments,将Marco: SuperBackspace綁定到BackSpace鍵;

⑥ Enjoy!!

SuperBackspace.em 的源碼在博文最後面,複制儲存為SuperBackspace.em即可,或者可以在這裡直接下載下傳:​​http://pan.baidu.com/share/link?shareid=101784&uk=3204866771​​

8.實用快捷鍵:

Shift+F8 :高亮選中的字

"ctrl + g" 或 "F5" :跳到指定行

“Ctrl+=” 或 Ctrl+滑鼠點選辨別 :直接跳轉至辨別定義處調用處

Ctrl+F :本檔案内查找

F7 :打開Browse Project Symbols視窗,快速浏覽工程内辨別定義

F3 :本檔案查找結果的上一個

F4 :本檔案查找結果的下一個

Ctrl+M :建立或查找書簽,友善下次找回此位置

9.解決TAB鍵縮進問題

Options-> Document Options裡面的右下角Editing Options欄裡,把Expand tabs勾起來,然後确定。OK,現在TAB鍵的縮進和四個空格的縮進在SIS裡面看起來就對齊

(Linux下TAB是8個空格長度,這樣設定可以讓TAB和4個空格保持一緻!)

------------------------------------------------

Source Insight常用的快捷鍵:

Ctrl+= :Jump to definition

Alt+/ :Look up reference

F3 : search backward

F4 : search forward

F5: 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 : hilight word

視窗操作:

project window Ctrl+O打開

symbol window Alt+F8打開和關閉

Contex Window 自定義鍵打開和關閉

Relation Window 自定義鍵打開 先鎖定再重新整理聯系

*===========================  SuperBackspace.em ============================

* SuperBackspace Version 0.1beta
 *
 * 代替SourceInsight原有的Backspace功能(希望如此)
 * 增加了對雙位元組漢字的支援,在删除漢字的時候也能同時删除漢字的高位元組而緩解半個漢字問題
 * 能夠對光标在漢字中間的情況進行自動修正
 *
 * 安裝:
 * ① 複制入SourceInsight安裝目錄;
 * ② Project→Open Project,打開Base項目;
 * ③ 将複制過去的SuperBackspace.em添加入Base項目;
 * ④ 重新開機SourceInsight;
 * ⑤ Options→Key Assignments,将Marco: SuperBackspace綁定到BackSpace鍵;
 * ⑥ Enjoy!!
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
 macro SuperBackspace()
 {
 hwnd = GetCurrentWnd();
 hbuf = GetCurrentBuf();if (hbuf == 0)
 stop; // empty buffer// get current cursor postion
 ipos = GetWndSelIchFirst(hwnd);// get current line number
 ln = GetBufLnCur(hbuf);if ((GetBufSelText(hbuf) != "") || (GetWndSelLnFirst(hwnd) != GetWndSelLnLast(hwnd))) {
 // sth. was selected, del selection
 SetBufSelText(hbuf, " "); // stupid & buggy sourceinsight :(
 // del the " "
 SuperBackspace(1);
 stop;
 }// copy current line
 text = GetBufLine(hbuf, ln);// get string length
 len = strlen(text);// if the cursor is at the start of line, combine with prev line
 if (ipos == 0 || len == 0) {
 if (ln <= 0)
 stop; // top of file
 ln = ln - 1; // do not use "ln--" for compatibility with older versions
 prevline = GetBufLine(hbuf, ln);
 prevlen = strlen(prevline);
 // combine two lines
 text = cat(prevline, text);
 // del two lines
 DelBufLine(hbuf, ln);
 DelBufLine(hbuf, ln);
 // insert the combined one
 InsBufLine(hbuf, ln, text);
 // set the cursor position
 SetBufIns(hbuf, ln, prevlen);
 stop;
 }num = 1; // del one char
 if (ipos >= 1) {
 // process Chinese character
 i = ipos;
 count = 0;
 while (AsciiFromChar(text[i - 1]) >= 160) {
 i = i - 1;
 count = count + 1;
 if (i == 0)
 break;
 }
 if (count > 0) {
 // I think it might be a two-byte character
 num = 2;
 // This idiot does not support mod and bitwise operators
 if ((count / 2 * 2 != count) && (ipos < len))
 ipos = ipos + 1; // adjust cursor position
 }
 }// keeping safe
 if (ipos - num < 0)
 num = ipos;// del char(s)
 text = cat(strmid(text, 0, ipos - num), strmid(text, ipos, len));
 DelBufLine(hbuf, ln);
 InsBufLine(hbuf, ln, text);
 SetBufIns(hbuf, ln, ipos - num);
 stop;
 }      

*============================ SuperBackspace.em ============================ 

附: Source Insight快捷鍵大全

退出程式 : Alt+F4

重畫螢幕 : Ctrl+Alt+Space

完成文法 : Ctrl+E

複制一行 : Ctrl+K

恰好複制該位置右邊的該行的字元 : Ctrl+Shift+K

複制到剪貼闆 : Ctrl+Del

剪切一行 : Ctrl+U

剪切該位置右邊的該行的字元 : Ctrl+;

剪切到剪貼闆 : Ctrl+Shift+X

剪切一個字 : Ctrl+,

左邊縮進 : F9

右邊縮進 : F10

插入一行 : Ctrl+I

插入新行 : Ctrl+Enter

加入一行 : Ctrl+J

從剪切闆粘貼 : Ctrl+Ins

粘貼一行 : Ctrl+P

重複上一個動作 : Ctrl+Y

重新編号 : Ctrl+R

重複輸入 : Ctrl+

替換 : Ctrl+H

智能重命名 : Ctrl+'

關閉檔案 : Ctrl+W

關閉所有檔案 : Ctrl+Shift+W

建立 : Ctrl+N

轉到下一個檔案 : Ctrl+Shift+N

打開 : Ctrl+O

重新裝載檔案 : Ctrl+Shift+O

另存為 : Ctrl+Shift+S

顯示檔案狀态 : Shift+F10

激活文法視窗 : Alt+L

回到該行的開始 : Home

回到選擇的開始 : Ctrl+Alt+[

到塊的下面 : Ctrl+Shift+]

到塊的上面 : Ctrl+Shift+[

書簽 : Ctrl+M

到檔案底部 : Ctrl+End, Ctrl+(KeyPad) End

到視窗底部 : (KeyPad) End (小鍵盤的END)

到一行的尾部 : End

到選擇部分的尾部 : Ctrl+Alt+]

到下一個函數 : 小鍵盤 +

上一個函數 : 小鍵盤 -

後退 : Alt+,, Thumb 1 Click

後退到索引 : Alt+M

向前 : Alt+., Thumb 2 Click

轉到行 : F5, Ctrl+G

轉到下一個修改 : Alt+(KeyPad) +

轉到下一個連結 : Shift+F9, Ctrl+Shift+L

回到前一個修改 : Alt+(KeyPad) -

跳到連接配接(就是文法序列槽清單的地方) : Ctrl+L

跳到比對 : Alt+]

下一頁 : PgDn, (KeyPad) PgDn

上一頁 : PgUp, (KeyPad) PgUp

向上滾動半屏 : Ctrl+PgDn, Ctrl+(KeyPad) PgDn, (KeyPad) *

向下滾動半屏 : Ctrl+PgUp, Ctrl+(KeyPad) PgUp, (KeyPad) /

左滾 : Alt+Left

向上滾動一行 : Alt+Down

向下滾動一行 : Alt+Up

右滾 : Alt+Right

選擇一塊 : Ctrl+-

選擇目前位置的左邊一個字元 : Shift+Left

選擇目前位置右邊一個字元 : Shift+Right

選擇一行 : Shift+F6

從目前行其開始向下選擇 : Shift+Down

從目前行其開始向上選擇 : Shift+Up

選擇上頁 : Shift+PgDn, Shift+(KeyPad) PgDn

選擇下頁 : Shift+PgUp, Shift+(KeyPad) PgUp

選擇句子(直到遇到一個 . 為止) : Shift+F7, Ctrl+.

從目前位置選擇到檔案結束 : Ctrl+Shift+End

從目前位置選擇到行結束 : Shift+End

從目前位置選擇到行的開始 : Shift+Home

從目前位置選擇到檔案頂部 : Ctrl+Shift+Home

選擇一個單詞 : Shift+F5

選擇左邊單詞 : Ctrl+Shift+Left

選擇右邊單詞 : Ctrl+Shift+Right

到檔案頂部 : Ctrl+Home, Ctrl+(KeyPad) Home

到視窗頂部 : (KeyPad) Home

到單詞左邊(也就是到一個單詞的開始) : Ctrl+Left

到單詞右邊(到該單詞的結束) : Ctrl+Right

排列文法視窗(有三種排列方式分别按1,2,3次) : Alt+F7

移除檔案 : Alt+Shift+R

同步檔案 : Alt+Shift+S

增量搜尋(當用Ctrl + F 搜尋,然後按F12就會轉到下一個比對) : F12

替換檔案 : Ctrl+Shift+H

向後搜尋 : F3

在多個檔案中搜尋 : Ctrl+Shift+F

向前搜尋 : F4

搜尋選擇的(比如選擇了一個單詞,shift+F4将搜尋下一個) : Shift+F4

搜尋 : Ctrl+F

浏覽本地文法(彈出該檔案文法清單視窗,如果你光标放到一個變量/函數等,那麼列出本檔案該變量/函數等的資訊) : F8

浏覽工程文法 : F7, Alt+G

跳到基本類型(即跳到原型) : Alt+0

跳到定義出(也就是聲明) : Ctrl+=, Ctrl+L Click (select), Ctrl+Double L Click

檢查引用 : Ctrl+/

文法資訊(彈出該文法的資訊) : Alt+/, Ctrl+R Click (select)

高亮目前單詞 : Shift+F8

文法視窗(隐藏/顯示文法視窗) : Alt+F8

關閉視窗 : Alt+F6, Ctrl+F4