Below is part 1 of my VIM related series of posts. In the series I’ll try to explain what is VIM and how is it different from “Windows- oriented” popular text editors such as Notepad++, I’ll list some of my favorite extensions for VIM and of course in both parts I’ll give links to resources that should help you get started.
VIM (and here from Wikipedia) is one of the two most popular text editors (together with Emacs) in the Linux world. It is widely used by system administrators and developers. It has a steep learning curve but mastering it is *very* rewarding eventually.
Here are some VIM principles:
1. Being loyal to the general GNU/Linux approach, VIM is *your* text editor. Meaning it can be customized up to “bear bone” level. Everything from colors, through shortcuts, key mappings and up to making vim greet you every time you open it can be customized to your need and taste.
2. No GUI, and I (personally) prefer it this way. Let’s focus on the important things and not on the superficial stuff 🙂
Here is how it looks with two different color schemes for example:
(Nightwish colorscheme. Credit: http://mamchenkov.net/)
(Zenburn color scheme. Courtesy of StackExchange).
3. Lightweight and installed by default on every Linux system regardless of distribution.
4. No GUI – No use of the mouse. When you are vimming around, it can take a nap.
5. POWER. No mouse, no waste of time -> higher efficiency. It’s hard to overstate VIM’s power. Want to put a file’s content into the file you are currently editing? No problem. Press :r filename and here you go. Forget about dragging the mouse->pressing open->selecting the file->selecting all the file’s content-> getting back to your original file->pressing paste (whoa, it was exhausting even to write it). Want to run a program without leaving VIM? No problem, press :! command_name and here you go. Doing some repetitive actions every time you work on a document? (for instance,removing extra white spaces, adding a signature and then saving the file?) waste time no more, record a VIM macro and insert it when you need it with a press of a button.
6. Extensions, Extensions, Extensions. VIM has a HUGE amount of extensions available for almost every need. Want a new color scheme? you have it. Want a file explorer built it? you got it. Want to run code from VIM itself? no problem. Just name it and there is a great chance you’ll have it out of the box.
What’s next? To get yourself started with VIM I recommend the two following resources:
1. If you prefer screencasts check out Derek’s great tutorials.
2. If you prefer reading, check out VIM Tips Wiki.
See you in part 2 🙂