The power of Vim

Anyone who wants to actually get to grips with their Linux system and get the most out of it is going to spend a lot of time in text-editors. Ubuntu provides gnome’s gedit for this purpose, and it’s pretty good.

However, I thought I would just mention Vim, a terminal-based editor (with GVim for those who prefer a GUI). I’d heard about it and decided to give it a try, and I have to say I loved it. It’s powerful, quick, and highly configurable. I’m even editing this blog with it, through a plugin called vimpress.

There’s no point writing a lot about Vim, since it’s been around since the dawn of time (it feels like) and is well documented elsewhere. However, it has a very steep learning curve that can be quite daunting to the new user. It’s still very much worth getting to grips with though, so I thought I would put together a quick collection of good places to look if you want to learn to use Vim properly.

The best place to start is probably with Vim’s own tutorial. To run this, simply type vimtutor at the command prompt (you need to have Vim installed, of course!). It should take about 30 minutes to run through

Vim’s home page is another good place to get information, with extensive documentation and guides. However, I found it quite daunting.

For me, this is the best reference I found. Once you start to understand the basic principles of Vim, you can use this to learn the rest. I printed off a copy which I keep by my desk, literally for quick reference, with highlighting for the commands which I find most useful. It takes a little effort to get the hang of the symbology, but it’s well worth it.

I also found this guide helpful. It takes less time than the Vim tutor, and its reference list is smaller and easier to understand than the quick reference. However, it is only a basic guide and you can do a lot more with Vim than is listed here. I started off with this guide, and moved onto the quick reference later when I had begun to get the hang of things a bit more.

Another source of help if you really can’t find what you’re looking for online is the #vim IRC channel on Freenode. I’ve found the people here are extremely helpful with good response times. They also have a handy Topic message with a few more links you might want to check out.

If none of these suggestions really help, there are literally hundreds of guides out there on the web for Vim. A quick google search should set you up with plenty of helpful material.

If all else fails, remember that Vim isn’t everyone’s cup of tea. There are plenty of other options out there that you can use instead, emacs, gedit, kedit, kate, to name but a few. If you do like Vim, though, don’t forget, you can also get it for Windows!



Filed under Linux, Thoughts, Tips & Tricks

2 responses to “The power of Vim

  1. Steve

    Another text editor that you may be interested in looking into, will be nano. This seems to me to be a lot more user friendly than Vim, though is not advanced, so may well lack some of the advanced features of vim.

  2. One of the nice things about learning vim is that it is based on vi. Vi came from ed, a simple command based text editor which didnt use terminal capabilities. Vi introduced the termincal capabilities and a host of other features to the basic ed.

    As such, most unxies have a flavour of vi installed. Freebsd favours nvi, Solaris use the older vi (though the use of the GNUtools package may introduce vim) and it ships with HPUX/IRIX and DECs various unix flavours.

    Other advantages include the fact that it works on remote consoles (whether net connection, dumb consoles, console servers et al). So long as you setup the appropriate termcap – on most unixes setting the TERM environment variable to vt100 will suffice.

    (Some solaris consoles – such as the /dev/console you get logging into the box with monitor and mouse attached and not using the gui – will need some stty twiddling to the appropriate rows and columns of the monitor).

    I personally love vi, use it to edit webpages, xml, perl, compose email, and for all my command line file editing.

Leave a Reply

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

You are commenting using your 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