Overview
This topic is a brief introduction to the basics of both Vim and Emacs. It is recommended that you try each one and work through testing each of the commands to select which one works best for your workflow. Additional editors on Stampede2 you may want to consider are nano, a simple text editor designed for new users, or gedit, a general-purpose text editor focused on simplicity and ease of use, with a simple GUI. There are also many more, so feel free to explore other options.
Each text editor in Linux has a designed workflow to assist you in editing, and some workflows work better than others depending on your preferences. For example, Emacs relies heavily on key-chords (or multiple key strokes), while Vim uses distinct editing modes. Vim users tend to enter and exit the editor repeatedly and use the shell for complex tasks, while Emacs users typically remain within the editor and use Emacs itself for complex tasks. Most users develop a preference for one text editor and stick with it.
What about Vi?
The Vi editor (command is vi
) is the predecessor
of Vim. Most modern systems actually alias
vi
to vim
so that you are using vim
whenever you enter the vi
command. You can determine if this is
the case by entering the following:
$ which vi
alias vi='vim'
/bin/vim
The line alias vi='vim'
tells you that vim
will be
executed whenever the command vi
is entered. The above output
is actually from Stampede2. For this reason, we will focus on Vim in this tutorial
and not Vi. We will also provide a basic overview of Emacs.