如何给Source Insight添加块注释的宏 等

本文为转载: http://blog.21ic.com/user1/1177/archives/2011/82671.html

到下面的网址下载 comment.em 文件

http://www.sourceinsight.com/public/macros/comment.em

也可以这里下载:

comment.em

需要的宏在这个文件里面,注释和反注释分别是
macro CommentBlock()

macro UnCommentBlock()

具体怎么用我就不多说了,也可以参考下面的这篇文章。

Do you want the “select all”, “CommentBlock”, “UncommentBlock” function in source insight?
Here’re some tips:

1) Import the macros by replacing the default utils.em with this download one.

也可以这边下载:download

l Open “source insight”
l Open base project (Menu project->open project and you’ll find it)
l Open “utils.em” file (in the right floating window) and replace its content with the attached one.

2) Enable the macros
l Select Menu “Options” -> “Key assignment”
l Scroll down the left list box to find the macros:
Macro: CommentBlock
Macro: SelectAll
Macro: UncommentBlock
l Assign New keys for the macros
eg. “Ctrl+A” for “Select All”, “Ctrl+F11” for “CommentBlock” and “Shift+Ctrl+F11” for “UncommentBlock”

3) Try it.
Close the project and create a new file. Randomly enter something, press “Ctrl+A”, “Ctrl+F11”, “Ctrl+Shift+F11” to have a try.

By default, it will comment the block of lines with “//” at the beginning of each line, but if the file is a PERL file (.pl), it will use “#” instead. And you can change it for different file types by modifying the macro definition file (utils.em).

 

本文为转载: http://blog.21ic.com/user1/1177/archives/2011/82671.html

分享到: 更多
版权申明:

本站保留所有原创文章的版权,本站地址:奔跑的博客[http://www.elecbench.com]

原创文章转载时请注明出处,并添加文章所在页面的链接:http://www.elecbench.com/%e5%a6%82%e4%bd%95%e7%bb%99source-insight%e6%b7%bb%e5%8a%a0%e5%9d%97%e6%b3%a8%e9%87%8a%e7%9a%84%e5%ae%8f-%e7%ad%89/

本站所有 2010年3月4日 以后发表、未标明为“转载”的文章均是本站原创。

发表评论


(设置自己的个性头像)

*

申请属于你的免费顶级域名