Setting Options for Inserting Text

In vi, the set command enables you to turn on or off various modes in vi. This section looks at modes that enhance text input.

Ignoring Case When Searching Using / or ?

To ignore case when searching ahead for strings using the slash or searching backward using the question mark, enter the following:

:set ignorecase

To turn off this mode, enter this:

:set noignorecase

You can abbreviate this command as ic, as follows:

:set ic
:set noic

Setting vi to Always Show the Input Mode

showmode Is Great for Beginners

It is very common to hear a lot of beeps when beginners first learn to use vi. The beeps indicate errors and many beeps indicate that the beginners are making many errors. One of the most common errors ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.