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 中文操作(左右键.删除和后退键)支持宏-- ...
随机推荐
- LintCode: Convert Sorted Array to Binary Search Tree With Minimal Height
C++ /** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; ...
- 【Linux】Ubuntu配置服务自启动 sysv-rc-conf
在Ubuntu下,配置服务系统开机自启动,使用的不是chkconfig,而是sysv-rc-conf. 且看如下: 安装: sudo apt-get install sysv-rc-conf 帮助信息 ...
- npm - 部分常用命令(笔记)
<!-- npm部分简写: ci -> package-lock.json ls -> list pkg -> package i -> install -g -> ...
- IDEA引入外部jar包的方法
在做发短信的功能(阿里大于)的时候,我只是吧jar包拷贝到了项目的external library. 拷贝进来之后我用junit写了test方法,可以完美发送短信到手机,但是我这是个web项目,然后我 ...
- Centos 6下安装Oracle 11gR2
一.安装环境 CentOS release 6.7 (Final) Oracle Database 11g Release 2 二.安装前准备 #修改主机名 修改/etc/sysconfig/netw ...
- mvn test
mvn -B install -Dmaven.test.skip=true -Dautoconfig.skipmvn -B org.codehaus.mojo:cobertura-maven-plug ...
- python之模块pprint之常见用法
# -*- coding: cp936 -*- #python 27 #xiaodeng #python之模块pprint之常见用法 import pprint data = [(1,{'a':'A' ...
- 从JSF看XPages的优点
我们都知道XPages基于JSF,或者可以说XPages是JSF标准的实现(implementation)之一.JSF从2004年的1.0到现在的2.0,已经经历了很大的变化和发展.XPages最初开 ...
- Ubuntu下的init.d管理update-rc.d
计算机在启动的时候会自动执行一些脚本,用于启动一些应用程序服务,update-rc.d 是管理这些脚本的常用命令之一. 首先这是 LinuxQuestions 中对 update-rc.d 的定义: ...
- HDU 1069 Monkey and Banana(最大的单调递减序列啊 dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1069 Problem Description A group of researchers are d ...