Source Insight 多行注释

 时间:2026-02-12 13:28:15

1、打开Source Insight,【项目】---【打开项目】,打开base项目;

Source Insight 多行注释

Source Insight 多行注释

2、在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)  }  

3、【选项】---【菜单分配】,命令栏选择刚才加入的宏 MultiLineComment,menu栏选择你方便操作的菜单就行,一般选择工作,点击插入;

Source Insight 多行注释

4、点击确定后,会在菜单栏显示工作菜单,在工作菜单下拉列表中就有 MultiLineComment,今后使用时,选中要注释的行,点击这个标签就注释掉了。

Source Insight 多行注释

  • linux下如何使用clock_gettime函数
  • 如何让XShell保存日志
  • 怎样关闭删除浏览历史记录功能
  • oracle中如何处理引号
  • 神采奕奕拼音怎么拼写
  • 热门搜索
    糖画怎么做 奥迪车怎么样 手机掉水里怎么处理 qq怎么快速加好友 床怎么摆放方向风水好 午餐肉怎么吃 sd卡写保护怎么解除 肌肉痉挛怎么办 烫过的头发怎么打理 说话结巴怎么办