<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodePy.Net &#187; vim</title>
	<atom:link href="http://codepy.net/tag/vim/feed" rel="self" type="application/rss+xml" />
	<link>http://codepy.net</link>
	<description>专注网络开发：Python,PHP,Vim,Linux 分享我的快乐 -- Share My Happiness</description>
	<lastBuildDate>Sun, 15 Jan 2012 16:20:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>保存文件时VIM自动检查PHP语法错误</title>
		<link>http://codepy.net/2009/11/05/auto-check-php-syntax-errors-in-vim.html</link>
		<comments>http://codepy.net/2009/11/05/auto-check-php-syntax-errors-in-vim.html#comments</comments>
		<pubDate>Thu, 05 Nov 2009 12:55:35 +0000</pubDate>
		<dc:creator>ruitao</dc:creator>
				<category><![CDATA[得力工具]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://codepy.net/?p=164</guid>
		<description><![CDATA[Google了一下，让VIM能够检查PHP的语法错误无外乎以下这段VIM配置： &#34;====================================================== &#34;PHP语法检查 &#34;====================================================== &#160; function! PhpCheckSyntax&#40;&#41; &#34; Check php syntax setlocal makeprg=\php\ -l\ -n\ -d\ html_errors=off\ % &#160; &#34; Set shellpipe setlocal shellpipe=&#62; &#160; &#34; Use error format for parsing PHP error output setlocal errorformat=%m\ in\ %f\ on\ line\ %l make % endfunction &#160; &#34; Perform :PhpCheckSyntax() map &#60;F6&#62; :call PhpCheckSyntax&#40;&#41;&#60;CR&#62; &#34; imap &#60;F6&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Google了一下，让VIM能够检查PHP的语法错误无外乎以下这段VIM配置：</p>

<div class="wp_syntax"><div class="code"><pre class="vim" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">&quot;======================================================</span><span style="color: #adadad; font-style: italic;">
&quot;PHP语法检查</span><span style="color: #adadad; font-style: italic;">
&quot;======================================================</span>
&nbsp;
<span style="color: #804040;">function</span><span style="color: #000000;">!</span> PhpCheckSyntax<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #adadad; font-style: italic;">
  &quot; Check php syntax</span>
  <span style="color: #804040;">setlocal</span> <span style="color: #668080;">makeprg</span>=\php\ <span style="color: #000000;">-</span>l\ <span style="color: #000000;">-</span>n\ <span style="color: #000000;">-</span>d\ html_errors=<span style="color: #25BB4D;">off</span>\ <span style="color: #000000;">%</span><span style="color: #adadad; font-style: italic;">
&nbsp;
  &quot; Set shellpipe</span>
  <span style="color: #804040;">setlocal</span> <span style="color: #668080;">shellpipe</span>=<span style="color: #000000;">&gt;</span><span style="color: #adadad; font-style: italic;">
&nbsp;
  &quot; Use error format for parsing PHP error output</span>
  <span style="color: #804040;">setlocal</span> <span style="color: #668080;">errorformat</span>=<span style="color: #000000;">%</span>m\ <span style="color: #804040;">in</span>\ <span style="color: #000000;">%</span>f\ <span style="color: #25BB4D;">on</span>\ <span style="color: #25BB4D;">line</span>\ <span style="color: #000000;">%</span>l
  make <span style="color: #000000;">%</span>
endfunction<span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Perform :PhpCheckSyntax()</span>
<span style="color: #804040;">map</span> <span style="color: #668080;">&lt;F6&gt;</span> <span style="color: #000000;">:</span><span style="color: #804040;">call</span> PhpCheckSyntax<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #668080;">&lt;CR&gt;</span><span style="color: #adadad; font-style: italic;">
&quot; imap &lt;F6&gt; &lt;ESC&gt;:call PhpCheckSyntax()&lt;CR&gt;</span></pre></div></div>

<p>不过我希望能够在保存的时候自动检查，所以加了这一句：</p>

<div class="wp_syntax"><div class="code"><pre class="vim" style="font-family:monospace;"><span style="color: #804040;">autocmd</span> <span style="color: #25BB4D;">BufWritePost</span> <span style="color: #000000;">*.</span>php <span style="color: #000000;">:</span><span style="color: #804040;">call</span> PhpCheckSyntax<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://codepy.net/2009/11/05/auto-check-php-syntax-errors-in-vim.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>揪出拖GVIM后腿的设置</title>
		<link>http://codepy.net/2009/09/13/let-gvim-run-smoother.html</link>
		<comments>http://codepy.net/2009/09/13/let-gvim-run-smoother.html#comments</comments>
		<pubDate>Sun, 13 Sep 2009 12:41:32 +0000</pubDate>
		<dc:creator>ruitao</dc:creator>
				<category><![CDATA[得力工具]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://codepy.net/?p=156</guid>
		<description><![CDATA[最近一直在Arch下面用GVIM进行编程，但是最近一段时间用GVIM全屏编辑程序的时候，用h、j、k、l移动光标时明显有迟滞，光标移动速度 很慢，经常是我已经停止按键盘，可是光标好像还是有惯性一样继续“飘”，一开始以为是键盘没有设置好，将键盘的重复频率调到了9，迟滞不明显了，但是用起 来感觉着实不爽。 仔细分析了一下，在VIM下面并没有出现这种状况，这种状况只出现在使用GVIM的时候，所以检查了一下.vimrc文件里面GUI专属配置，记得 几天前开启了GVIM下面的光标所在行高亮的功能，把 " set cursorline 注释掉后，一切都流畅了。感觉很爽……^^]]></description>
			<content:encoded><![CDATA[<p>最近一直在Arch下面用GVIM进行编程，但是最近一段时间用GVIM全屏编辑程序的时候，用h、j、k、l移动光标时明显有迟滞，光标移动速度 很慢，经常是我已经停止按键盘，可是光标好像还是有惯性一样继续“飘”，一开始以为是键盘没有设置好，将键盘的重复频率调到了9，迟滞不明显了，但是用起 来感觉着实不爽。</p>
<p>仔细分析了一下，在VIM下面并没有出现这种状况，这种状况只出现在使用GVIM的时候，所以检查了一下.vimrc文件里面GUI专属配置，记得 几天前开启了GVIM下面的光标所在行高亮的功能，把</p>
<div>
<div>
<pre>" set cursorline</pre>
</div>
</div>
<p>注释掉后，一切都流畅了。感觉很爽……^^</p>
]]></content:encoded>
			<wfw:commentRss>http://codepy.net/2009/09/13/let-gvim-run-smoother.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

