Appendix F: vi Quick Reference
Michael J. Moorhouse, Paul Barry · 2004
This quick reference will get you started.To learn more, from the Linux commandline, type man vi. Invoking the viText Editor vi -Start the vi editor with an empty edit buffer vi file -Edit a file called file vi +n file -Edit a file called file and go to line n vi +/pattern file -Edit a file called file and go to the first line that matches the string pattern vi's Modes vi can be in one of three modes: Edit mode -Keys typed are added to the edit buffer Non-edit mode -Keys typed adjust or move around the edit buffer ex mode -Commands are executed within vi, which affect the edit buffer To enter edit mode, press the Esc key, then type i To enter non-edit mode, simply press Esc To enter ex mode, press Esc, then type