Linux Vi Abbreviations

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

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

:una

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.