O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

vi Command-Line Editing

Like the vi file editor, the vi command-line editor has two modes:

  • Input mode

  • Command mode

In Input mode, every character you type is inserted into the command line. You see each character as you type it because it is echoed to the screen at the correct location in the command line. You can use the Esc key at any time while in Input mode to switch to end Input mode and change to Command mode. Each time you see the shell prompt, you are automatically put into Input mode so that you can enter UNIX commands.

If you press Esc to end Input mode, you change to Command mode. Then every letter is a command to invoke some sort of vi editing on the command line. What you type does not appear on the screen, but you will see the results ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required