<?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>Vladimir Cvetic &#187; Something Else</title>
	<atom:link href="http://www.hazaah.com/cat/something-else/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hazaah.com</link>
	<description>buffle the world</description>
	<lastBuildDate>Thu, 12 Nov 2009 14:30:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Movies to watch during new year vacation</title>
		<link>http://www.hazaah.com/something-else/movies-to-watch-during-new-year-vacation/</link>
		<comments>http://www.hazaah.com/something-else/movies-to-watch-during-new-year-vacation/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 14:18:20 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=180</guid>
		<description><![CDATA[This list is mostly for personal use, but if it helped u I&#8217;m glad :).
2012 &#8211; Global cataclysm, seems nice and different.
Couples Retreat &#8211; Comedy &#8211; After watching few trailers this might be the really nice move, funny (in embarrassing way)
The Men Who Stare at Goats &#8211; This looks awesome! Been waiting for Kevin to [...]]]></description>
			<content:encoded><![CDATA[<p>This list is mostly for personal use, but if it helped u I&#8217;m glad :).</p>
<p><b><a href="http://www.imdb.com/title/tt1190080/">2012</a></b> &#8211; Global cataclysm, seems nice and different.<br />
<b><a href="http://www.imdb.com/title/tt1078940/">Couples Retreat</a></b> &#8211; Comedy &#8211; After watching few trailers this might be the really nice move, funny (in embarrassing way)<br />
<b><a href="http://www.imdb.com/title/tt1234548/">The Men Who Stare at Goats</a></b> &#8211; This looks awesome! Been waiting for Kevin to make another film for some time.<br />
<b><a href="http://www.imdb.com/title/tt0361748/">Inglorious Bastards</a></b> &#8211; Still haven&#8217;t watched this, so also another must see.<br />
(* snatched)<b><a href="http://www.imdb.com/title/tt0494238/">Inkheart</a></b> &#8211; Even tho a lot of people look down on this type of movies I always enjoyed them. Easy and fun movie to watch.<br />
(* snatched)<b><a href="http://www.imdb.com/title/tt1152836/">Public Enemies</a></b> &#8211; Johnny Depp. End of story.<br />
-<br />
<b><a href="http://www.imdb.com/title/tt1054606/">The Imaginarium of Doctor Parnassus</a></b> &#8211; Both me and my gf always loved Johnny Depp&#8217;s movies. This one goes to cinemas on 25th of dec, so if by some miracle I manage to find it on torrents it will be definite pick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/movies-to-watch-during-new-year-vacation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tune-up (speed up) Eclipse</title>
		<link>http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/</link>
		<comments>http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/#comments</comments>
		<pubDate>Tue, 12 May 2009 07:59:05 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/</guid>
		<description><![CDATA[Another note to self&#8230;
If your PC (mac or whatever crap u have there :P) has 1gb of ram use following flags when running eclipse:
-vmargs -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m
If you have any more ram on your setup replace 512 with [amount of ram]/2 and 128 with [amount of ram]/4 and you will get decent results.
PS.
Assigning more [...]]]></description>
			<content:encoded><![CDATA[<p>Another note to self&#8230;<br />
If your PC (mac or whatever crap u have there :P) has 1gb of ram use following flags when running eclipse:<br />
-vmargs -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m</p>
<p>If you have any more ram on your setup replace 512 with [amount of ram]/2 and 128 with [amount of ram]/4 and you will get decent results.</p>
<p>PS.<br />
Assigning more then 1gb of ram to eclipse will proly not give you any better performance then on 1gb.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Always fresh: Sql list of countires</title>
		<link>http://www.hazaah.com/programming/always-fresh-sql-list-of-countires/</link>
		<comments>http://www.hazaah.com/programming/always-fresh-sql-list-of-countires/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 11:01:49 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Something Else]]></category>
		<category><![CDATA[countries list]]></category>
		<category><![CDATA[fresh countries list]]></category>
		<category><![CDATA[iso countries]]></category>
		<category><![CDATA[mysql countires list]]></category>
		<category><![CDATA[sql countires list]]></category>
		<category><![CDATA[up to date countries list]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=70</guid>
		<description><![CDATA[Since my last post with updated list of countries in MySQL format was so well received I decided to go even further and write a parser script so you can always get fresh countries list.
Every time you download sql countries list it will be up to date for that very minute. This is because it [...]]]></description>
			<content:encoded><![CDATA[<p>Since my last post with updated list of countries in MySQL format was so well received I decided to go even further and write a parser script so you can always get fresh countries list.</p>
<p>Every time you <a href="/download/countries.sql.php">download</a> sql countries list it will be up to date for that very minute. This is because it is fetched and parsed from ISO.org just for your pleasure, every time you download (well if you don&#8217;t mind a bit of caching :P)</p>
<div style="border:1px solid #ccc;padding:6px;">
Enough talk&#8230; <a href="/download/countries.sql.php"><strong>Download</strong></a> MySQL countries list.
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/always-fresh-sql-list-of-countires/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>In my Javascript I keep getting &#8220;submit is not a function&#8221;. What did I do?</title>
		<link>http://www.hazaah.com/something-else/in-my-javascript-i-keep-getting-submit-is-not-a-function-what-did-i-do/</link>
		<comments>http://www.hazaah.com/something-else/in-my-javascript-i-keep-getting-submit-is-not-a-function-what-did-i-do/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 14:17:40 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.knowbies.com/something-else/in-my-javascript-i-keep-getting-submit-is-not-a-function-what-did-i-do/</guid>
		<description><![CDATA[If you have a Javascript function, doing some form validation for example, and at the end, it will submit the form, and it suddenly stops working, throwing up an error message in the console box that reads &#8220;submit is not a function&#8221; then you have probably mis-named one of your form fields.
The most common being [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a Javascript function, doing some form validation for example, and at the end, it will submit the form, and it suddenly stops working, throwing up an error message in the console box that reads &#8220;submit is not a function&#8221; then you have probably mis-named one of your form fields.</p>
<p>The most common being that you&#8217;ve accidentally named a submit field as &#8217;submit&#8217;.</p>
<pre>
<input type="submit" name="submit" value="save"></pre>
<p>This is where the problem is.&nbsp; When you make a call to submit the form using:</p>
<pre>document.getElementById("aform").submit();</pre>
<p>It will attempt to call the submit() function of the <font face="Courier New">&lt;input&gt;</font> field and not the <font face="Courier New">&lt;form&gt;</font> of the same name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/in-my-javascript-i-keep-getting-submit-is-not-a-function-what-did-i-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>aDsense avenue &#8211; AdSense Profit search engine</title>
		<link>http://www.hazaah.com/programming/adsense-avenue-adsense-profit-search-engine/</link>
		<comments>http://www.hazaah.com/programming/adsense-avenue-adsense-profit-search-engine/#comments</comments>
		<pubDate>Fri, 20 Apr 2007 12:33:04 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Search Engines]]></category>

		<guid isPermaLink="false">http://www.knowbies.com/vladimir-cvetic/programming/adsense-avenue-adsense-profit-search-engine/</guid>
		<description><![CDATA[I have just released aDsense avenue software.
Basicly it is search engine created from various sources (msn, yahoo!, google, blog feeds etc) which incorporates most modern SEO tehniques to generate organic search engine visits. Content scraped from these sources and user defined RSS feeds is automatically rated by software so only the best possible content has [...]]]></description>
			<content:encoded><![CDATA[<p>I have just released <a target="_blank" href="http://www.adsenseavenue.com/">aDsense avenue</a> software.</p>
<p>Basicly it is search engine created from various sources (msn, yahoo!, google, blog feeds etc) which incorporates most modern SEO tehniques to generate organic search engine visits. Content scraped from these sources and user defined RSS feeds is automatically rated by software so only the best possible content has a chance to get published (again automatically).<br />
One of it&#8217;s best sides is that it has Google AdSense ads already placed. Lots of work has gone into deciding which is the best AdSense position. On last tree tests click through rate was amazing 24%!</p>
<p>Extensive and smart use of javascript will make search engine spiders miss all visual aspects and external links because those are generated on client side with&#8230; javascript. This tehnique is big innovation on market so aDsense avenue websites will get full benefit from it.<br />
I am very proud on this piece of software, if you would like to find out more simply go to: <a target="_blank" href="http://www.adsenseavenue.com/">www.adsenseavenue.com</a></p>
<p>Hope you like it too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/adsense-avenue-adsense-profit-search-engine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Grants &#8211; Free Advertising for Open Source Non-profits</title>
		<link>http://www.hazaah.com/something-else/google-grants-free-advertising-for-open-source-non-profits-2/</link>
		<comments>http://www.hazaah.com/something-else/google-grants-free-advertising-for-open-source-non-profits-2/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 11:10:17 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.knowbies.com/vladimir-cvetic/something-else/google-grants-free-advertising-for-open-source-non-profits-2/</guid>
		<description><![CDATA[Generating awareness and driving new users and developers to your project&#8217;s website can be hard for any organization. It can be even harder for open source projects with limited marketing funds. Programs like Google Summer of Code can really help raise awareness of your project, but you may want to learn about another Google program [...]]]></description>
			<content:encoded><![CDATA[<p>Generating awareness and driving new users and developers to your project&#8217;s website can be hard for any organization. It can be even harder for open source projects with limited marketing funds. Programs like <a href="http://code.google.com/soc/">Google Summer of Code</a> can really help raise awareness of your project, but you may want to learn about another Google program that may be able to help give your project more visibility.</p>
<p>The <a href="http://www.google.com/grants/">Google Grants</a> program, currently in beta release, uses Google AdWords to help nonprofits spread their messages to a wider audience by providing them with free advertising on <a href="http://google.com/">Google.com</a>. This program supports charitable organizations that have a strong mission to help the world and share our philosophy of community service. Typically these are in areas such as science and technology, education, global public health, the environment, youth advocacy and the arts.</p>
<p>If your organization has nonprofit status, you may qualify for free AdWords advertising through this program.  <a href="http://www.google.com/grants/faq.html"> Learn more</a> and consider applying today.</p>
<p>(<a href="http://google-code-updates.blogspot.com/2007/04/google-grants-free-advertising-for-open.html">original</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/google-grants-free-advertising-for-open-source-non-profits-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Redesign, live testing</title>
		<link>http://www.hazaah.com/something-else/redesign-live-testing/</link>
		<comments>http://www.hazaah.com/something-else/redesign-live-testing/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 15:29:39 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.knowbies.com/vladimir-cvetic/something-else/redesing-live-testing/</guid>
		<description><![CDATA[You may have noticed some weird stuff in last few hours&#8230; thats because I have been redesigning and developing some new gadgets for blog.
I know it is bad to test stuff live I hate it as much as you do, but when you are on other side of the screen things seem easier without having [...]]]></description>
			<content:encoded><![CDATA[<p>You may have noticed some weird stuff in last few hours&#8230; thats because I have been redesigning and developing some new gadgets for blog.</p>
<p>I know it is bad to test stuff live I hate it as much as you do, but when you are on other side of the screen things seem easier without having  two copies of everything. Just open your favorite editor got in ftp mode and work like you are on localhost :)</p>
<p>You can hate me&#8230; I don&#8217;t care.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/redesign-live-testing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Status report</title>
		<link>http://www.hazaah.com/something-else/status-report/</link>
		<comments>http://www.hazaah.com/something-else/status-report/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 12:57:32 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.knowbies.com/admin/something-else/status-report/</guid>
		<description><![CDATA[Ok just so u know, I am alive.
Haven&#8217;t been posting in a while (more then one month), it&#8217;s just I got swarmed with work.
Well&#8230; mkey not just work there is something else&#8230; my old addiction came back on me when I least expected it, started playing WoW again (wow-europe.com). Wanna see my char ? weee [...]]]></description>
			<content:encoded><![CDATA[<p>Ok just so u know, <strong>I am alive</strong>.</p>
<p>Haven&#8217;t been posting in a while (more then one month), it&#8217;s just I got swarmed with work.</p>
<p>Well&#8230; mkey not just work there is something else&#8230; my old addiction came back on me when I least expected it, started playing WoW again (wow-europe.com). Wanna see my char ? weee <a href="http://armory.wow-europe.com/character-sheet.xml?r=Burning+Legion&#038;n=Stenchdamn"><strong>Stenchdamn</strong></a> (badass shadowpriest). Joined rly nice and proly the best guild on Burning Legion Europe server &#8220;<a href="http://www.working-as-intended.eu/">Working as Intended</a>&#8221; and atm I am kinda happy :)</p>
<p>Some of you may notice new template, yea I just downloaded it cos i kinda like :) will customize it heavily when I get some time tho.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/status-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TextMate and Vim</title>
		<link>http://www.hazaah.com/programming/textmate-and-vim/</link>
		<comments>http://www.hazaah.com/programming/textmate-and-vim/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 14:41:03 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Something Else]]></category>
		<category><![CDATA[Thinking out loud]]></category>

		<guid isPermaLink="false">http://www.knowbies.com/vladimir-cvetic/programming/textmate-and-vim/</guid>
		<description><![CDATA[Without doubt, theyâ€™re both great editors.  Which one should you be using? Thatâ€™s a personal decision.
Look and feel
This is a personal decision.  But most people seem to prefer how TextMate looks on Mac OSX over how Vim looks.  I agree with them.  TextMate looks like an actual Cocoa app (because it [...]]]></description>
			<content:encoded><![CDATA[<p>Without doubt, theyâ€™re both great editors.  Which one should you be using? Thatâ€™s a <em>personal</em> decision.</p>
<h2>Look and feel</h2>
<p>This is a <em>personal</em> decision.  But most people seem to prefer how TextMate looks on Mac <span class="caps">OSX</span> over how Vim looks.  I agree with them.  TextMate looks like an actual Cocoa app (because it is!).</p>
<p>Want to compare?  Check out the picture at the top.</p>
<p>I feel like the tabs for GVim is tacked on (for OS X) and the overall layout isnâ€™t nice as TextMateâ€™s. But if aesthetics were everything, I wouldnâ€™t be using GVim on an Apple.</p>
<h2>Moving the cursor around</h2>
<p>Moving around is important while editing. You should be able to move to the beginning/end of a line/sentence/paragraph with one or two keystrokes.</p>
<h3>Basic navigation (up/down/left/right â€“ by units/words/sentences/paragraphs)</h3>
<p>TextMate uses Emacs keybindings for navigation, much like other Cocoa applications. ^N, ^P moves to the next and previous line. ^F, ^B moves forwards and backwards. Alt-F, Alt-B moves forwards and backwards by words. Thereâ€™s also Alt-Up/Down/Left/Right. This defaults to movement by paragraphs/words. Lastly, thereâ€™s Command-Up/Down/Left/Right, which moves to the beginning/end of the document or line (^A and ^E also work for the beginning/end of the line).</p>
<p>You can extend TextMateâ€™s navigation either by <a href="http://t0fuu.wordpress.com/2006/08/30/keybindings/">setting your keybindings</a> or by using the TextMate bundle editor.</p>
<p>What about Vim? Navigation is already there. In command mode, h,j,k,l moves in all four directions. 0, ^, $ moves the cursor to the beginning/first char/end of the line. (,),{,} moves to beginning/end of sentence/paragraph. And to move by units of words, you have b,B,w,W,e,E.</p>
<h3>Movement by search</h3>
<p>My favorite part is navigation by searching for both editors. For TextMate, you can search by hitting ^S. For Vim, /regexp or fx, Fx, tx, and Tx (search by character).</p>
<p>TextMate has something awesome, Shift-Apple-T â€“ search by symbols. This searches special keywords within a file. So for Ruby, it searches class/method definitions only.</p>
<p>Shift-Apple-T and enter â€œinitializeâ€ will look for the line â€œdef initializeâ€.</p>
<p>Whatâ€™s great about it though, itâ€™s for <em>all</em> languages, no customization needed. For Vim, you could easily extend the editor to have ^T to look for a method definition, but you would have to define it for each language.</p>
<pre>nmap <C-T> /^ *def</pre>
<h3>Movement by line numbers</h3>
<p>To go to line 24 in Vim, thereâ€™s 24G.  For TextMate, Apple-L 24.  Not much difference.</p>
<h2>Navigating through files</h2>
<p>A new Rails application generates over 40 files in many different directories. You <em>need</em> good file navigation. You donâ€™t want to be typing the same directory path over and over again, and you donâ€™t want to have to use a mouse to open up a file for editing.</p>
<p>This is where TextMate is awesome. When you open TextMate, you can specify a directory. This directory becomes your project. Any files underneath this directory, any level deep (think **), can be quickly accessed within TextMate. You just hit Apple-T and type in the filename. You donâ€™t even need the entire filename, just bits and pieces of it.</p>
<p>Hereâ€™s an example:</p>
<ol>
<li>You open the directory â€˜root/â€™.</li>
<li>You want to open the file â€˜root/app/controllers/wiki_controller.rbâ€™.</li>
<li>Hit Apple-T and type wiki.  This matches wiki_controller.rb.</li>
<li>Hit enter, and you have the new file.</li>
</ol>
<p>Really eloquent.</p>
<p>For Vim, there are multiple ways to navigate through files. Most of them, though, youâ€™ll have to specify the entire path. After using TextMate, I tried to emulate Apple-T in Vim.</p>
<pre><strong>
nmap <D-T> :e **/
</strong></pre>
<p><strong>        </strong>This sort of comes close, although not as clean. Basically, just hit Apple-T and youâ€™ll get â€™:e **/â€™ on the ex command. Now you can enter in a filename within any directory underneath the current directory.</p>
<p>Another way would be by setting up your path.  Inside your .vimrc, just use:</p>
<pre>set path+=**</pre>
<p>Now inside your editor, use:</p>
<pre>:find filename</pre>
<p>Both :e **/ and :find work, but itâ€™s not as short and sweet as TextMate.</p>
<h2>Tabs vs Buffers vs Windows</h2>
<p>When you open multiple files for editing, you get tabs in TextMate.  For Vim, you can have tabs and/or buffers.</p>
<p>Buffers are pretty handy in Vim.  Say you open up a file and close it.  When you want to re-open it.  Just do this:</p>
<pre>:b part-of-file-name</pre>
<p>And that will re-open it for you.  You can even check what files are currently open:</p>
<pre>:buffers</pre>
<p>What I find really useful though, is Vimâ€™s window system. You can open up multiple editing windows within the same tab. Pretty neat, especially if you want to view one file while editing another (I use it to look at my unit tests while editing library files). To use the window system,</p>
<pre>:split
:vsplit</pre>
<p>split will split horizontally, vsplit will split vertically.  To switch between windows, use ^W^W.</p>
<h2>Highlighting text</h2>
<p>Is highlighting text important?  Yeah!  You highlight text to perform a command on it or to move it around.</p>
<p>For TextMate, you can highlight text by holding down Shift and using any movement keys. To highlight a line, Shift-Apple-L. After you highlight some text, you can perform an action on it, like cut, copy, delete.</p>
<p>Basically though, you can highlight a character, line, or block with v, V, ^V. After you highlight it, use any movements to highlight more. You can use basic movement keys or movement by searches. After you highlight, you can delete, yank, search/replace, or do any commands.</p>
<h2>Search and Replace</h2>
<p>Speaking of search/replace, letâ€™s see how both editors implement this feature.</p>
<p>TextMate has Apple-F, which has the option to use regular expressions or not. This is simple and very easy to use.</p>
<p>Vim has :%s/search_term/replace_term/g. Pretty confusing for a newcomer, but after you get used to it, itâ€™s pretty simple to use. Except for regular expressions, where youâ€™ll get a lot of \ escape characters. It looks ugly sometimes, but can be done quickly and succinctly.</p>
<p>Both allow for confirmation when replacing â€“ for Vim %s/search/replace/gc, for TextMate itâ€™s an option you set.</p>
<p>I have to hand it to TextMate though, search and replace in the <em>entire</em> project is a great feature.  This lets you replace words recursively, throughout the entire project.</p>
<h2>Copy/Yanking and Pasting</h2>
<p>Why is copying/pasting important? After all there is an anti-pattern in programming called copy/pasting programming. Well, itâ€™s useful for refactoring. There are plenty of times when you want to extract a piece of code. Without any refactoring tools, cutting and pasting is your best friend.</p>
<p>For Vim, thereâ€™s a lot. y is for yanking, and you can use it with a movement command to select how much to yank (or with visual mode). Later you can paste it with p/P (before or after current line or character). You can remember up to the last 9 yanks with â€œ1-9 (thatâ€™s â€œ1 or â€œ2 or â€œ3â€¦). If you want to paste the latest yank, â€œ1p. For the second latest, â€œ2p. If youâ€™re ever unsure, just use the command:</p>
<pre>:reg</pre>
<p>TextMate has the basic Apple-C, Apple-X, Apple-V for copying and pasting. Thereâ€™s also ^-Alt-Apple-V for remember a list of recently copied items for pasting (this is extremely intuitive, you donâ€™t have to remember which register you saved it in like in Vim). Hitting ^-Alt-Apple-V will list out all of your recently copied items that you can choose from (called Paste from History).</p>
<h2>Completion, Omnicompletion, and Documentation Lookup</h2>
<p>Sometimes, youâ€™ll type a long word like supercalifragiliciousexpialidocious (spelling??). You donâ€™t want to type that over and over again. Completion to the rescue.</p>
<p>For TextMate, just type part of the word â€“ super â€“ and then hit .  This will complete the entire word, very simple.</p>
<p>For Vim, ^x^p will look previous to the current cursor position for the complete word. ^x^n will look below the current cursor position for the complete word. So if Iâ€™m below the entire word and type â€“ super â€“ I would use ^x^p.</p>
<p>But Vim 7.0 has a new feature, omni-completion. This is like smart completion based on the current language and context. For example, if Iâ€™m in a ruby file and I type:</p>
<pre>String.</pre>
<p>And hit ^x^o, a list of possible method names will pop up that I can choose from. The list will have all valid class methods of String.</p>
<p>TextMate doesnâ€™t have omnicompletion, but there is something just as useful. Internal documentation! After typing String, I can hit ^H, which will look for the documentation on String. This is extremely useful when learning a new language.</p>
<h2>Snippets and abbreviations</h2>
<p>Snippets in TextMate are great.  Basically, you define a snippet like this:</p>
<pre>def ${1:method_name}
end</pre>
<p>Now if you type â€˜defâ€™ and hit tab, it will expand to:</p>
<pre>def method_name
end</pre>
<p>method_name will be highlighted and ready to replace. If there were more than one items to replace, you could keep on hitting to jump to each item. Itâ€™s a great productivity gain.</p>
<p>For Vim, there are a couple of scripts that try to emulate snippets.  But natively, thereâ€™s abbreviations.  For example:</p>
<pre>iab def def<CR>end<Esc>-A</pre>
<p>Now if you type â€˜defâ€™ and hit your spacebar, itâ€™ll become:</p>
<pre>def
end</pre>
<p>With the cursor right after â€˜defâ€™.  Thereâ€™s no jumping around different items like TextMateâ€™s snippets.</p>
<h2>Integration with Unit Tests, compilers, etc.</h2>
<p>Ever run a compiler that spit out errors and their line numbers? Didnâ€™t you wish that your editor could just jump to those line numbers?</p>
<p>Well with Vim you can!  You can compile code within the editor:</p>
<pre>:make</pre>
<p>Which will run your Makefile.  Any errors will go into a â€˜quick listâ€™.  To use a quicklist:</p>
<pre>:clist
:cnext
:cprev</pre>
<p>These commands will jump to the next/previous error or list out all of your errors. The shortcut to these commands or :cl, :cn, and :cp.</p>
<p>But what about languages that arenâ€™t C, C++, or Java?  Well, you have to customize it.  Iâ€™m not sure about <span class="caps">PHP</span> or Python, but for Ruby thereâ€™s the ruby-vim gem.  Check out instructions on how to install it <a href="http://t0fuu.wordpress.com/2006/09/11/using-vim-for-editing-ruby/">here</a>.</p>
<p>Once you install the gem, you have to manually set â€˜makeprgâ€™ while youâ€™re editing.</p>
<pre>:set makeprg=ruby -w</pre>
<p>This will set your compiler to the ruby interpreter with warnings.  Now in your editor, run :make , ( means replace with this filename).  Any errors will populate your quicklist and you can jump to each error with :cn or :cp.</p>
<p>Whatâ€™s amazing though is the vim-rubyâ€™s integration with unit tests. Instead of running the file through the ruby interpreter, you can run your unit tests. Any errors will populate your quicklist (this assumes you have a Rakefile). To do this:</p>
<pre>:source /path/to/vim/config/compiler/rubyunit.vim
:set makeprg=rake test</pre>
<p>Now run:</p>
<pre>:make</pre>
<p>Vim will jump to the first error produced by your unit tests.  To go to the next error, just use :cn or :cp.</p>
<p>Unfortunately, there are still some bugs with it. The first error is usually fine to jump to but next errors sometimes end up jumping to a blank file. Either that, or Iâ€™m using it wrongâ€¦</p>
<p>As for TextMate, hitting Apple-R will run the current file. So if the file is a unit test, that unit test will be executed. To run a focused unit test for Ruby, just put the cursor in a test definition and use Shift-Apple-R.</p>
<p>Update:<br />
I just found out that TextMate has great integration with Rubyâ€™s unit testing facility. If youâ€™re currently editing a unit test file, you can hit Apple-R to run it in RubyMate. A new window will pop up, and if there are any errors, the stack traces will have links to the file/position. So you can just click on it and TextMate will open that file to the exact position of the error, pretty awesome.</p>
<h2>What I missed</h2>
<p>What was mentioned in this article was just some features I could think of off the top of my head.  I missed a <em>lot</em> of features for both editors.</p>
<p>For TextMate, thereâ€™s macros, bookmarking, folding. For Vim, thereâ€™s recording, marks, and more folding. Thereâ€™s a lot more too, like extending the editors for new languages â€“ syntax highlighting, colorschemes, etc.</p>
<p>Try them out for yourself.  Get a TextMate trial at <a href="http://macromates.com/">macromates</a>.  Compare the two editors to see which you like best.  After all, choosing an editor is a <em>personal</em> decision, everyoneâ€™s favorite editor is going to be different.</p>
<p>Donâ€™t forget to learn more about your editor <em>everyday</em>. Try learning new ways to search/replace or better ways for movement. Try extending your editor with macros or scripts. Since it is a <em>personal</em> decision, itâ€™s a good idea to customize your editor.</p>
<p>Update: Sorry for any errors in regards to keyboard instructions.  I wrote this post with Textile and forgot that ^carets^ handles superscript.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/textmate-and-vim/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Talisman to be relaunched &#8211; October 2007!</title>
		<link>http://www.hazaah.com/something-else/talisman-to-be-relaunched-october-2007/</link>
		<comments>http://www.hazaah.com/something-else/talisman-to-be-relaunched-october-2007/#comments</comments>
		<pubDate>Fri, 12 Jan 2007 15:16:28 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.knowbies.com/vladimir-cvetic/something-else/talisman-to-be-relaunched-october-2007/</guid>
		<description><![CDATA[Yes, you heard correctly
â€¦
TALISMAN, THE LEGENDARY FANTASY BOARD GAME, IS BACK!
Black Industries are very excited to announce the launch of a brand
new edition of Talisman. Releasing in October 2007, the classic
Talisman game is back and itâ€™s better than ever!read more&#160;&#124;&#160;digg story
]]></description>
			<content:encoded><![CDATA[<p>Yes, you heard correctly<br />
â€¦<br />
TALISMAN, THE LEGENDARY FANTASY BOARD GAME, IS BACK!<br />
Black Industries are very excited to announce the launch of a brand<br />
new edition of Talisman. Releasing in October 2007, the classic<br />
Talisman game is back and itâ€™s better than ever!<br/><br/><a href="http://www.warhammer.net/blogs/2007/01/talisman-to-be-relaunched-october-2007/">read more</a>&nbsp;|&nbsp;<a href="http://digg.com/gaming_news/Talisman_to_be_relaunched_October_2007">digg story</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/talisman-to-be-relaunched-october-2007/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
