<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Thomas Koch - VIM</title>
    <link>http://koch.ro/blog/</link>
    <description>Dubio Sapientiae Initium.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.4.1-1 - http://www.s9y.org/</generator>
    <pubDate>Sat, 24 Apr 2010 09:29:16 GMT</pubDate>

    <image>
        <url>http://koch.ro/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Thomas Koch - VIM - Dubio Sapientiae Initium.</title>
        <link>http://koch.ro/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Exploring Eclipse, PDT and Eclim</title>
    <link>http://koch.ro/blog/index.php?/archives/134-Exploring-Eclipse,-PDT-and-Eclim.html</link>
            <category>PHP</category>
            <category>VIM</category>
    
    <comments>http://koch.ro/blog/index.php?/archives/134-Exploring-Eclipse,-PDT-and-Eclim.html#comments</comments>
    <wfw:comment>http://koch.ro/blog/wfwcomment.php?cid=134</wfw:comment>

    <wfw:commentRss>http://koch.ro/blog/rss.php?version=2.0&amp;type=comments&amp;cid=134</wfw:commentRss>
    

    <author>nospam@example.com (Thomas Koch)</author>
    <content:encoded>
    Back in 2006 I learned, that KWrite (a simple text editor) was not enough to write PHP code with. I tried eclipse, but it seemed too complex and was way too slow on my old laptop.&lt;br /&gt;
&lt;br /&gt;
So inspired by the &lt;a href=&quot;http://schlitt.info/opensource/blog/0488_comfortable_php_editing_with_vim_5.html&quot;&gt;Comfortable PHP editing with VIM&lt;/a&gt; series of Tobias Schlitt I learned VIM. &lt;br /&gt;
&lt;br /&gt;
My blogpost about &lt;a href=&quot;http://koch.ro/blog/index.php?/archives/63-VIM-an-a-PHP-IDE.html&quot;&gt;Vim as an IDE for PHP&lt;/a&gt; is a popular page and I often get requests about details of my setup. Please don&#039;t ask me anymore, since I intend to move away from this setup!&lt;br /&gt;
&lt;br /&gt;
Some weeks ago I&#039;ve been at a conference (&lt;a href=&quot;http://gearconf.com/&quot;&gt;GearConf&lt;/a&gt;) about team collaboration. Some of the tools presented there (like &lt;a href=&quot;http://www.eclipse.org/mylyn/&quot;&gt;Mylyn&lt;/a&gt;) made me jealous of the java people.&lt;br /&gt;
&lt;br /&gt;
So it was time to reconsider Eclipse. However editing text with what&#039;s called an &quot;editor&quot; in eclipse is a pain to say the least. But life&#039;s good and somebody already created &lt;a href=&quot;http://eclim.sourceforge.net/&quot;&gt;eclim&lt;/a&gt;. Eclim allows you to keep using gvim for text editing but integrates with Eclipse to give you code completion, manual lookup, code projects and more.&lt;br /&gt;
This alone may not convince you, since I already have this integrated in vim. But there are at least three major advantages of vim+eclipse:&lt;br /&gt;
&lt;ul&gt;  &lt;li&gt;There&#039;s not only the integration for PHP but also Java, Javascript, Python, Ruby, C/C++, CSS, HTML and XML&lt;/li&gt;  &lt;li&gt;Eclipse comes with a bunch of other cool plugins (like Mylin)&lt;/li&gt;  &lt;li&gt;The code completion from eclipse is much more powerful then anything you can do with VIM. For example it also proposes you the correct classmembers after foo:: or $bar-&amp;gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;a href=&quot;http://ou.jiayong.name/&quot;&gt;My collegue Jiayong&lt;/a&gt; just installed the bundled version of PDT with eclipse, ran the eclim installer and was ready.&lt;br /&gt;
&lt;br /&gt;
However I&#039;m much more addicted to pain, so I took the &lt;a href=&quot;https://launchpad.net/ubuntu/+source/eclipse&quot;&gt;Ubuntu packages of eclipse 3.5.1&lt;/a&gt;, &lt;a href=&quot;http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way/&quot;&gt;linked&lt;/a&gt; the pdt runtime download and all dependencies in a separate directory, checked out the GIT repository of eclim, configured the classpath in the ant buildfile and build eclim from source. The deployment of eclim can be looked up from the ant buildfile.&lt;br /&gt;
There are some more tweaks to do, which I can point out later, if you should dare to follow this road. You shouldn&#039;t have a need for this until you&#039;d be interested to become famous and beloved and &lt;a href=&quot;http://wiki.debian.org/Java/RequestedPackages&quot;&gt;package PDT or eclim&lt;/a&gt; for Debian.&lt;br /&gt;
&lt;br /&gt;
Do you already have experiences with eclim+pdt? Are there tutorials I&#039;ve not found? Are you interested to come with me to explore this setup?  
    </content:encoded>

    <pubDate>Sat, 24 Oct 2009 16:48:24 +0200</pubDate>
    <guid isPermaLink="false">http://koch.ro/blog/index.php?/archives/134-guid.html</guid>
    
</item>
<item>
    <title>Lightning Talk at Google about VIM</title>
    <link>http://koch.ro/blog/index.php?/archives/91-Lightning-Talk-at-Google-about-VIM.html</link>
            <category>PHP</category>
            <category>VIM</category>
    
    <comments>http://koch.ro/blog/index.php?/archives/91-Lightning-Talk-at-Google-about-VIM.html#comments</comments>
    <wfw:comment>http://koch.ro/blog/wfwcomment.php?cid=91</wfw:comment>

    <wfw:commentRss>http://koch.ro/blog/rss.php?version=2.0&amp;type=comments&amp;cid=91</wfw:commentRss>
    

    <author>nospam@example.com (Thomas Koch)</author>
    <content:encoded>
    I&#039;m sitting at Google&#039;s office in Zürich, participating at their Open-Source-Jam. I had the pleasure to meet Bram Moolenaar, the creator of VIM and to give a short lightning talk about &lt;a href=&quot;http://www.koch.ro/blog/index.php?/archives/89-Presentation-Draft-VIM-as-your-PHP-IDE.html&quot;&gt;VIM as your (PHP) IDE&lt;/a&gt;. For those looking for the scripts, I can direct you for now to the &lt;a href=&quot;http://git.koch.ro/?p=vim-debugger-dbgp;a=summary&quot;&gt;GIT repository of the VIM-debugger&lt;/a&gt; (that works with xdebug) and the &lt;a href=&quot;http://mentors.debian.net/cgi-bin/sponsor-pkglist?action=details;package=vim-debugger-dbgp&quot;&gt;debian mentors site for the packaged script&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The rest of my scripts will be packaged soon. You can quicken my effort by writing a comment to this blogpost and saying that you&#039;re waiting. &lt;img src=&quot;http://koch.ro/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;  
    </content:encoded>

    <pubDate>Thu, 02 Oct 2008 20:32:48 +0200</pubDate>
    <guid isPermaLink="false">http://koch.ro/blog/index.php?/archives/91-guid.html</guid>
    
</item>
<item>
    <title>Presentation Draft: VIM as your PHP IDE</title>
    <link>http://koch.ro/blog/index.php?/archives/89-Presentation-Draft-VIM-as-your-PHP-IDE.html</link>
            <category>eZ Publish</category>
            <category>PHP</category>
            <category>VIM</category>
    
    <comments>http://koch.ro/blog/index.php?/archives/89-Presentation-Draft-VIM-as-your-PHP-IDE.html#comments</comments>
    <wfw:comment>http://koch.ro/blog/wfwcomment.php?cid=89</wfw:comment>

    <wfw:commentRss>http://koch.ro/blog/rss.php?version=2.0&amp;type=comments&amp;cid=89</wfw:commentRss>
    

    <author>nospam@example.com (Thomas Koch)</author>
    <content:encoded>
    Hans Melis &lt;a href=&quot;http://blog.hansmelis.be/2008/09/01/the-quest-for-a-php-editor/&quot;&gt;asks for a good PHP IDE&lt;/a&gt; and Tobias Schlitt &lt;a href=&quot;http://phpug.papaya-server.com/pipermail/koeln-bonn/2008-September/001647.html&quot;&gt;will present PHP development with VIM&lt;/a&gt; at the &lt;a href=&quot;http://www.phpug.de/koelnbonn.11.html&quot;&gt;Köln-Bonn PHP User-Group&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Since I also plan to make a presentation about VIM, I thought I could publish the &lt;a href=&quot;http://www.koch.ro/blog/uploads/free_software/vim/vim_intro.pdf&quot;&gt;draft of my presentation&lt;/a&gt; so far and kindly ask you to share your ideas about other cool things that VIM does for you.&lt;br /&gt;
&lt;br /&gt;
  
    </content:encoded>

    <pubDate>Tue, 02 Sep 2008 08:01:33 +0200</pubDate>
    <guid isPermaLink="false">http://koch.ro/blog/index.php?/archives/89-guid.html</guid>
    
</item>
<item>
    <title>Checking eZComponents Template syntax inside VIM</title>
    <link>http://koch.ro/blog/index.php?/archives/78-Checking-eZComponents-Template-syntax-inside-VIM.html</link>
            <category>PHP</category>
            <category>VIM</category>
    
    <comments>http://koch.ro/blog/index.php?/archives/78-Checking-eZComponents-Template-syntax-inside-VIM.html#comments</comments>
    <wfw:comment>http://koch.ro/blog/wfwcomment.php?cid=78</wfw:comment>

    <wfw:commentRss>http://koch.ro/blog/rss.php?version=2.0&amp;type=comments&amp;cid=78</wfw:commentRss>
    

    <author>nospam@example.com (Thomas Koch)</author>
    <content:encoded>
    Today, while watching the german footbal team win, was a good time, to hack a syntax checker for &lt;a href=&quot;http://www.ezcomponents.org/docs/tutorials/Template&quot;&gt;eZComponents Templates&lt;/a&gt; inside &lt;a href=&quot;http://www.vim.org&quot;&gt;VIM&lt;/a&gt;. The result is, that I can type &quot;:Eztlint&quot; inside VIM and get a nice error window showing me the position of the first error.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- s9ymdb:37 --&gt;&lt;img width=&#039;772&#039; height=&#039;420&#039; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/eztlint.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
 The implementation was extremly easy due to the very clean design of the eZComponents Template engine: The template engine compiles the template source in a tst tree (template syntax tree?) which afterwards is compiled in an abstract syntax tree, which should be more familiar to programmers.&lt;br /&gt;
&lt;br /&gt;
The following code loads the template source file and tries to parse the tst of it:&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;#!/usr/bin/env&amp;#160;php
&amp;#60;?php

require_once&amp;#160;&#039;ezc/Base/ezc_bootstrap.php&#039;;

$source&amp;#160;=&amp;#160;new&amp;#160;ezcTemplateSourceCode&amp;#40;&amp;#160;$argv&amp;#91;1&amp;#93;&amp;#160;&amp;#41;;
$source-&amp;#62;load&amp;#40;&amp;#41;;
$parser&amp;#160;=&amp;#160;new&amp;#160;ezcTemplateParser&amp;#40;&amp;#160;$source,&amp;#160;new&amp;#160;ezcTemplate&amp;#40;&amp;#41;&amp;#160;&amp;#41;;
try{
&amp;#160;&amp;#160;&amp;#160;&amp;#160;$tstTree&amp;#160;=&amp;#160;$parser-&amp;#62;parseIntoNodeTree&amp;#40;&amp;#41;;
}catch&amp;#40;&amp;#160;Exception&amp;#160;$e&amp;#160;&amp;#41;
{
&amp;#160;&amp;#160;&amp;#160;&amp;#160;echo&amp;#160;&#039;&quot;&#039;,$e-&amp;#62;source-&amp;#62;stream,&#039;&quot;&#039;,
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;$e-&amp;#62;errorCursor-&amp;#62;line,&#039;&amp;#160;&#039;,
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;$e-&amp;#62;errorCursor-&amp;#62;column&amp;#160;+&amp;#160;1,&#039;&amp;#58;&amp;#160;&#039;,
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;$e-&amp;#62;errorMessage;
}&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This code is called from the following vim snippet:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;function!&amp;#160;RunEztlint&amp;#40;&amp;#41;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;let&amp;#160;l&amp;#58;output=system&amp;#40;&#039;~/.vim/plugin/eztlint.php&amp;#160;&#039;.bufname&amp;#40;&quot;%&quot;&amp;#41;&amp;#41;

&amp;#160;&amp;#160;&amp;#160;&amp;#160;cexpr&amp;#160;l&amp;#58;output
&amp;#160;&amp;#160;&amp;#160;&amp;#160;cwindow
endfunction

set&amp;#160;errorformat+=&quot;%f&quot;%l\&amp;#160;%c&amp;#58;\&amp;#160;%m
command!&amp;#160;Eztlint&amp;#160;execute&amp;#160;RunEztlint&amp;#40;&amp;#41;&lt;/div&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 25 Jun 2008 23:22:12 +0200</pubDate>
    <guid isPermaLink="false">http://koch.ro/blog/index.php?/archives/78-guid.html</guid>
    
</item>
<item>
    <title>Firefox, VIM, Xdebug: Jumping to the error line.</title>
    <link>http://koch.ro/blog/index.php?/archives/77-Firefox,-VIM,-Xdebug-Jumping-to-the-error-line..html</link>
            <category>PHP</category>
            <category>VIM</category>
    
    <comments>http://koch.ro/blog/index.php?/archives/77-Firefox,-VIM,-Xdebug-Jumping-to-the-error-line..html#comments</comments>
    <wfw:comment>http://koch.ro/blog/wfwcomment.php?cid=77</wfw:comment>

    <wfw:commentRss>http://koch.ro/blog/rss.php?version=2.0&amp;type=comments&amp;cid=77</wfw:commentRss>
    

    <author>nospam@example.com (Thomas Koch)</author>
    <content:encoded>
    The yet unreleased 2.1 version of &lt;a href=&quot;http://xdebug.org/&quot;&gt;XDebug&lt;/a&gt; has a nice new feature. The setting&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://xdebug.org/docs/all_settings#file_link_format&quot;&gt;xdebug.file_link_format&lt;/a&gt; allows you, to provide a printf like format for a link under the filename of an error message:&lt;br /&gt;
&lt;br /&gt;
&lt;!-- s9ymdb:36 --&gt;&lt;img style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/ff_xdebug_vim.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
So here comes a quick walkthrough on how to open the file from the error message in (G)VIM: First we need to tell the browser, in my case firefox, that the link is no web link, but should be threaten special.  We do this with the introduction of the new protocol &quot;vim://&quot;.&lt;br /&gt;
&lt;br /&gt;
Put this setting in your PHP configuration:&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;xdebug.file_link_format=vim&amp;#58;//%f@%l&lt;/div&gt;&lt;br /&gt;
Now instruct firefox which program handles the protocol. Therefor you need to open the &lt;a href=&quot;about:config&quot;&gt;about:config&lt;/a&gt; page and add two settings:&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;network.protocol-handler.external.vim&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;boolean&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;true
network.protocol-handler.app.vim&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;string&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;~/bin/ff_xdebug_gvim&lt;/div&gt;&lt;br /&gt;
The ff_xdebug_gvim file is a script that parses the link and calls gvim with the appropriate parameters:&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;#!/usr/bin/env&amp;#160;php5
&amp;#60;?php
//&amp;#160;cut&amp;#160;the&amp;#160;vim&amp;#58;//&amp;#160;prefix&amp;#160;from&amp;#160;the&amp;#160;input.
$input&amp;#160;=&amp;#160;substr&amp;#40;&amp;#160;$argv&amp;#91;1&amp;#93;,&amp;#160;6&amp;#160;&amp;#41;;

//&amp;#160;split&amp;#160;the&amp;#160;filename&amp;#160;from&amp;#160;the&amp;#160;line&amp;#160;number,&amp;#160;separted&amp;#160;by&amp;#160;&#039;@&#039;
//&amp;#160;filenames&amp;#160;could&amp;#160;come&amp;#160;in&amp;#160;urlencoded
$delimiterpos&amp;#160;=&amp;#160;strrpos&amp;#40;&amp;#160;$input,&amp;#160;&#039;@&#039;&amp;#160;&amp;#41;;
$file&amp;#160;=&amp;#160;urldecode&amp;#40;&amp;#160;&amp;#160;substr&amp;#40;&amp;#160;$input,&amp;#160;0,&amp;#160;$delimiterpos&amp;#160;&amp;#41;&amp;#160;&amp;#41;;
$line&amp;#160;=&amp;#160;&amp;#40;&amp;#160;string&amp;#160;&amp;#41;&amp;#40;&amp;#160;int&amp;#160;&amp;#41;substr&amp;#40;&amp;#160;$input,&amp;#160;$delimiterpos&amp;#160;-&amp;#160;strlen&amp;#40;&amp;#160;$input&amp;#160;&amp;#41;&amp;#160;+&amp;#160;1&amp;#160;&amp;#41;;

//&amp;#160;--remote-silent&amp;#160;opens&amp;#160;an&amp;#160;already&amp;#160;running&amp;#160;gvim&amp;#160;session&amp;#160;or&amp;#160;creates&amp;#160;a&amp;#160;new&amp;#160;one.&amp;#160;Replace&amp;#160;gvim&amp;#160;with
//&amp;#160;vim&amp;#160;if&amp;#160;you&amp;#160;like!
system&amp;#40;&amp;#160;&#039;gvim&amp;#160;--remote-silent&amp;#160;+&#039;.escapeshellarg&amp;#40;&amp;#160;$line&amp;#160;&amp;#41;.&#039;&amp;#160;&#039;.escapeshellarg&amp;#40;&amp;#160;$file&amp;#160;&amp;#41;&amp;#160;&amp;#41;;&lt;/div&gt;&lt;br /&gt;
That&#039;s it. Thanks for your patience.&lt;br /&gt;
&lt;br /&gt;
And as usually: Restart your webserver and chmod +x the script.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sat, 07 Jun 2008 17:14:01 +0200</pubDate>
    <guid isPermaLink="false">http://koch.ro/blog/index.php?/archives/77-guid.html</guid>
    
</item>
<item>
    <title>VIM an a PHP IDE</title>
    <link>http://koch.ro/blog/index.php?/archives/63-VIM-an-a-PHP-IDE.html</link>
            <category>english</category>
            <category>PHP</category>
            <category>VIM</category>
    
    <comments>http://koch.ro/blog/index.php?/archives/63-VIM-an-a-PHP-IDE.html#comments</comments>
    <wfw:comment>http://koch.ro/blog/wfwcomment.php?cid=63</wfw:comment>

    <wfw:commentRss>http://koch.ro/blog/rss.php?version=2.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    

    <author>nospam@example.com (Thomas Koch)</author>
    <content:encoded>
    Today I read an article from Matthew Weier O&#039;Phinney on Planet-PHP about &lt;a href=&quot;http://weierophinney.net/matthew/archives/164-Vim-Productivity-Tips-for-PHP-Developers.html#extended&quot;&gt;Programming PHP with VIM&lt;/a&gt;. Since he want&#039;s to continue his series and I wrote a similiar text these days, I thought to post the text I wrote so far.&lt;br /&gt;
&lt;br /&gt;
Maybe we can continue together to write a nice teaser to for PHP with VIM. It would be fine, to have one place (vim.org, php.net/docs ?) to collect all those nice helper scripts and plugins. The main benefit could be, that all the scripts can be installed together without overlapping key mappings.&lt;br /&gt;
&lt;br /&gt;
So much for now, since I&#039;m with my family to celebrate easter. Happy Easter to everybody celebrating it today!&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;vim-as-an-ide-for-php&quot;&gt;
&lt;h1 &gt;VIM as an IDE for PHP&lt;/h1&gt;
&lt;div &gt;
&lt;p &gt;&lt;a id=&quot;contents&quot; name=&quot;contents&quot;&gt;Contents&lt;/a&gt;&lt;/p&gt;
&lt;ul &gt;
&lt;li&gt;&lt;a  href=&quot;#templates&quot; id=&quot;id1&quot; name=&quot;id1&quot;&gt;Templates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a  href=&quot;#codesniffer-integration&quot; id=&quot;id2&quot; name=&quot;id2&quot;&gt;Codesniffer integration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a  href=&quot;#including-manuals&quot; id=&quot;id3&quot; name=&quot;id3&quot;&gt;Including Manuals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a  href=&quot;#autocompletition&quot; id=&quot;id4&quot; name=&quot;id4&quot;&gt;Autocompletition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a  href=&quot;#pdv-phpdocumentor-for-vim&quot; id=&quot;id5&quot; name=&quot;id5&quot;&gt;PDV (phpDocumentor for Vim)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a  href=&quot;#tag-browsing-with-cscope-identifier-lookup&quot; id=&quot;id6&quot; name=&quot;id6&quot;&gt;Tag Browsing with cscope (Identifier lookup)&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a  href=&quot;#build-the-taglist&quot; id=&quot;id7&quot; name=&quot;id7&quot;&gt;Build the taglist&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a  href=&quot;#taglist-window&quot; id=&quot;id8&quot; name=&quot;id8&quot;&gt;Taglist Window&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a  href=&quot;#note&quot; id=&quot;id9&quot; name=&quot;id9&quot;&gt;Note&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a  href=&quot;#debug-with-xdebug&quot; id=&quot;id10&quot; name=&quot;id10&quot;&gt;Debug with xdebug&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id1&quot; id=&quot;templates&quot; name=&quot;templates&quot;&gt;Templates&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;TODO&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id2&quot; id=&quot;codesniffer-integration&quot; name=&quot;codesniffer-integration&quot;&gt;Codesniffer integration&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a  href=&quot;http://pear.php.net/package/PHP_CodeSniffer&quot;&gt;Codesniffer&lt;/a&gt; is a tool to check PHP code against a Coding standard. By integrating it into
vim you can get the list of violations in a separate error window. The errow window allows
jumping to each error in the source code, even if the line numbers have changed.&lt;/p&gt;
&lt;p&gt;See &lt;em&gt;help quickfix&lt;/em&gt; in the vim help.&lt;/p&gt;
&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://koch.ro/blog/uploads/free_software/vim/phpcs.png&#039;&gt;&lt;img alt=&quot;phpcs.png&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/phpcs.png&quot; style=&quot;width: 840.0px; height: 498.0px;&quot; /&gt;&lt;/a&gt;
&lt;p&gt;Put the following code in $VIMHOME/plugin/phpcs.vim:&lt;/p&gt;
&lt;pre &gt;
function! RunPhpcs()
    let l:filename=&amp;#64;%
    let l:phpcs_output=system(&#039;phpcs --report=csv --standard=YMC &#039;.l:filename)
&amp;quot;    echo l:phpcs_output
    let l:phpcs_list=split(l:phpcs_output, &amp;quot;\n&amp;quot;)
    unlet l:phpcs_list[0]
    cexpr l:phpcs_list
    cwindow
endfunction

set errorformat+=\&amp;quot;%f\&amp;quot;\\,%l\\,%c\\,%t%*[a-zA-Z]\\,\&amp;quot;%m\&amp;quot;
command! Phpcs execute RunPhpcs()
&lt;/pre&gt;
&lt;p&gt;Now you can run a Codesniff for the current file via&lt;/p&gt;
&lt;p&gt;:Phpcs&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id3&quot; id=&quot;including-manuals&quot; name=&quot;including-manuals&quot;&gt;Including Manuals&lt;/a&gt;&lt;/h1&gt;
&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://koch.ro/blog/uploads/free_software/vim/manpageview.png&#039;&gt;&lt;img alt=&quot;manpageview.png&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/manpageview.png&quot; style=&quot;width: 840.0px; height: 525.0px;&quot; /&gt;&lt;/a&gt;
&lt;p&gt;Install the &lt;a  href=&quot;http://www.vim.org/scripts/script.php?script_id=489&quot;&gt;ManPageView&lt;/a&gt; script from Charles Campbell. It gives you access to
the PHP manual, Perl manual and to man and info pages. The script could also be
extended and I&#039;d love to use it for Javascript and HTML, too. Make sure to take
the most recent version, eventually from Campbell&#039;s &lt;a  href=&quot;http://mysite.verizon.net/astronaut/vim/index.html#MANPAGEVIEW&quot;&gt;homepage&lt;/a&gt;, since it may
include bugfixes not yet uploaded to vimscripts.org.&lt;/p&gt;
&lt;p&gt;You also need to install the links text browser, which is used to grap the
online PHP manual:&lt;/p&gt;
&lt;p&gt;apt-get install links&lt;/p&gt;
&lt;p&gt;I took links, but elinks or links2 may work too.&lt;/p&gt;
&lt;p&gt;After installation you simply press C-K on top of a keyword and the
corresponding manual page will be opened in a separate window.&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id4&quot; id=&quot;autocompletition&quot; name=&quot;autocompletition&quot;&gt;Autocompletition&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Vim helps you to complete identifiers:&lt;/p&gt;
&lt;img alt=&quot;autocomplete.png&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/autocomplete.png&quot; /&gt;
&lt;p&gt;The first proposed item beginning with &lt;em&gt;auto&lt;/em&gt; is an PHP function. Vim can
autocomplete with different language dictionaries depending on the filetype.
Thus it won&#039;t propose you any PYTHON function while you&#039;re editing a PHP file.&lt;/p&gt;
&lt;p&gt;The second item is a word from another file I&#039;m editing in the same Vim
session. Thus you can easily complete Variablenames or Functionnames from
other opened files.&lt;/p&gt;
&lt;p&gt;Vim tells you also where it got the term from. Since the last item is from the
same file, there&#039;s no filename written after the word.&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id5&quot; id=&quot;pdv-phpdocumentor-for-vim&quot; name=&quot;pdv-phpdocumentor-for-vim&quot;&gt;PDV (phpDocumentor for Vim)&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;You do document your code with proper inline comments, do you? To make this
task easier, Tobias Schlitt wrote a VIM plugin which automatically lookup some
characteristics of the item you want to document and creates a Docblock
sceleton for you:&lt;/p&gt;
&lt;img alt=&quot;pdv.png&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/pdv.png&quot; style=&quot;width: 840.0px; height: 525.0px;&quot; /&gt;
&lt;p&gt;&amp;#64;todo&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id6&quot; id=&quot;tag-browsing-with-cscope-identifier-lookup&quot; name=&quot;tag-browsing-with-cscope-identifier-lookup&quot;&gt;Tag Browsing with cscope (Identifier lookup)&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Just like in a big IDE like eclipse, you can easily jump to the definitions of functions
and classes. Vim integrates cscope for the job (&lt;em&gt;apt-get install cscope&lt;/em&gt;).&lt;/p&gt;
&lt;img alt=&quot;cscope.png&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/cscope.png&quot; style=&quot;width: 840.0px; height: 525.0px;&quot; /&gt;
&lt;div &gt;
&lt;h2&gt;&lt;a  href=&quot;#id7&quot; id=&quot;build-the-taglist&quot; name=&quot;build-the-taglist&quot;&gt;Build the taglist&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Vim needs an index file for all identifiers. This file is build with
cscope. First we create the file cscope.files which tells cscope which file to
scan. In our case this are all files called &lt;tt &gt;&lt;span class=&quot;pre&quot;&gt;*.php&lt;/span&gt;&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The -b option tells cscope to use the list from cscope.files:&lt;/p&gt;
&lt;pre &gt;
cd project_dir
find . -name &#039;*.php&#039; &amp;gt; ./cscope.files
cscope -b
rm ./cscope.files
&lt;/pre&gt;
&lt;p&gt;The shell commands from above left a file cscope.out in project_dir.
Now we tell vim to use the generated tagfile:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;cscope add project_dir/cscope.out project_dir&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Note that you have to add the project_dir as the second argument to &lt;em&gt;cscope add&lt;/em&gt;!&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id8&quot; id=&quot;taglist-window&quot; name=&quot;taglist-window&quot;&gt;Taglist Window&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Every IDE gives you an overview of all functions in a class, right?&lt;/p&gt;
&lt;img alt=&quot;taglist.png&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/taglist.png&quot; style=&quot;width: 840.0px; height: 525.0px;&quot; /&gt;
&lt;p&gt;Install exuberant-ctags ( &amp;gt;= Version 5.7 ) and the taglist vim plugin. On debian you go
with:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;apt-get install exuberant-ctags&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;vim-addons install taglist&lt;/em&gt;&lt;/p&gt;
&lt;div &gt;
&lt;h2&gt;&lt;a  href=&quot;#id9&quot; id=&quot;note&quot; name=&quot;note&quot;&gt;Note&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The 5.7 version of exuberant-ctags still has &lt;a  href=&quot;http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1795926&amp;amp;group_id=6556&amp;amp;atid=106556&quot;&gt;problems&lt;/a&gt; to parse PHP properly. It can not
distinguis between the word &amp;quot;function&amp;quot; in a comment and a real function decleration.
Therefore I still use a patched version of exuberant-ctags version 5.6.&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div &gt;
&lt;h1&gt;&lt;a  href=&quot;#id10&quot; id=&quot;debug-with-xdebug&quot; name=&quot;debug-with-xdebug&quot;&gt;Debug with xdebug&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;What&#039;s an IDE without a Debugger?&lt;/p&gt;
&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://koch.ro/blog/uploads/free_software/vim/xdebug.png&#039;&gt;&lt;img alt=&quot;xdebug.png&quot; src=&quot;http://koch.ro/blog/uploads/free_software/vim/xdebug.png&quot; style=&quot;width: 840.0px; height: 498.0px;&quot; /&gt;&lt;/a&gt;
&lt;p&gt;You can find the most up to date link to the vim-xdebug plugin at the &lt;a  href=&quot;http://www.xdebug.org/docs/remote&quot;&gt;remote section&lt;/a&gt;
of  xdebug.org.&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
  
    </content:encoded>

    <pubDate>Sun, 23 Mar 2008 09:58:49 +0100</pubDate>
    <guid isPermaLink="false">http://koch.ro/blog/index.php?/archives/63-guid.html</guid>
    
</item>
<item>
    <title>Integrate PHP CodeSniffer in VIM</title>
    <link>http://koch.ro/blog/index.php?/archives/62-Integrate-PHP-CodeSniffer-in-VIM.html</link>
            <category>PHP</category>
            <category>VIM</category>
    
    <comments>http://koch.ro/blog/index.php?/archives/62-Integrate-PHP-CodeSniffer-in-VIM.html#comments</comments>
    <wfw:comment>http://koch.ro/blog/wfwcomment.php?cid=62</wfw:comment>

    <wfw:commentRss>http://koch.ro/blog/rss.php?version=2.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    

    <author>nospam@example.com (Thomas Koch)</author>
    <content:encoded>
    You can integrate &lt;a href=&quot;http://pear.php.net/package/PHP_CodeSniffer&quot;&gt;PHP Codesniffer&lt;/a&gt; in your VIM with the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;function!&amp;#160;RunPhpcs&amp;#40;&amp;#41;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;let&amp;#160;l&amp;#58;filename=@%
&amp;#160;&amp;#160;&amp;#160;&amp;#160;let&amp;#160;l&amp;#58;phpcs_output=system&amp;#40;&#039;phpcs&amp;#160;--report=csv&amp;#160;--standard=YMC&amp;#160;&#039;.l&amp;#58;filename&amp;#41;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;let&amp;#160;l&amp;#58;phpcs_list=split&amp;#40;l&amp;#58;phpcs_output,&amp;#160;&quot;\n&quot;&amp;#41;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;unlet&amp;#160;l&amp;#58;phpcs_list&amp;#91;0&amp;#93;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;cexpr&amp;#160;l&amp;#58;phpcs_list
&amp;#160;&amp;#160;&amp;#160;&amp;#160;cwindow
endfunction

set&amp;#160;errorformat+=&quot;%f&quot;\\,%l\\,%c\\,%t%&amp;#42;&amp;#91;a-zA-Z&amp;#93;\\,&quot;%m&quot;
command!&amp;#160;Phpcs&amp;#160;execute&amp;#160;RunPhpcs&amp;#40;&amp;#41;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Put the code in $HOME/.vim/plugin/phpcs.php&lt;br /&gt;
&lt;br /&gt;
You should change the standard option to your needs.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using for example the php-vim configuration from &lt;a href=&quot;http://schlitt.info/applications/blog/index.php?/archives/543-Comfortable-PHP-editing-with-VIM-6.html&quot;&gt;Tobias Schlitt&lt;/a&gt;, you should change one line in your $HOME/.vim/ftplugin/php.vim:&lt;br /&gt;
&lt;br /&gt;
from&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;set&amp;#160;errorformat=%m\&amp;#160;in\&amp;#160;%f\&amp;#160;on\&amp;#160;line\&amp;#160;%l&lt;/div&gt;&lt;br /&gt;
to&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;set&amp;#160;errorformat+=%m\&amp;#160;in\&amp;#160;%f\&amp;#160;on\&amp;#160;line\&amp;#160;%l&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This is the first VIM function I wrote and I&#039;d be happy about any advise how to make it better. As soon as I&#039;ve added comments and propper configuration variables to the function, I&#039;ll add it to vim.org&lt;br /&gt;
&lt;br /&gt;
UPDATE:&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 440px&quot;&gt;
    &lt;div class=&quot;serendipity_imageComment_img&quot;&gt;
        &lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://koch.ro/blog/uploads/misc/vim_phpcs.png&#039;&gt;
          &lt;!-- s9ymdb:23 --&gt;
             &lt;img width=&#039;440&#039; height=&#039;260&#039;  src=&quot;http://koch.ro/blog/uploads/misc/vim_phpcs.serendipityThumb.png&quot; alt=&quot;&quot; /&gt;
        &lt;/a&gt;
       &lt;/div&gt;&lt;br /&gt;
   &lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;
You get a quickfix window from which you can jump to the locations of the errors.
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;  
    </content:encoded>

    <pubDate>Tue, 11 Mar 2008 16:16:54 +0100</pubDate>
    <guid isPermaLink="false">http://koch.ro/blog/index.php?/archives/62-guid.html</guid>
    
</item>

</channel>
</rss>