如何给Source Insight添加块注释的宏 - [调试工具]

    2008年06月25日

    download here

    在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).

     

     





    引用地址:

    评论

  • 楼主,有没有这样的功能啊,用source insight 浏览的时候。左边的宏包含得太多,是否可以把这个宏包的给收拢起来?
  • 很好很强大,自己仿照写了一个针对LUA的,多谢分享
  • 对不起楼主。
    你的办法是OK的,是我自己搞错了。
    还在utils.em那个工程,自己用自己就不对。
    换我自己的工程,用用就OK!

    很好很强大。
    如果块注释是 #if 0 #endif ,也许更合适。
    不过应该可以在宏里面直接修改的,学习ing ......
  • cannot modify thd file buffer of a macro that is running : C:\....Source Insight\Projects\Base\utils.em
  • 很希望实现这个功能单看了好几次后还是不能实现.
    忘您指导.看到这个之后,请与我联系.非常感激
    HCUP回复易致富说:
    具体说一下你的问题。到第几步做不下去了?
    2008-11-13 11:09:37