It has the same demonic characteristics of other UNIX concepts like daemons and pipes. It has a steep learning curve but it is worth the effort since the power and versatility of vi cannot be matched. Vim stands for Vi IMproved and was developed by Bram Moolenaar. That took vi to the next level making it run even on Microsoft Windows. Many people like to differentiate between vi, nvi and vim. There are plenty of subtle differences and vim today is so feature rich and powerful that one can argue that there is a certain feature bloat. Whatever it is, there is no editor I know that can highlight syntax of various file formats like vim. Syntax highlighting can be a boon for serious programmers and network administrators who spend countless hours working and are given to carelessness after a sleepless night. Vim would clearly show simple errors and typos even before you write the file to disk. The online documentation is so comprehensive and user friendly that you don't have to go out of vim or google for figuring out the way to achieve common tasks. At the same time there is a lot to learn and most of the features stay unused. However if you learn to use vim well you do not need to learn any other editor since you can use it for every single editing purpose. I type my e-mails in vim, I am writing this document in vim, I code using vim (but of course) and nowadays I benefit by its spell checking capability. It has got a powerful plugin and scripting capability using which you can use third party add ons. You can find plenty of them at www.vim.org. You can very easily add key mappings for executing arbitrary commands. For instance, one thing I often need is the ability to delete from the current line till the end of the file. This need often arises while sending replies to e-mails. Hence I have this mapping in my .vimrc. nmap :,$d You can get really creative and use input and output filtering using vim's shell I/O mechanism. There is support for tabs starting version 7.0 and you can open multiple files in separate tabs using the command. $vim -p file1.txt file2.txt ... You can open multiple tabs and switch between tabs using the "gt" hotkey sequence. You can open a new tab from inside of vim using :tabnew file.txt Inside each tab you can open multiple files as usual using the traditional vi mechanism. But vi is an editor and editor alone. It does not try to be everything to everybody. Sometimes I feel that is what makes vim charming. You can enable spell checking with this. :se spell spelllang=en_us Vim has a powerful folding feature which is not often talked about. You can create folds and remove them just like you would fold paper or clothes. For instance if you wish to fold the first 10 lines of a file, just typethis. :1,10fold You can open folds by typing "zo" at a fold. Most fold operations start with the 'z' key. For more details type :help fold from inside vim. One important detail needs to be told about vim help documentation navigation. You see certain words and phrases highlighted with a turquoise color. Those are links and you can "click that link" by pressing the Ctrl-] key combination. This is the standard way of going to function definitions whilst using c tags. Of course I merge source files with vim or vimdiff to be precise. Differences are highlighted so well and in massive software projects highlighting the diff output can be inevitable. This often occurs when using a revision control system like cvs or svn. Vim can format paragraphs using the '=' operator. You can right justify or left justify by selecting the paragraph either by using the 'v' operator or colon and line range. After that you type a colon command like this. :1,10le:1,10ce:1,10ri for left justified, centered and right justified text. For counting the number of words in a file type the"g Ctrl-g" key combo. You can write simple vim scripts using the builtin functions or create your own. A function is created by using the :function .Note that command names and function names have to begin with an Uppercase letter. Happy vimming! |