<?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>My Piece Of The Web</description>
	<lastBuildDate>Fri, 16 Jul 2010 15:45:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</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>shakir</dc:creator>
				<category><![CDATA[Information Insemination]]></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[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>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 width="384" height="259" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/vim-auto-complete.png" alt="" /></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&#8217;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("autocmd")
    autocmd FileType python set complete+=k/home/shakir/.vim/pydiction-0.5/pydiction isk+=.,(
endif " has("autocmd"
</pre>
<p>and let&#8217;s see the result:</p>
<p align="center"><img width="388" height="257" src="http://www.mohdshakir.net/wp-content/uploads/image/200712/vim-auto-complete-python.png" alt="" /></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>
]]></content:encoded>
			<wfw:commentRss>http://www.mohdshakir.net/2007/12/27/enable-vim-code-python-auto-complete/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
