Configuring vi

March 15th, 2005

The configuration file for vi is called .exrc and it lives in your home directory.

To change your default vi settings, edit ~/.exrc. For example, add:

set showmode
set number

This displays the current mode (e.g. "INSERT MODE") and displays line numbers.

To temporarily remove the line numbers (e.g. so that you can copy lines without copying the numbers) use the following command in vi:

:set nonu

Potentially similar posts

Leave a comment