Learning by cheating - finally got used to use VIM

posted: April 15th, 2006 · by: Sven

in: Misc stuff · tagged as: , ·  9 comments »

I’ve been a happy Textpad user for several years now [1]. I still consider Textpad the best Windows-only texteditor out there. Not that I’ve ever been that much religious about it. I simply found it to be the best-tool-to-get-the-job-done [tm].

I’ve tried several IDEs and editors but especially when it came to write non-Java/non-C++ code I’ve never found anything else that I’d actually use (and buy) - most of the IDEs being bloated beyond compare with tools that “nobody needs” [tm] and that I feel I can replace with tinier external tools far better. And most of the editors being total crap compared with Textpad’s power and simplicity.

But you certainly know. There’s always been that pesky devil sitting on my shoulder and telling me that to become a Real Programmer [trademarked also, of course] one simply *must* learn VIM.

In fact that devil actually incarnated in the form of a friend and co-worker for a while. ;) At least as long as we shared the same office, I’ve been able to resist and ignore his vicious insinuations. I kept sticking to Textpad.

Since, I’ve of course had to work on our severs and thus over the time had to learn a very minimum of VI - to at least be able to do the basic stuff. And of course I downloaded VIM and played around with it … but I’ve never got it as far as being halfway as productive as I was used to with Textpad (which, over the years, of course had grown virtual nerves through my keyboard connecting to some synapses at my fingertips or so and thus actually became an outsourced device of my brain or something like that - really, no kidding).

Yet, after having read “The pragmatic programmer” by Hunt/Thomas I simply *had* to do another attemp to learn VIM. I’ve been totally surprised how easy I found it this time. After two days I felt considerably productive - probably as or even more [2] productive than I was on Textpad. Huh!

I noticed that there’s probably some learning pattern hidden that I could check out for similar learning tasks in the future. So I thought I’d write that down.

First, like mentioned, I’ve already had some very basic experience with VI. I’ve been able to open files, navigate around, edit and save my stuff (yup!). But - I really havn’t even been able to work with more than one window (aside from sending VI to the background and open another instance from the shell ;).

Second, I had the O’Reilly “vi Editor pocket reference” at hand (which actually had been a birthday gift of the forementioned “devils” incarnation *lol*). Also, I searched the internet for vim.rc files, read them and made notes from them - at the same time already trying to do it in VIM in some halfway efficient way.

Third, I then found the “IBM VIM cheatsheet” (heck! I can’t find the link anymore. But here’s a whole lot of similar stuff) which caught my attention because it seemed to really be written by hand. I directly followed the idea to create my own cheatsheet from the notes I had made and roughly copied the layout of the IBM sheet. I selected only those commands and shortcuts that I really felt to be definitely necessary - they filled almost a DIN A4 paper. I left some place for further notes also.

Back at the keyboard I immediately noticed that I remembered several commands. I pinned my cheatsheet onto the wall beneath my desktop and tried to keep my attention on how I’m doing things, where I could use one of those commands and how I can get used to it.

That worked.

After a few hours of typing, reading VIM tips and “surfing” the manual, changing my vim.rc (restarting VIM all the time since I hadn’t figured out to do it with :so yet ;) I was able to type and edit in a satisfying manner.

And there were a few things I have *not* done. I have not - like the first time I checked out VIM - immediately tried to change all kinds of mappings do commands I *thought* they would be usefully mapped different from what VIM comes with by default.

Also, this time I have *not* tried to install several plugins to somehow mimic my GUI “workspace” pane in Textpad (something that I’m still missing) but learned how to - well, sort of - use buffers and windows instead.

Next day, I found myself to be able to do most of my daily work using VIM. Of course, there’s been a lot of stuff that I had to look up in between and some tasks I simply didn’t get managed. But hey, for the first time it simply *worked*. Cool.

I continued to work within VIM and tuned several settings that didn’t match my habits. I learned to use :mksession and :so and the differences between the selection and visual modes. I continued to pay attention to *how* I’m doing things and step by step adding habits to do them different.

About three days later I noticed that I do not need most of the notes on my cheatsheet any more (like hjkl keys, search, substitute etc.). Instead, I looked at notes that I’ve made on separate pieces of paper on my desktop and I consulted the manual when I’ve forgot some setting or command.

I followed the idea to repeat that process and first - again - collected those commands that I thought I really should learn next, grouped them together, discarded several commands from my first sheet and kept others that I’ve not really got used to yet.

Again, I pinned that sheet onto the wall behind my screen and immediately noticed that I had remembered some of that stuff.

So, the pattern seems to be (for me):

  1. get used to some very basic, selected stuff
  2. collect the very next simple steps
  3. arrange them and write them down as a cheatsheet
  4. while actually doing something pay attention to how it can be done better
  5. train a while
  6. goto 2.)

Thereby:

  1. generally follow the trails of what comes with the defaults, probably tweak some stuff that’s been tweaked by others.
  2. keep you’re hands from too nifty stuff like multitudes of plugins or esoterik mappings that add their own tons of complexity

Oh. Here’s the second version of my VIM cheatsheet.

Hmmm … now looking at it I think I could add another iteration … goto 2.



[1] Year, I’ve been tied to stay on a Windows box for developement for several reasons. Hope to get rid of this soon though.

[2] Hmm … in fact that’s difficult to compare. There are some areas I simply haven’t got by now - like using grep on recursive directories and interating through the results. At other tasks I’m definitely already faster.

Leave a comment

9 Comments

  1. Tom said June 11th, 2008 at 11:42 AM  

    the original sheet/intro you mentioned is at http://www.gentoo.org/doc/en/vi-guide.xml?style=printable (I can’t find it on the IBM site, but it was written by a Gentoo guy originally)

  2. Sven said June 20th, 2008 at 11:14 AM  

    Hey Tom,

    awesome, thanks for posting the link! Yes, iirc that’s the shee I was referring to.

  3. jack said January 24th, 2011 at 03:27 PM  

    UCVHOST has changed the face of web hosting industry in a major way, people were paying gold for peanuts (and it is still happening). cheap hosting has become synonym with UCVHOST, anybody and everybody who wants a reliable and affordable domain web hosting visits UCVHOST and gets either windows vps or Linux hosting from UCVHOST. UCVHOST sells cheap hosting WITHOUT hidden terms and conditions where as competition has huge MSA and SLA’s which are good enough to confuse a seasoned lawyer also. For clients by now Business with us for the value of windows vps became very critical piece of puzzle for their whole operation, uptime and performance became a huge concern.. However it came with a cost, dedicated servers proved to be at least 100 times expensive in comparison to any windows or Linux plans. Somewhere in the labs engineers were working on splicing raw power of a server into virtual instances, this technology was called as Virtualization also termed as or virtual private servers. Also UCVHOST comes handy when you are looking for remotely hosted and managed FOREX MetaTrader4 terminals. Our forex vps platform is all geared up in fight of pips, our platform support any number of expert advisory (EA) and along with an assure of 100% uptime. Our Virtual Forex Tradng Terminals are well equipped to help you in making money .

  4. QQQ said February 7th, 2011 at 06:32 PM  

    Finally we kissed and the passion scale went sky high and I knew I was onto a good thing - sex was a certainty free porn videos. She never hesitated when I began to fondle her breasts and she willingly exposed them for me mobile porn. They were firm and I suspected a breast enhancement but said nothing - they still felt good and I was enjoying them and gradually working my way further south free porn tube. She was a step ahead of me and before I could completely undress her she moved on me atk hairy and I was suddenly having my pants pulled down and I was enjoying one of he best cock sucking hairy pussy experiences I had ever had. ABB728019394

  5. muneeb said February 24th, 2011 at 01:44 PM  

    However it came with a cost, dedicated servers proved to be at least 100 times expensive in comparison to any windows or Linux plans. Somewhere in the labs engineers were working on splicing raw power of a server into virtual instances, this technology was called as Virtualization also termed as or virtual private servers. Also UCVHOST comes handy when you are looking for remotely hosted and managed FOREX MetaTrader4 terminals.Go Ped

  6. chat said March 31st, 2011 at 08:19 PM  

    The following cleaned up the issue:

    Dependencies.loadoncepaths -= Dependencies.loadoncepaths.select{|path| \ path =~ %r(^#{File.dirname(FILE)}) }

  7. Okey oyunu said May 12th, 2011 at 04:26 PM  

    Thanks a lot for this nice post. Tüm dünya artik okey oyunu oynuyor. Yillardir bir çok oyun programi olmasina ragmen, içlerinden en güzeli olarak nitelendirebilecegimiz tek bir site göze çarpmaktadir. Diger tüm okey oyunu programlarinin aksine ücretsiz olmasi ve 3 boyutlu olarak hizmet vermesi mükemmel bir gelismedir. Sizlerde www.okey-oyunu.com adresinden bu essiz okey oyununu indirebilirsiniz. Kullanimi çok basit ve Türkçe dil seçenegi ile kolaylikla oyuna baslayabilirsiniz. Ister kendi ülkenizden, isterseniz dünyanin tüm farkli bölgelerinden dilediginiz oyun odalarini seçerek, oyuna hemen baslayabilirsiniz. Okey oyunu oynamak için artik arkadas bile aramaniza gerek kalmadan, bilgisayarinizdan 100 binlerce üye ile online olarak okey oyununu oynamanin zevkine varabilirsiniz.

  8. porno said May 22nd, 2011 at 01:13 PM  

    I do agree with all of the ideas you have presented in your post. They’re really convincing and will definitely work. Still, the posts are too short for newbies. Could you please extend them a bit from next time? Thanks for the post.

  9. porno said May 22nd, 2011 at 01:51 PM  

    good comment. thanks you friends.

    I’ve surfed the net more than three hours today, however, I haven’t found such useful information. Thanks a lot, it is really useful to me

Sorry, comments are closed for this article.

artweb design
Sven Fuchs
Grünberger Str. 65
10245 Berlin, Germany


http://www.artweb-design.de

Fon +49 (30) 47 98 69 96
Fax +49 (30) 47 98 69 97