打开C:\Documents and Settings\xxxx\My Documents\Source Insight\Projects\Base文件夹下的em文件,可以看到都是由macro定义的一系列函数,附件是我改写的一个比较简单的注释宏,大家可以将它复制粘贴到该em文件里,然后按类似操作为这个宏设置一个快捷键
当然我们还可以自己创建em文件,创建后保存到C:\Documents and Settings\xxxx\My Documents\Source Insight\Projects\Base文件夹下
然后打开 SI->project, open->BASE project.
SI->project, add project file,将保存的em文件加入到BASE project中.
SI->option, key assignments中, 找到你所编写的宏MACRO:InsertMark,为这个宏设置一个快捷键,比如ctrl+alt +/。
macro InsertMark() { hbuf = GetCurrentBuf() ln = GetBufLnCur(hbuf) szTime = GetSysTime(1) Hour = szTime.Hour Minute = szTime.Minute Second = szTime.Second Day = szTime.Day Month = szTime.Month Year = szTime.Year if (Day < 10) szDay = "[email protected]@" else szDay = Day if (Month < 10) szMonth = "[email protected]@" else szMonth = Month InsBufLine(hbuf, ln, "// Add By Author [@[email protected]/@[email protected]/@[email protected]] For ## Begin") InsBufLine(hbuf, ln+2, "// Add By Author [@[email protected]/@[email protected]/@[email protected]] For ## End") }
时间: 2024-10-07 19:49:32