DistributedNetworks DistributedNetworks


vi editing  «Prev  Next»

Text abbreviations

In vi, begin the :ab command, which drops your cursor to the status line.
In vi, begin the :ab command, which drops your cursor to the status line. Continue by typing the abbreviation tsh, followed by its definition, Town Square Harmonizers.

After entering the :ab command, continue editing the file. In text mode, change the word.
After entering the :ab command, continue editing the file. In text mode, change the word.
Although the status line is now inactive, the ab: command continues to appear until the status line is redrawn ( by another ex command, for example)

After typing tsh and then a space, the text abbreviation is triggered.

Return to command made by pressing Escape. Then enter :w to save your changes. As a result, the status line changes to display the file name, quartet, followed by the number of lines and characters in the file.

By using the :ab command without arguments, it lists your current abbreviations. As you can see, there is only one. The first column, .tsh is the internal name and is always the same as the second column tsh, which lists the abbreviation.

If you quit vi, you lose any abbreviations that you defined during the session. You also can turn off abbreviations without quitting vi, as show here. In this example:unab tsh is used to temporarily disable the abbreviation.