<?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>/home/shakir &#187; vim</title>
	<atom:link href="http://www.mohdshakir.net/tag/vim/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mohdshakir.net</link>
	<description></description>
	<lastBuildDate>Mon, 04 Jul 2011 14:50:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Enable vim code (Python) auto complete</title>
		<link>http://www.mohdshakir.net/2007/12/27/enable-vim-code-python-auto-complete</link>
		<comments>http://www.mohdshakir.net/2007/12/27/enable-vim-code-python-auto-complete#comments</comments>
		<pubDate>Thu, 27 Dec 2007 00:41:03 +0000</pubDate>
		<dc:creator>Mohd Shakir</dc:creator>
				<category><![CDATA[computing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.mohdshakir.net/2007/12/27/enable-vim-code-python-auto-complete</guid>
		<description><![CDATA[<p>Posted in <a href="http://www.mohdshakir.net/category/computing" title="computing">computing</a></p>Beginning version 7 of vim, it has this nice auto completion feature. It is by default however limited to words that has already been in the current workspace. To use it, simply press [ctrl] +n or [ctrl] + p key while in edit mode. For example: We can however *teach* vim to autocomplete a whole [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://www.mohdshakir.net/category/computing" title="computing">computing</a></p><p>Beginning version 7 of vim, it has this nice auto completion feature. It is by default however limited to words that has already been in the current workspace. To use it, simply press <em>[ctrl] +n </em>or <em>[ctrl] + p</em> key while in edit mode. For example:</p>
<div align="center"><img alt="" height="259" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/vim-auto-complete.png" width="384" /></div>
<p>We can however *teach* vim to autocomplete a whole bunch of other stuffs as well, by using something so called Dictionaries. With this idea we can have auto completion for Python, Ruby, PHP, Bash, and any other programming languages code.</p>
<p>For an example, let&#39;s try to install Python dictionary, by downloading it from here:</p>
<pre>http://www.vim.org/scripts/script.php?script_id=850
</pre>
<p>The next thing to do is to extract the downloaded file to the appropriate folder:</p>
<pre>shakir@herugrim ~ $ mkdir ~/.vim

shakir@herugrim ~ $ tar xvzf pydiction-0.5.tar.gz -C ~/.vim
</pre>
<p>and add this lines to your ~/.vimrc (be sure to replace &quot;/home/shakir&quot; to your own home directory)</p>
<pre>if has(&quot;autocmd&quot;)
    autocmd FileType python set complete+=k/home/shakir/.vim/pydiction-0.5/pydiction isk+=.,(
endif &quot; has(&quot;autocmd&quot;
</pre>
<p>and let&#39;s see the result:</p>
<p align="center"><img alt="" height="257" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/vim-auto-complete-python.png" width="388" /></p>
<p>Browse around the Vim script page and your customized Vim could be just as good if not better than some IDEs.. <img src='http://www.mohdshakir.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I have imported this post to my other site and maintain it <a href="http://www.techrecipes.net/application/vim/enable-python-auto-complete">there</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2007/12/27/enable-vim-code-python-auto-complete/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

