如何给Source Insight添加块注释的宏 - [调试工具]
2008年06月25日
在L392可修改注释格式
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.
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).




评论
你的办法是OK的,是我自己搞错了。
还在utils.em那个工程,自己用自己就不对。
换我自己的工程,用用就OK!
很好很强大。
如果块注释是 #if 0 #endif ,也许更合适。
不过应该可以在宏里面直接修改的,学习ing ......
忘您指导.看到这个之后,请与我联系.非常感激