1.括號(hào)配對(duì)高亮:
“在前括號(hào)左側(cè),后括號(hào)左側(cè)” 雙擊鼠標(biāo)左鍵,可以選定匹配括號(hào)和其中內(nèi)容(<>,(),L{R},[]之間)
?
2.讓{ 和 } 不縮進(jìn):
Options -> Document Options -> Auto Indenting -> Auto Indent Type 選 Simple
還有:讓{ 和 } 不縮進(jìn): options->document options->auto indent 去掉indent Open Brace和Indent Close Brace。 (不好使,括號(hào)無(wú)法配對(duì)對(duì)齊!)
?
3.添加文件類(lèi)型
用戶(hù)可以定義自己的類(lèi)型,Options->Document Options->add type,定義文件類(lèi)型名以及文件名后綴。
勾選include when adding to projects在添加目錄下文件到工程是該類(lèi)文件就會(huì)添加進(jìn)SI的工程。
如果需要將所有文件添加進(jìn)SI的工程,可以定義一種文件類(lèi)型*.*。
?
4.恢復(fù)ctrl+a的全選功能
Options -> Key Assignments:通過(guò)關(guān)鍵詞save 找到save all,更改為ctrl+shift+a,通過(guò)關(guān)鍵詞select找到select all,更改為ctrl +a
?
5.設(shè)置背景色:
Options->preference->color->windows background設(shè)置背景色(護(hù)眼色:85,90,205)
?
6.字符大小不一:
方法1:選上"view --> draft view", 就可以讓每個(gè)字符的寬度一致了。快捷鍵是 "Alt + F12"?
方法2: 解決中文注釋字體間距太大:
(1).Options->Style Properties
(2). 在左邊Style Name下找到Comment Multi Line和Comment.在其右邊對(duì)應(yīng)的Font屬性框下的Font Name中選“Pick...” 設(shè)置為宋體、常規(guī)、小四。確定,退回Style Properties界面,Size設(shè)為10。最后設(shè)置Clolors框下Foreground,點(diǎn)“Pick...”選擇一種自己喜歡的顏色就OK了
注:以上方法1為通用設(shè)置,方法2中可以設(shè)置注釋字體以及字體大小!
?
7.刪除注釋時(shí)半個(gè)漢字問(wèn)題(刪除一個(gè)漢字,漢字沒(méi)有了,但會(huì)多出一個(gè)問(wèn)號(hào)?)
方法:
① 將?SuperBackspace.em 復(fù)制到?Source Insight安裝目錄;
② Project→Open Project,打開(kāi)Base項(xiàng)目;
③ 將復(fù)制過(guò)去的SuperBackspace.em添加入Base項(xiàng)目;
④ 重啟SourceInsight;
⑤ Options→Key Assignments,將Marco: SuperBackspace綁定到BackSpace鍵;
⑥ Enjoy!!
?
SuperBackspace.em 的源碼在博文最后面,復(fù)制保存為SuperBackspace.em即可,或者可以在這里直接下載: http://pan.baidu.com/share/link?shareid=101784&uk=3204866771
?
8.實(shí)用快捷鍵:
Shift+F8 :高亮選中的字?
"ctrl + g" 或 "F5" :跳到指定行
“Ctrl+=” 或 Ctrl+鼠標(biāo)點(diǎn)擊標(biāo)識(shí) :直接跳轉(zhuǎn)至標(biāo)識(shí)定義處調(diào)用處
Ctrl+F :本文件內(nèi)查找
F7 :打開(kāi)Browse Project Symbols窗口,快速瀏覽工程內(nèi)標(biāo)識(shí)定義
F3 :本文件查找結(jié)果的上一個(gè)
F4 :本文件查找結(jié)果的下一個(gè)
Ctrl+M :創(chuàng)建或查找書(shū)簽,方便下次找回此位置
?
9.解決TAB鍵縮進(jìn)問(wèn)題
Options-> Document Options里面的右下角Editing Options欄里,把Expand tabs勾起來(lái),然后確定。OK,現(xiàn)在TAB鍵的縮進(jìn)和四個(gè)空格的縮進(jìn)在SIS里面看起來(lái)就對(duì)齊
(Linux下TAB是8個(gè)空格長(zhǎng)度,這樣設(shè)置可以讓TAB和4個(gè)空格保持一致!)
?
------------------------------------------------
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打開(kāi)
symbol window Alt+F8打開(kāi)和關(guān)閉
Contex Window 自定義鍵打開(kāi)和關(guān)閉
Relation Window 自定義鍵打開(kāi) 先鎖定再刷新聯(lián)系
?
*=========================== ?
SuperBackspace.em
?============================
* SuperBackspace Version 0.1beta
*
* 代替SourceInsight原有的Backspace功能(希望如此)
* 增加了對(duì)雙字節(jié)漢字的支持,在刪除漢字的時(shí)候也能同時(shí)刪除漢字的高字節(jié)而緩解半個(gè)漢字問(wèn)題
* 能夠?qū)鈽?biāo)在漢字中間的情況進(jìn)行自動(dòng)修正
*
* 安裝:
* ① 復(fù)制入SourceInsight安裝目錄;
* ② Project→Open Project,打開(kāi)Base項(xiàng)目;
* ③ 將復(fù)制過(guò)去的SuperBackspace.em添加入Base項(xiàng)目;
* ④ 重啟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
重畫(huà)屏幕 : Ctrl+Alt+Space
完成語(yǔ)法 : Ctrl+E
復(fù)制一行 : Ctrl+K
恰好復(fù)制該位置右邊的該行的字符 : Ctrl+Shift+K
復(fù)制到剪貼板 : Ctrl+Del
剪切一行 : Ctrl+U
剪切該位置右邊的該行的字符 : Ctrl+;
剪切到剪貼板 : Ctrl+Shift+X
剪切一個(gè)字 : Ctrl+,
左邊縮進(jìn) : F9
右邊縮進(jìn) : F10
插入一行 : Ctrl+I
插入新行 : Ctrl+Enter
加入一行 : Ctrl+J
從剪切板粘貼 : Ctrl+Ins
粘貼一行 : Ctrl+P
重復(fù)上一個(gè)動(dòng)作 : Ctrl+Y
重新編號(hào) : Ctrl+R
重復(fù)輸入 : Ctrl+
替換 : Ctrl+H
智能重命名 : Ctrl+'
關(guān)閉文件 : Ctrl+W
關(guān)閉所有文件 : Ctrl+Shift+W
新建 : Ctrl+N
轉(zhuǎn)到下一個(gè)文件 : Ctrl+Shift+N
打開(kāi) : Ctrl+O
重新裝載文件 : Ctrl+Shift+O
另存為 : Ctrl+Shift+S
顯示文件狀態(tài) : Shift+F10
激活語(yǔ)法窗口 : Alt+L
回到該行的開(kāi)始 : Home
回到選擇的開(kāi)始 : Ctrl+Alt+[
到塊的下面 : Ctrl+Shift+]
到塊的上面 : Ctrl+Shift+[
書(shū)簽 : Ctrl+M
到文件底部 : Ctrl+End, Ctrl+(KeyPad) End
到窗口底部 : (KeyPad) End (小鍵盤(pán)的END)
到一行的尾部 : End
到選擇部分的尾部 : Ctrl+Alt+]
到下一個(gè)函數(shù) : 小鍵盤(pán) +
上一個(gè)函數(shù) : 小鍵盤(pán) -
后退 : Alt+,, Thumb 1 Click
后退到索引 : Alt+M
向前 : Alt+., Thumb 2 Click
轉(zhuǎn)到行 : F5, Ctrl+G
轉(zhuǎn)到下一個(gè)修改 : Alt+(KeyPad) +
轉(zhuǎn)到下一個(gè)鏈接 : Shift+F9, Ctrl+Shift+L
回到前一個(gè)修改 : Alt+(KeyPad) -
跳到連接(就是語(yǔ)法串口列表的地方) : Ctrl+L
跳到匹配 : Alt+]
下一頁(yè) : PgDn, (KeyPad) PgDn
上一頁(yè) : PgUp, (KeyPad) PgUp
向上滾動(dòng)半屏 : Ctrl+PgDn, Ctrl+(KeyPad) PgDn, (KeyPad) *
向下滾動(dòng)半屏 : Ctrl+PgUp, Ctrl+(KeyPad) PgUp, (KeyPad) /
左滾 : Alt+Left
向上滾動(dòng)一行 : Alt+Down
向下滾動(dòng)一行 : Alt+Up
右滾 : Alt+Right
選擇一塊 : Ctrl+-
選擇當(dāng)前位置的左邊一個(gè)字符 : Shift+Left
選擇當(dāng)前位置右邊一個(gè)字符 : Shift+Right
選擇一行 : Shift+F6
從當(dāng)前行其開(kāi)始向下選擇 : Shift+Down
從當(dāng)前行其開(kāi)始向上選擇 : Shift+Up
選擇上頁(yè) : Shift+PgDn, Shift+(KeyPad) PgDn
選擇下頁(yè) : Shift+PgUp, Shift+(KeyPad) PgUp
選擇句子(直到遇到一個(gè) . 為止) : Shift+F7, Ctrl+.
從當(dāng)前位置選擇到文件結(jié)束 : Ctrl+Shift+End
從當(dāng)前位置選擇到行結(jié)束 : Shift+End
從當(dāng)前位置選擇到行的開(kāi)始 : Shift+Home
從當(dāng)前位置選擇到文件頂部 : Ctrl+Shift+Home
選擇一個(gè)單詞 : Shift+F5
選擇左邊單詞 : Ctrl+Shift+Left
選擇右邊單詞 : Ctrl+Shift+Right
到文件頂部 : Ctrl+Home, Ctrl+(KeyPad) Home
到窗口頂部 : (KeyPad) Home
到單詞左邊(也就是到一個(gè)單詞的開(kāi)始) : Ctrl+Left
到單詞右邊(到該單詞的結(jié)束) : Ctrl+Right
排列語(yǔ)法窗口(有三種排列方式分別按1,2,3次) : Alt+F7
移除文件 : Alt+Shift+R
同步文件 : Alt+Shift+S
增量搜索(當(dāng)用Ctrl + F 搜索,然后按F12就會(huì)轉(zhuǎn)到下一個(gè)匹配) : F12
替換文件 : Ctrl+Shift+H
向后搜索 : F3
在多個(gè)文件中搜索 : Ctrl+Shift+F
向前搜索 : F4
搜索選擇的(比如選擇了一個(gè)單詞,shift+F4將搜索下一個(gè)) : Shift+F4
搜索 : Ctrl+F
瀏覽本地語(yǔ)法(彈出該文件語(yǔ)法列表窗口,如果你光標(biāo)放到一個(gè)變量/函數(shù)等,那么列出本文件該變量/函數(shù)等的信息) : F8
瀏覽工程語(yǔ)法 : F7, Alt+G
跳到基本類(lèi)型(即跳到原型) : Alt+0
跳到定義出(也就是聲明) : Ctrl+=, Ctrl+L Click (select), Ctrl+Double L Click
檢查引用 : Ctrl+/
語(yǔ)法信息(彈出該語(yǔ)法的信息) : Alt+/, Ctrl+R Click (select)
高亮當(dāng)前單詞 : Shift+F8
語(yǔ)法窗口(隱藏/顯示語(yǔ)法窗口) : Alt+F8
關(guān)閉窗口 : Alt+F6, Ctrl+F4
最后一個(gè)窗口 : Ctrl+Tab, Ctrl+Shift+Tab
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
