Skip to Content
Learning the vi and Vim Editors, 7th Edition
book

Learning the vi and Vim Editors, 7th Edition

by Arnold Robbins, Elbert Hannah, Linda Lamb
July 2008
Beginner
492 pages
16h
English
O'Reilly Media, Inc.
Content preview from Learning the vi and Vim Editors, 7th Edition

Important Command-Line Arguments

Although vile does not expect to be invoked as either vi or ex, it can be invoked as view, in which case it will treat each file as read-only. Unlike the other clones, it does not have a line-editor mode.

Here are the important vile command-line arguments:

-c command+ command

vile will execute the given ex-style command. Any number of -c options may be given.

-h

Invokes vile on the help file.

-R

Invokes vile in “read-only” mode; no writes are permitted while in this mode. (This will also be true if vile is invoked as view, or if readonly mode is set in the startup file.)

-t tag

Start editing at the specified tag. The -T option is equivalent and can be used when X11 option parsing eats the -t.

-v

Invokes vile in “view” mode; no changes are permitted to any buffer while in this mode.

-?

vile prints a short usage summary and then exits.

@ cmdfile

vile will run the specified file as its startup file, and will bypass any normal startup file (i.e., .vilerc) or environment variable (i.e., VILEINIT).

A few often-used options are obsolete since vile implements the POSIX -c (or +) option:

-g N

vile will begin editing on the first file at the specified line number. This can also be given as +N.

-s pattern

In the first file, vile will execute an initial search for the given pattern. This can also be given as +/pattern.

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

Learning the vi and Vim Editors, 8th Edition

Learning the vi and Vim Editors, 8th Edition

Arnold Robbins, Elbert Hannah
Vim Masterclass

Vim Masterclass

Jason Cannon
Mastering Vim

Mastering Vim

Ruslan Osipov

Publisher Resources

ISBN: 9780596529833Errata Page