<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[vim的php语法检查]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[生活笔记]]></category>
<pubDate>Thu, 03 Jul 2008 06:27:51 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	之前一直是editplus的忠实爱好者,对editplus的使用也是小有心得.自打转向到vim之后,费了很大劲才转换一些习惯,渐渐的脱离了editplus,可见一款趁手的编辑器还是粘性很强的.以前说到的editplus可以和zend studio自带的ZendCodeAnalyzer工具进行整合,对php语法进行检测,相当方便.那么怎样用vim实现类似的功能呢?一番搜索,找到了答案:<br/><br/>map &lt;C-J&gt; :!php -l %&lt;CR&gt;<br/><br/>这样在vim里面就可以直接用ctrl+j,调用php解析器对当前文档进行语法检查了.当然如果php解析器不在你的路径下的话,那么应该写上全路径,象下面这样:<br/><br/>map &lt;C-J&gt; :!c:/php/php -l %&lt;CR&gt;<br/><br/>PS:vim的语法美化功能也很方便,只要在程序的第一行,command模式下输入=:1,$,就可以把当前代码排列的井然有序.而editplus则需要另外的工具配合,也能做到这一点.<br/><br/>参考资料:http://www.vim.org/tips/tip.php?tip_id=692<br/><br/><br/><br/>怎么我在vim中不能用你所说的 =:1,$ 来美化PHP代码呢?<br/><br/>难道要先装zendcodeanalyzer?<br/><br/> <br/>volcano 于 2008-05-20 @ 00:24:37 留言 ：<br/><br/>不需要装zendcodeanalyzer。<br/><br/>首先你需要跳到代码的第一行，然后再输入=:1,$<br/><br/> <br/>Jeffery 于 2008-05-20 @ 10:54:57 留言 ：<br/><br/>嗯,可以了,我之前是输了:再输的=:1,$<br/>但是这样搞,好像只做了缩进..不知道还有没有其他的参数..<br/><br/> <br/>volcano 于 2008-05-20 @ 11:00:12 留言 ：<br/><br/>我是这样理解的，如果你输入了=号，那就表示你要做代码自动缩进的操作，后面输入需要操作的行数范围即可<br/><br/> <br/>wen 于 2008-05-30 @ 12:28:10 留言 ：<br/><br/>你好！看了你php语法检查，确实很有用谢谢！<br/>但是总觉得没吃都要调用cmd,有点丑，可否用QUICKFIX窗口输出<br/>我在网上看了一篇文章 ，他是用quickfix输出，但是我试了一下，不行。<br/>代码如下，你能否改改。谢谢<br/>“”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;<br/>” =&gt; Check PHP Syntax using makeprg<br/>“”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;”&quot;<br/><br/>function! PhpCheckSyntax()<br/>” Check php syntax<br/>setlocal makeprg=&#92;”C:&#92;php5&#92;php.exe&#92;”&#92; -l&#92; -n&#92; -d&#92; html_errors=off<br/><br/>” Set shellpipe<br/>setlocal shellpipe=&gt;<br/><br/>” Use error format for parsing PHP error output<br/>setlocal errorformat=%m&#92; in&#92; %f&#92; on&#92; line&#92; %l<br/>make %<br/>endfunction<br/><br/>” Perform :PhpCheckSyntax()<br/>map :call PhpCheckSyntax()<br/>imap :call PhpCheckSyntax()<br/><br/> <br/>volcano 于 2008-05-30 @ 13:39:33 留言 ：<br/><br/>你机器上的php.exe在这个位置么？C:&#92;php5&#92;php.exe<br/><br/>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] vim的php语法检查]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>