Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Command-Line Options

Because vi and ex are the same program, they share the same options. However, some options only make sense for one version of the program. Options specific to vim are so marked.

+[num]

Start editing at line number num, or the last line of the file if num is omitted.

+/pattern

Start editing at the first line matching pattern. (For ex, fails if nowrapscan is set in your .exrc startup file, since ex starts editing at the last line of a file.)

-b

Edit the file in binary mode. {vim}

-c command

Run the given ex command upon startup. Only one -c option is permitted for vi; vim accepts up to 10. An older form of this option, + command, is still supported.

--cmd command

Like -c, but execute the command before any resource files are read. {vim}

-C

vim : Start the editor in vi-compatible mode.

-d

Run in diff mode. Can also be invoked by running the command vimdiff. {vim}

-D

Debugging mode for use with scripts. {vim}

-e

Run as ex (line editing rather than full-screen mode).

-h

Print help message, then exit. {vim}

-i file

Use the specified file instead of the default (˜/.viminfo) to save or restore vim ’s state. {vim}

-l

Enter Lisp mode for running Lisp programs (not supported in all versions).

-L

List files that were saved due to an aborted editor session or system crash (not supported in all versions). For vim, this option is the same as -r.

-m

Start the editor with the write option turned off so the user cannot write to files. {vim}

-M

Do not allow text in files to be modified. {vim}

-n

Do not use a ...

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

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page