选择显示字体大小

在ultraedit中用宏实现将选中的代码设置为注释

面是对代码块设成注释的宏语句,使用前需要先选中希望注释的代码块,选中的首尾位置可以在首位行的任意位置,这里用的是"/*"和"*/",本来希望做成对每一行加"//",这样就像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   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons