Some propaganda in support of vim (with an apology to Emacs)

38 views
Skip to first unread message

Dilawar

unread,
Jun 30, 2013, 12:14:20 AM6/30/13
to wncc...@googlegroups.com
Like guitar, vim editor can be very intimidating for newcomers. It takes time for fingers to remember basic commands in vim, like basic chords in guitar. Once basic commands (and basic cords in guitar) are mastered, rest does not take much time. Some over-enthusiastic vim-lover compares vim to Jedi Knight's light-saber. The moral of these comparison it that it takes time and persistence to master both vim and light-saber. And it makes a statement about its wielder.

If you want to learn vim and need no propaganda in its support, download, install, and open vim; type ':help' (without quotes) and read the first 12 tutorials . These tutorials are great. You don't have to browse books and Internet. Give some time to vim during weekends and within few weeks, you should be able to use it with some competence.

The vim distinguish itself from many other editors by its ability to do everything by just keystrokes. Experienced vim user loves it and newcomer often hates it for this reason only.

A programmer spends his time editing, searching and moving around in code, and typing new code once in a while. Vim has great facility to accomplish all these fundamental operations. A piece of advice: avoid using arrow keys when moving while learning it. Vim's speed depends on its ability to move around very quickly (and lightening fast speed if you install appropriate tools and plugins such at ctags). Sticking to arrow keys will handicap you from exploiting this power (Trust me, you don't want to commit this mistake as I have done when I was learning it). The official tutorial on 'moving around' has most of keystrokes well summarized.

Programming requires repetitive typing: a keyword appears at many places. If you have typed it once, should to type it again fully? Vim, like most modern editors, allows auto-completion. Auto-completion allows fast coding and also reduces the chances significantly of spelling mistakes when you type a word again. Check out 'omni-complete' and 'super-tab' plugins. Searching stack-overflow for "vim + auto-complete" should be more than enough.

Syntax high-lightening is enabled by default in full installation of vim (vim-athena, vim-gtk etc). Indentation of code requires some work. Its a good practice to replace tab with spaces and set the indentation level to 3-4.

Searching a fragment of code can be very time-consuming when there is more than one files. For many languages 'ctags' is great for searching keywords. But how about fraction of code? You have to learn to use another very powerful facility: regular expressions (They are essentially finite state machines). How to search files containing a regular expression in a directory? Command 'find' and 'grep' can be used with great effect. The whole shell is at your disposal which in itself is a very versatile tool.
 
There is virtually no limit on how effective and efficient one can get with vim, or with any other skill. Learning is a gift of life; merit or education has little to do with it. Vim does its basic operations in the spirit of Linux (do one operation at a time and do it well). Vim lets it's user to personalize itself to their taste, to an extent that each vim can behave like a new type of text-editor. People not only distinguish between vim and other editors, they also discriminate between this vim and that vim. Vim, like tex, is one of the finest and productive piece of software created by mankind. 

And you should always pass-around vim tips/tricks like gossips to other vim-ers, even if they don't ask for it. Many have benefited from it, and no one has ever got beaten to death for doing it.

For the budding programmers, all I can say, 'May the (vim's) force be with you'.

--
Dilawar
EE, IITB

rahil momin

unread,
Jun 30, 2013, 12:30:23 AM6/30/13
to wncc...@googlegroups.com


--
--
The website for the club is http://stab-iitb.org/wncc
To post to this group, send email to wncc...@googlegroups.com
 
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Harsh Gupta

unread,
Jun 30, 2013, 12:59:20 AM6/30/13
to wncc...@googlegroups.com
I'm still a vim novice but during the very initial learning stage I had my arrow keys, backspace and delete disabled. That forced me to do things the vim way. Also I used vimtutor to get a start.  
--
Harsh
Reply all
Reply to author
Forward
0 new messages