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 的工程, 可以定义一种文件类型 *.*
如:
*.java;*.jav;*.xml;*.json,*.gradle,*.bat,*.pro,*.mk,*.aidl,*.so, *.jpg,*.png,*.svg,*.webp,*.html,*.htm,*.properties,*.jar,*.aar,*.bin,*.
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 安装目录;
ProjectOpen Project, 打开 Base 项目;
将复制过去的 SuperBackspace.em 添加入 Base 项目;
重启 SourceInsight;
OptionsKey Assignments, 将 Macro: 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 个空格保持一致!)
10.SIS 中文乱码的问题
source insight 中文注释乱码问题的解决方案 - ccf19881030 的专栏 - 博客频道 - CSDN.NET
- http: //blog.csdn.net/ccf19881030/article/details/8987759
- ------------------------------------------------
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 安装目录;
* ProjectOpen Project, 打开 Base 项目;
* 将复制过去的 SuperBackspace.em 添加入 Base 项目;
* 重启 SourceInsight;
* OptionsKey Assignments, 将 Macro: 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
最后一个窗口 : Ctrl+Tab, Ctrl+Shift+Tab
来源: http://www.bubuko.com/infodetail-2491540.html