Abbreviations
We have already taken one short sojourn into the ~/.vimrc
file and we will now revisit this file to look at abbreviations or abbr
controls. This file acts as the run control mechanism for the vim
text editor, which is likely to be installed on your Linux distribution. Older distributions or Unix variants may have the original vi
text editor and will make use of the ~/.exrc
file. If you are uncertain of the identity of your version of vi
and the correct run control file to use, simply, enter the vi
command. If a blank page opens, it is indeed vi
. However, if a new blank document opens with the vim
splash screens, then you are using the improved vim
or Vi
.
Abbreviations allow for a shortcut string to be used in place of a longer string. These abbreviations can be set during a vim
session from the last line mode but are often set in the control file. The shebang can be easily represented by an abbreviation, as follows:
abbr _sh #!/bin/bash
The basic syntax of an abbreviation is...