The capabilities of Vim

Many have heard of the good things that Vim can do. Many propose and maintain that once you take the time to actually learn Vim, it will be your last editor, ever, because you’ll never want anything else. Many claim that nothing can beat the awesome combination of simplicity and power that is Vim.

This is a neutral description of some Vim stuff that I learned recently, and I’ll let the readers decide whether they conclude the same as the others above.

Apart from learning some built-in commands and keyboard shortcuts in Vim from the ground up, like here, I think it is also essential to actually learn some VimScript to be able to fully leverage the power of Vim – for example here. Finally, after having familiarized yourself with these, the next step would be to actually start looking at some of the plugins that exist in the Vim repository. Installing them is mostly easy – some of them can just be copied verbatim to your own .vimrc file.

Imagine being able to insert something at the end of every line in a block of code in a few keystrokes. Imagine being able to delete, find, replace, edit anything in a line without using the mouse, and without pressing the arrow keys at all. And it doesn’t end there.

Consider, for example, how helpful an automatic code/ snippet generator can be – something that enables you to, for example, press for followed by two tabs and automatically inserts for(int i = 0; i < count; i++) { // Code }. Imagine that on top of that, you place the cursor on top of the i and type another name, and the name changes in all the three places where it appears. Cool, isn’t it? Think of the time it saves, and the errors that it precludes. And, you guessed it, a plugin like this already exists, and you can even see it in action in a video before you decide to install it!
Happy Vimscripting!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s