Basic Vim Editing
The Vim editor is one of the most powerful text editors around. It is also extremely efficient, enabling the user to edit files with a minimum of keystrokes. This power and functionality comes at a cost, however: When getting started, users face a steep learning curve.
This article teaches you the basic set of 10 Vim commands you need to get started editing. In this article, you learn the following:
The four basic movement commands
How to insert and delete text
How to get help (very important)
Exiting the editor
After you get these commands down pat, you can learn the more advanced editing commands.
Before You Start
If you have not installed Vim, you have to install the editor.
If you are running on UNIX, execute the following command:
$ touch ~/.vimrc
By creating a ~/.vimrc, you tell Vim that you want to use it in Vim mode. If this file is not present, Vim runs in Vi-compatibility mode and you lose access to many of the advanced Vim features. However, you can enable the advanced features from within Vim at any time with this command: :set nocompatible<Enter>.
If you are running on Microsoft Windows, the installation process creates the Microsoft Windows version of this file, _vimrc, for you.