<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>vi-vim &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/vi-vim/</link>
	<description>Feed of posts on WordPress.com tagged "vi-vim"</description>
	<pubDate>Fri, 17 Jul 2009 20:35:05 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Vim 7.0 Tabs]]></title>
<link>http://ruturajv.wordpress.com/2006/12/23/vim-7-tabs/</link>
<pubDate>Sat, 23 Dec 2006 05:43:47 +0000</pubDate>
<dc:creator>ruturajv</dc:creator>
<guid>http://ruturajv.wordpress.com/2006/12/23/vim-7-tabs/</guid>
<description><![CDATA[Vim 7.0 also adds another marvelous feature to this star-studded editor, Tab Browsing
To open a tab,]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Vim 7.0 also adds another marvelous feature to this star-studded editor, <strong>Tab Browsing</strong></p>
<p>To open a tab, just use the following command</p>
<blockquote><p><code>tabe filename</code></p></blockquote>
<p>This shall open a new tab.</p>
<p><a href="http://ruturajv.wordpress.com/files/2006/12/vim-7-tabs.jpg" title="Vim 7 Tab browsing"><img src="http://ruturajv.wordpress.com/files/2006/12/vim-7-tabs.thumbnail.jpg" alt="Vim 7 Tab browsing" /></a></p>
<p>To move between tabs you can use <code>tabNext</code>  and <code>tabPrevious</code>. <code>Ctrl+PgUp</code> and <code>Ctrl+PgDown</code> work as well in the X version as well as on <code>gnome-terminal</code>.</p>
<p><code>tabclose</code> shall do the needful as the command states.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vim 7 Autocomplete]]></title>
<link>http://ruturajv.wordpress.com/2006/12/21/vim-7-autocomplete/</link>
<pubDate>Thu, 21 Dec 2006 07:12:57 +0000</pubDate>
<dc:creator>ruturajv</dc:creator>
<guid>http://ruturajv.wordpress.com/2006/12/21/vim-7-autocomplete/</guid>
<description><![CDATA[Vim 7.0 was lauched sometime back, but I wasn&#8217;t able to check it, But its awesome. The Autocom]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Vim 7.0 was lauched sometime back, but I wasn&#8217;t able to check it, But its awesome. The <strong>Autocomplete</strong> or <em>intellisense</em> built is just too good. It supports various filetypes, it will complete the function as well as show a preview of what arguments are expected out of it.</p>
<p>First check if you have Vim 7 installed and in the VIM directory if you have a folder called autoload. If you have check if it contains *complete.vim files. If everything is Good&#8230; lets move&#8230;</p>
<p>Lets add PHP autocomplete feature. In your <code>$HOME/.vimrc</code> file add the following command</p>
<blockquote><p> <code>autocmd FileType php set omnifunc=phpcomplete#CompletePHP</code></p></blockquote>
<p align="left">Once done, Open any PHP file and within the <code>&#60;?php</code>  tag, write <code>mysql_c</code> and press <code>Ctrl-x Ctrl-o</code> , and here is what happens</p>
<p align="left"> <a href="http://ruturajv.wordpress.com/files/2006/12/vim-7-php-autocomplete.png" title="Vim 7 PHP autocomplete"><img src="http://ruturajv.wordpress.com/files/2006/12/vim-7-php-autocomplete.thumbnail.png" alt="Vim 7 PHP autocomplete" /></a></p>
<p align="left">You can see a Full list of functions begining with <code>mysql_c</code></p>
<p align="left"><!--more-->The .vimrc command that we added supports <em>intellisense</em> like autocomplete only for PHP filetypes, note FileType php in the statement. If you want to add support for the other languages as well</p>
<ul>
<li>Open the <strong>autoload/&#60;filetype&#62;complete.vim</strong> file</li>
<li>Check for intial lines like &#8230;<br />
<code>function! htmlcomplete#CompleteTags(findstart, base)<br />
if a:findstart</code></li>
<li>Now, I had opened <strong>htmlcomplete.vim</strong> file, Now to add support for html files&#8230;
<ul>
<li>Add the following command<br />
<code>autocmd FileType html set omnifunc=htmlcomplete#CompleteTags</code></li>
</ul>
</li>
</ul>
<p>Thats it ! add more support the way you want&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vim: File Browsing]]></title>
<link>http://ruturajv.wordpress.com/2006/08/23/vim-file-browsing/</link>
<pubDate>Wed, 23 Aug 2006 17:09:16 +0000</pubDate>
<dc:creator>ruturajv</dc:creator>
<guid>http://ruturajv.wordpress.com/2006/08/23/vim-file-browsing/</guid>
<description><![CDATA[Not all must have used this feature of Vim, You can use Vim&#8217;s file browsing feature, to select]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Not all must have used this feature of Vim, You can use Vim&#8217;s file browsing feature, to select and open a file all you need to do is know a &#8220;vsp&#8221; command.</p>
<p>To the &#8220;vsp&#8221; or the Vertical Split command give argument as &#8220;.&#8221;, a period. Which will prompt Vim to open left bar that will list all directories and files, directories first, just like any  directory listing command of your OS.</p>
<p><a href="http://ruturajv.wordpress.com/files/2006/08/vim-file-browsing.png" class="imagelink" title="Vim file browsing"><img src="http://ruturajv.wordpress.com/files/2006/08/vim-file-browsing.thumbnail.png" alt="Vim file browsing" /></a></p>
<p><!--more-->You can traverse the directories by pressing &#8220;Enter&#8221; to change to that directory, and you can go on browsing.</p>
<p>If you want to open a file, Press &#8220;o&#8221; when the cursor is under that file. That will open the file in the same window as the Browser window.</p>
<p>If you want to open the file in the previously visited window, press &#8220;O&#8221; (Captial alphabet O). This  will open the file in the previous window.</p>
<p><a href="http://ruturajv.wordpress.com/files/2006/08/vim-file-browsing-open.png" class="imagelink" title="vim-file-browsing-open.png"><img src="http://ruturajv.wordpress.com/files/2006/08/vim-file-browsing-open.thumbnail.png" alt="vim-file-browsing-open.png" /></a></p>
<p>Now you know how to use Vim as your favourite GUI Editor <img src='http://s.wordpress.com/wp-includes/images/smilies/face-smile.png' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vim: Auto Complete]]></title>
<link>http://ruturajv.wordpress.com/2006/05/04/vim-auto-complete/</link>
<pubDate>Thu, 04 May 2006 06:38:56 +0000</pubDate>
<dc:creator>ruturajv</dc:creator>
<guid>http://ruturajv.wordpress.com/2006/05/04/vim-auto-complete/</guid>
<description><![CDATA[Most of you programming freaks, like the Auto Complete idea of an IDE (using Ctrl+Space) to complete]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Most of you programming freaks, like the Auto Complete idea of an IDE (using <i>Ctrl+Space</i>) to complete the word. And all the GUI IDE lovers think Vi is just another &#8220;Notepad&#8221;.</p>
<p>Beware, VIM is noway behind the IDEs, It too supports your Auto-Complete.<br />
<i>Ctrl+P</i> (match previous tokens) or <i>Ctrl+N </i>(match tokens ahead/next) is an alternative to <i>Ctrl+Space</i></p>
<p><!--more--> Consider you have following file contents.</p>
<blockquote><p>RewriteCond %{REQUEST_URI} /somefilepath1/.*<br />
RewriteCond %{REQUEST_URI} /somefilepath2/.*</p></blockquote>
<p>Now if you want to add another RewriteCond, and you have reached till &#8220;Rewri&#8221;</p>
<p>All you have to do is press <i>Ctrl+P</i>, Vim will automatically add &#8220;teCond&#8221; to the string &#8220;Rewri&#8221;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vim: Find Visual Difference using diffsplit]]></title>
<link>http://ruturajv.wordpress.com/2006/02/25/vim-vertical-diffsplit/</link>
<pubDate>Sat, 25 Feb 2006 06:37:52 +0000</pubDate>
<dc:creator>ruturajv</dc:creator>
<guid>http://ruturajv.wordpress.com/2006/02/25/vim-vertical-diffsplit/</guid>
<description><![CDATA[Many a times you want to compare two different files&#8230; Unless you have a good utility&#8230; yo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Many a times you want to compare two different files&#8230; Unless you have a good utility&#8230; you cant. But for <a href="http://vim.org">Vim</a> as its a wonderful tool, get a good visual difference.</p>
<p><a href="http://ruturajv.wordpress.com/files/2006/02/vim-diff.png" class="imagelink" title="vim-diff.png"><img src="http://ruturajv.wordpress.com/files/2006/02/vim-diff.thumbnail.png" alt="vim-diff.png" /></a></p>
<p><!--more--></p>
<p>Let us consider you have two files js1.js and js2.js</p>
<p><b>js1.js</b></p>
<blockquote><p>javascript:<br />
var selection;<br />
var s;<br />
if (window.getSelection)<br />
{<br />
selection = window.getSelection();<br />
} else if (document.getSelection)<br />
{<br />
selection = document.getSelection();<br />
}<br />
if (selection.toString().length &#62; 0)<br />
{<br />
s = selection.toString();<br />
} else {<br />
s = prompt(&#34;Search&#34;, &#34;Martina Hingis&#34;);<br />
}<br />
if (s.length &#62; 0)<br />
{<br />
window.location = &#34;http://en.wikipedia.org/wiki/&#34;+s;<br />
}</p></blockquote>
<p><b>js2.js</b></p>
<blockquote><p>javascript:<br />
var selectionR;<br />
var s;<br />
if (window.getselectionR)<br />
{<br />
selectionR = window.getselectionR();<br />
}<br />
if (selectionR.toString().length &#62; 0)<br />
{<br />
s = selectionR.toString();<br />
} else {<br />
s = prompt(&#34;Search&#34;, &#34;Martina Hingis&#34;);<br />
}<br />
if (s.length &#62; 0)<br />
{<br />
window.location = &#34;http://en.wikipedia.org/wiki/&#34;+s;<br />
}</p></blockquote>
<p>Now we&#39;ve got to compare these two files..</p>
<ul>
<li>Open any file say js1.js in vi</li>
<li>Use the following command to split the difference<br />
<b>vert diffsplit js2.js</b></li>
<li>The command <b>vert</b> (or can be <b>vertical</b>) will tell that the <b>diff</b>erential <b>split</b> of js2.js with the current file i.e. js1.js is to be shown vertically.</li>
</ul>
<p>Lovely isn&#39;t it.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Tidy-ing your XML, HTML]]></title>
<link>http://ruturajv.wordpress.com/2006/01/21/tidy-xml-html/</link>
<pubDate>Sat, 21 Jan 2006 17:34:06 +0000</pubDate>
<dc:creator>ruturajv</dc:creator>
<guid>http://ruturajv.wordpress.com/2006/01/21/tidy-xml-html/</guid>
<description><![CDATA[If you ever wonder how would you get your messy XML and HTML well-formatted, Here is the whizard, Ti]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you ever wonder how would you get your messy XML and HTML well-formatted, Here is the whizard, <a href="http://tidy.sourceforge.net/" title="HTML Tidy">Tidy</a> tidy is a small but very effective tool written by Dave Raggett.</p>
<p>Tidy can clean, indent XML and HTML data very effectively.</p>
<blockquote><p>tidy -mi -xml file-name</p></blockquote>
<p><!--more-->Download the tool, and place the tool in your PATH, so that it can be directly used. Then you can use the tool very effectively.</p>
<p><img src="http://ruturajv.wordpress.com/files/2006/01/vim-tidy.png" alt="vim-tidy.png" /></p>
<p>If you see the screenshot of my <a href="http://www.vim.org/">vim</a> editor, you&#39;ll see we can use Vi&#39;s shell command and tidy to modify the file and indent it</p>
<p>The parameters that you see are</p>
<ul>
<li><b>m</b> modify the file</li>
<li><b>i</b> indent the file</li>
<li><b>xml</b> the input file is XML file</li>
</ul>
<p>You can exclude the xml parameter if you want to tidy a XHTML or HTML file.</p>
<p>This is not the only thing that Tidy can do, but it will find out errors and warnings in your HTML or XML page.</p>
<p>Thanks! Tidy</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
