面是对代码块设成注释的宏语句,使用前需要先选中希望注释的代码块,选中的首尾位置可以在首位行的任意位置,这里用的是"/*"和"*/",本来希望做成对每一行加"//",这样就像vs.net了,可惜ue宏不支持变量,所以没想到实现的好办法。
insertmode
columnmodeoff
hexoff
unixreoff
ifsel
startselect
key end
cut
key home
ifcolnum 1
key end
endif
"/* "
timedate
"
"
key end
paste
key end
"
"
timedate
" */"
endif
下面是对代码解除注释的宏代码,同样需要选中希望解除注释的代码块,选中的首尾位置可以在首位行的任意位置。
insertmode
columnmodeoff
hexoff
unixreon
ifsel
cut
"~@#"
paste
deleteline
"~@@#"
top
find "~@#"
deleteline
find "~@@#"
delete
endif
下面是对单行代码加"//"注释的宏代码,这个就简单多了 :-)
insertmode
columnmodeoff
hexoff
unixreoff
"~@#"
key home
ifcolnum 1
else
key home
endif
"//"
find "~@#"
delete
最后是解除行注释的宏代码:
insertmode
columnmodeoff
hexoff
unixreoff
"~@#"
key home
ifcharis "/"
delete
ifcharis "/"
delete
else
"/"
endif
endif
find "~@#"
delete
对行的注释和解除注释不需要选中行,只需要光标落在此行中即可。这里要提一下的是,本来对于行解除注释的宏想写成如下形式的:
insertmode
columnmodeoff
hexoff
unixreoff
"~@#"
key home
ifcharis "/"
key right arrow
ifcharis "/"
key right arrow
deletetostartofline
endif
endif
find "~@#"
delete
这样可读性好些,实现逻辑也合理,让人faint的是,我用的是uev11的中文版,不支持key right arrow,如果使用宏录制功能,得到的是key 右箭头 →,但如果手动写key 右箭头 →,系统就报错,说没有这个命令,真让人不得其解~~~这里由于存在一些逻辑,所以不能录制,只能手写。
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器