O'Reilly logo

vi Editor Pocket Reference by Arnold Robbins

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

vile—vi Like Emacs

Important Command-Line Arguments

–?

vile prints a short usage summary and exits.

–g N

vile begins editing on the first file at the specified line number; this can also be given as +N.

–s pattern

In the first file, vile executes an initial search for the given pattern; this can also be given as +/pattern.

–h

Invokes vile on the help file.

–R

Invokes vile in “readonly” mode; no writes are permitted while in this mode.

–v

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

@cmdfile

vile runs the specified file as its startup file and bypasses any normal startup file.

vile Window Management Commands

Command

Key Sequence(s)

Function

delete-other-windows

^O, ^X 1

Eliminate all windows except the current one

delete-window

^K, ^X 0

Destroy the current window, unless it's the last one

edit-file, E, e^X e

Bring given (or under-cursor, for ^X e) file or existing buffer into window

find-file

 

grow-window

V

Increase the size of the current window by count

move-next-window-down

^A ^E

Move next window down (or buffer up) by count lines

move-next-window-up

^A ^Y

Move next window up (or buffer down) by count lines

move-window-left

^X ^L

Scroll window to left by count columns, half screen if count unspecified

move-window-right

^X ^R

Scroll window to right by count columns, half screen if count unspecified

next-window

^X o

Move to the next window

position- window

z where

Reframe with cursor specified by where, as follows: center (., M, m), top (RETURN, H, t), or bottom (-, L, b)

previous- window ...

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