Home » Linux vi Abberviations

Linux vi Abberviations

by Online Tutorials Library

vi Abbreviations

In vi, abbreviations can also be used with command :ab. To undo abbreviation, use command :una.

TIn vi, you can define abbreviations that will automatically expand when you’ll type abbreviation in insert mode.

Syntax:

:ab &ltabbreviation> &ltabbreviatedWord>

:una &ltabbreviatedWord>

Example for ab:

:ab au abbreviation and unabbreviation

Linux vi Abbrevitions1

Look at the above snapshot, we have passed the command to abbreviate in command mode.

Linux vi Abbrevitions2

Look at the above snapshot, in insert mode, after typing au, it is automatically expanded in its full form.

Example for una:

:una abbreviation and unabbreviation

Linux vi Abbrevitions3

Look at the above snapshot, with command una we undo abbreviation au. After typing au, in insert mode, it is not abbreviated.


You may also like