Skip to Main Content
vi and Vim Editors Pocket Reference, 2nd Edition
book

vi and Vim Editors Pocket Reference, 2nd Edition

by Arnold Robbins
January 2011
Intermediate to advanced content levelIntermediate to advanced
94 pages
1h 52m
English
O'Reilly Media, Inc.
Content preview from vi and Vim Editors Pocket Reference, 2nd Edition

Command-Line Options

CommandAction
vi file

Invoke vi on file

vi file1 file2

Invoke vi on files sequentially

view file

Invoke vi on file in read-only mode

vi -R file

Invoke vi on file in read-only mode

vi -r file

Recover file and recent edits after a crash

vi -t tag

Look up tag and start editing at its definition

vi -w n

Set the window size to n; useful over a slow connection

vi + file

Open file at last line

vi +n file

Open file directly at line number n

vi -c command file

Open file, execute command, which is usually a search command or line number (POSIX)

vi +/pattern file

Open file directly at pattern

ex file

Invoke ex on file

ex - file < script

Invoke ex on file, taking commands from script; suppress informative messages and prompts

ex -s file < script

Invoke ex on file, taking commands from script; suppress informative messages and prompts (POSIX)

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro Vim

Pro Vim

Mark McDonnell
Learning the vi and Vim Editors, 7th Edition

Learning the vi and Vim Editors, 7th Edition

Arnold Robbins, Elbert Hannah, Linda Lamb

Publisher Resources

ISBN: 9781449303082Errata Page