Since quite a while, I have intended to write a short Vim tutorial. I do not plan it to be a very detailed guide, I just want to show some of the features of Vim I use often. In this first chapter I explain what Vim is and what it can do for you.
Vim is a command-line oriented editor. This is true even though there are some gui-oriented, vim-based alternatives (gvim, for instance). It is based on the ancient Vi, but Vim stands for Vi (i)Mproved, as it provides more powerful features. Some of the things which can be done with Vim:
- Syntax highlighting
- Several buffers
- Several viewports (like windows inside the main window)
- Tabs (since Vim 7)
- Auto completion
- Automatic indentation
- Executing shell commands and read their output into a buffer
As can be seen, Vim is specially indicated for programmers, but its scope is much wider.
Spending some time to learn Vim is never a waste of time, as it is the defacto editor in most distributions both linux and other Unixes. It is also my first option when I am connected to a machine via ssh and I need to edit a file. It is simple, powerful and not resource hungry at all.
One of the first things to know about Vim is that it works in several different modes (this is one of the drawbacks of Vim, as its detractors say). Though it provides several modes, there are a some outstanding ones because of their importance:
- Normal mode: The default. For typing commands.
- Insert mode: What is typed is shown on the screen (as a normal editor does)
- Command-line mode: For typing commands at the bottom of the screen
- Visual mode: For moving around the text (the screen) selecting portions of it (as if you selected them with a mouse)
There are other modes (ex-mode, replace mode, etc…) but I am not going to introduce them in this first issue. One can easily change from one mode to the other, using specific key combinations.
If you want to learn in advance, I recommend you the excelent tutorial vimtutor that is probably installed if Vim is already installed.
Enjoy!
Add your comment below, or trackback from your own site.
Subscribe to these comments.
Be nice. Keep it clean. Stay on topic. No spam.
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>