Source Insight中代码块注释
转载:http://blog.csdn.net/cindylx422/article/details/7560786
修改工程目录下的utils.em文件,将下面代码添加到末尾,然后将此文件添加到工程中才会起作用
macro MultiLineComment()
{
hwnd = GetCurrentWnd()
selection = GetWndSel(hwnd)
LnFirst = GetWndSelLnFirst(hwnd) //取首行行号
LnLast = GetWndSelLnLast(hwnd) //取末行行号
hbuf = GetCurrentBuf() if(GetBufLine(hbuf, 0) == "//magic-number:tph85666031"){
stop
} Ln = Lnfirst
buf = GetBufLine(hbuf, Ln)
len = strlen(buf) while(Ln <= Lnlast) {
buf = GetBufLine(hbuf, Ln) //取Ln对应的行
if(buf == ""){ //跳过空行
Ln = Ln + 1
continue
} if(StrMid(buf, 0, 1) == "/") { //需要取消注释,防止只有单字符的行
if(StrMid(buf, 1, 2) == "/"){
PutBufLine(hbuf, Ln, StrMid(buf, 2, Strlen(buf)))
}
} if(StrMid(buf,0,1) != "/"){ //需要添加注释
PutBufLine(hbuf, Ln, Cat("//", buf))
}
Ln = Ln + 1
} SetWndSel(hwnd, selection)
}
为其添加快捷键alt+1
Source Insight中代码块注释的更多相关文章
- Source Insight 中使用 AStyle 代码格式工具
Source Insight 中使用 AStyle 代码格式工具 彭会锋 2015-05-19 23:26:32 Source Insight是较好的代码阅读和编辑工具,不过source in ...
- AStyle代码格式工具在source insight中的使用
一.AStyle下载路径 Astyle为开源项目,支持C/C++和java的代码格式化 Home Page: http://astyle.sourceforge.net/ Project Page: ...
- source insight中的快捷键总结
1.快捷键 1,Shift+F8高亮显示指定字符. 2,Ctrl+F找出来的结果用F4,F3前进后退查找. 3,Alt+,后退alt+.前进查找关键字. 4,Alt+G或者F5跳转到某个固定的行号. ...
- 在source insight中集成astyle
转自:http://www.cnblogs.com/xuxm2007/archive/2013/04/06/3002390.html 好吧,我有代码格式的强迫症,代码不整齐,我看的都头疼,之前一直喜欢 ...
- source insight 中tab键的设置
转:http://xinzero.com/source-insight-code-alignment-ended.html source insight代码对齐Tab键终极版 以前也写过一个sourc ...
- Sublime Text 代码块注释
插件:DocBlockr /*回车:创建一个代码块注释 /**回车:在自动查找函数中的形参等等.
- Source Insight 中调用Notepad++
options>custom commands 指令为 "E:\Program Files (x86)\Notepad++\notepad++.exe" %f 其中%f表示S ...
- Source Insight 中的 Auto Indenting
编码过程中,希望输入花括号时能自动对齐,Source Insigth 应如何设置? 先来看一下Source Insight 中的帮助. “ Auto Indenting The auto-indent ...
- 让Source Insight完美支持中文注释
如何让source insight支持中文注释,解决回车删除,移动光标出现乱码的问题?下面是解决方案: -------Source Insight3 中文操作(左右键.删除和后退键)支持宏-- ...
随机推荐
- 保密员(baomi)
#include<iostream> #include<string> #include<stdio.h> #include<algorithm> #i ...
- iOS开发,更改状态栏(StatusBar)文字颜色为白色
详细实现步骤 1.如图在Info.plist中进行设置,主要用于处理启动画面中状态栏(StatusBar)文字颜色. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5u ...
- ES6学习笔记九:修饰器
一:修饰器(Decorator)是一个函数,用来修改类的行为. 1)定义与使用 function 修饰器名(target) { //target是被修饰对象,可用target.xxx进行调用修改 } ...
- V-rep学习笔记:视觉传感器1
Vision sensors, which can detect renderable entities(Renderable objects are objects that can be seen ...
- excel查找和替换
快捷键:ctrl+f或者ctrl+h组合键 1.该功能经常会用到,但是需要注意的是“选项”功能,可以确定查找范围,区分大小写等. 2.如何控制查找范围? 1)设置范围--确定是查找工作表还是工作薄,同 ...
- java for语句
//for语句 public class Test16{ public static void main(String args[]){ for (int i=0;i<10;i+=1){ if ...
- 合并果子(NOIP2004)
合并果子(NOIP2004)[问题描述]在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆.多多决定把所有的果子合成一堆.每一次合并,多多可以把两堆果子合并到一起,消耗的体 ...
- Python是解释性语言吗? 直到看到有 python py、pyc、pyo、pyd 文件
py是源文件,pyc是源文件编译后的文件,pyo是源文件优化编译后的文件,pyd是其他语言写的python库 1. Python是一门解释型语言? Python是一门解释性语言,我就这样一直相信下去, ...
- pycharm安装提示 module 'pip' has no attribute 'main'
问题描述: 环境: windows10 pycharm2016.2.3 //在最先版本的pycharm就没问题,可能还需要升级pip版本 python3.6 pip安装模块,提示 Attribute ...
- Centos7.4和Ubuntu18.04安装PHP7.2
安装依赖 yum install gcc-c++ libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcu ...