主机屋免费网站空间,app开发公司有哪些坑,商城网站建设机构,开源影视cms系统source insight 3.5 自带的一些宏#xff0c;在安装目录下的 utils.em 文件中#xff0c;用户也可以自己写文件#xff0c;命令为xxx.em #xff0c;然后把这个文件添加到项目中即可#xff0c;添加后在菜单栏 Options - Key Assignments 里输入macro 就能显示新添加的… source insight 3.5 自带的一些宏在安装目录下的 utils.em 文件中用户也可以自己写文件命令为xxx.em 然后把这个文件添加到项目中即可添加后在菜单栏 Options - Key Assignments 里输入macro 就能显示新添加的宏名称然后给它分配一个快捷键如 这个新加的宏名如果不显示可以先把这个 .em 文件从项目中移除然后再添加一遍。
新加的宏是这样的可以添加到新的一个 xx.em 文件中加入项目即可。
macro InsertComment2FileHeader()
{hbuf GetCurrentBuf()//这个是带绝对路径的文件名bufFileName GetBufName(hbuf)nameLen strlen(bufFileName)//没找字符串查找的函数只能用原始方法了ich 0chPos nameLenwhile(chPos 0){ch bufFileName[chPos - 1]//取文件名不要路径从末尾开始找第一个 \, 这样就知道文件名的起点了if(AsciiFromChar(ch) 92){break}chPos chPos - 1}realFileName while(chPos nameLen){//从最后一个\开始取就是文件名了ch bufFileName[chPos]realFileName cat(realFileName, ch);chPos chPos 1}//新加环境变量后source insight 要关闭再打开才获取到authorName getenv(author_email)//参数为0为格林尼治时区非0为本地时区dateTime GetSysTime(8)year dateTime.Yearmonth dateTime.Monthday dateTime.Dayhour dateTime.Hourminute dateTime.Minutesecond dateTime.SecondInsBufLine(hbuf, 0, /*****************************************************************)InsBufLine(hbuf, 1, * FileName: realFileName)InsBufLine(hbuf, 2, * Description: )InsBufLine(hbuf, 3, * DateTime: year-month-day hour:minute:second)InsBufLine(hbuf, 4, * Author: authorName)InsBufLine(hbuf, 5, * Version: )InsBufLine(hbuf, 6, *****************************************************************/)InsBufLine(hbuf, 7, )
}
另外这个环境变量是新加的添加的是系统级的环境变量加完之后需要重启一下 source insight否则取不到新加的环境变量。效果如下