当前位置: 移动技术网 > 科技>软件教程>编程开发 > PHP代码格式化(EditPlus+PHPCB) 支持批量格式化

PHP代码格式化(EditPlus+PHPCB) 支持批量格式化

2012年12月05日  | 移动技术网科技  | 我要评论
PHP代码格式化(EditPlus+PHPCB) 支持批量格式化
dw_cs4居然只会格式化html和css代码,g来g去也只有phpcb这一个n久没更新过的经典php代码格式工具了,命令行的,用法“phpcb file.php > newfile.php”。
phpcb(php code beautifier),整合不到dw里,dw里也没有格式化php代码的功能或插件,不过phpcb可以整合到editplus上,方法:

phpcb下载地址

整合phpcb到editplus:
eidtplus:工具》配置用户工具…》添加工具:
菜单文本:phpcb
命令:浏览到phpcb程序。
参数:--space-after-if --optimize-eol --space-after-switch --space-after-while --space-before-start-angle-bracket --space-after-end-angle-bracket --extra-padding-for-case-statement --glue-amperscore --change-shell-comment-to-double-slashes-comment --indent-with-tab --force-large-php-code-tag --force-true-false-null-contant-lowercase --comment-rendering-style pear --equal-align-position 50 --padding-char-count 1 "$(filepath)"
初始目录:$(filedir)
打勾:“以文本筛选器运行”,下拉选择“替换”
“应用”按钮。

另外,只想更好地使用phpcb的话,提供一个操作批处理:
操作phpcb的一个批处理phpformat.bat:

代码如下:
<完>

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网