Source Insight 多行注释

 时间:2026-04-25 02:40:14

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中如何处理引号
  • 神采奕奕拼音怎么拼写
  • 热门搜索
    艾条什么牌子好 血岩碎片有什么用 strength是什么意思 dnf驭剑士用什么武器 february是什么意思 养小鬼是什么意思 情人节送什么礼物好呢 要约收购是什么意思 今年什么时候冬至 凄惨的意思