Three things gave a background to my decision to start learning Vim:

* A nagging desire to drop Mac OS X in favor of Linux and, therefore, the necessity to find an alternative to TextMate.
* TextMate's learning curve is very flat and very short. After years of heavy usage, I was bored.
* I've seen a couple of "magic" Vim screencasts that left me drooling like an idiot.

Because of the first point, I've spent a significant portion of 2009 trying out all the Linux/cross-platform editors/IDEs I could find: Gedit, Geany, Kate, Scribes, Redcar, Emacs, Vim, Eclipse, Komodo, IntelliJ IDEA… I've tried them all. I wanted completion (even basic), some kind of snippet system, themeability, fast navigation… and all of it was available in one form or the other in most of those editors/IDEs.

Because of the second point, the over all design of the editor, the steepness of its learning curve and all sorts of subjective details (keyboard friendlyness, scriptability, active community…) were also weighted when trying out all those editors/IDEs.

Because of the second and third point, I was very curious about Vim. It was the most "special", advanced users seemed to be able to fly and it was cross-platform. The String Calculator Kata In Python screencast (http://vimeo.com/8569257) by Gary Bernhardt, despite showing an heavily customized Vim, was mesmerizing. It's very subjective, I know, but I felt that Vim was just my kind of "special".

But yeah, it was really "special". All my attempts to use it had been very frustrating and I was about to settle on Eclipse.

Then came the right occasion: I had a totally empty week before me. Nothing to do at work, my kid was at his grandparents'… So I decided to give Vim a serious try.

I decided to start right at the beginning: $ vimtutor, which I did a good twenty times. After each session, I opened an old html or js or txt file and tried to apply my new knowledge. Of course the first day or two were very unproductive and frustrating but I had a lot of time and no obligation of prductivity so kept trying. After a week, I knew all the basic commands but I was definetely not ready. When, finally, I had some real work to do I naturally turned to my trusty old TextMate while I spent a couple of hours every night watching screencasts, reading tutorials, practicing and, above all, doing the biggest rookie mistake: trying to turn Vim into a TextMate clone.

I installed lots and lots of plugins, filled my .vimrc with hundreds of lines I didn't understand copypasted from people I didn't know and tried to map 1 to 1 Vim's and Textmate's keyboard shortcuts. After a few weeks at this rate, my Vim was an horrible and slow mess. It took a lamentably failed attempt to use Vim on a VPS for me to actually accept my failure and decide to go back to square one.

I deleted the content of my .vimrc and of my .vim/ and tried $ vimtutor again. I was a new "student": more open minded, more willing to learn. It was only at that time that I found myself suddenly blown away by the elegance of Vim's design and, yes, the SIMPLICITY of its language. Before that, aJc/ and Co. didn't really make much sense. After that, it took one month or so for me to finally make the switch after "solidifying" my newfound zen.

For me, it was mostly a question of design. And of being in the right state of mind.

So no, I won't prove you why Vim is better than X. That would be pointless because a. I don't care about you or the editor you use and b. I'm perfectly satisfied with the choice I made and I don't feel the need to convince myself through others that I was right.

Use whatever tool you prefer/know/need/can afford.

Instead I will show you a few things I THINK are cool.

yy5p to duplicate the current line 5 times

:g/pattern/norm @m to apply macro m to all lines matching "pattern"

:'<,'>norm yss<li> to turn a bunch of visually selected lines into list items (the '<','> is added for you by Vim and the yss part is provided by Surround.vim)

:ts <tab> to select tags from a <tab>-navigable list

<C-x><C-l> (mapped to ,= here) to complete lines

<C-x><C-f> (mapped to ,: here) to complete filepaths

dat to remove a whole html tag

ci( to delete the content of parenthesis and enter insert mode

R to enter replace mode

<C-a> and <C-x> to increment/decrement a number (with an optional count)

<C-r>= in insert mode to insert the result of an expression

vatat to select a whole table row from within one of its cells

:s/foo/bar the best search/replace mechanism I've ever used

<C-o> and <C-i> to jump through the jumplist

ma 'a to create a mark and jump to it. that's pure beauty.

/?{}wWeEbBfFtT and all the other motions and text-objects that make moving around so horrible in every other editor

and so on…

I understand that most if not all of it can be achieved in most code editors but, in my opinion, none allows me to do all that in such an elegant and natural manner.