vi editing  «Prev 

Text abbreviations

1) 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.

2) 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)

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

4) Return to command made by pressing Escape.
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.

5)By using the :ab command without arguments, it lists your current abbreviations. As you can see, there is only one.
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.

6) If you quit vi, you lose any abbreviations that you defined during the session. You also can turn off abbreviations without quitting vi,
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.