You are previewing vi and Vim Editors Pocket Reference, 2nd Edition.

vi and Vim Editors Pocket Reference, 2nd Edition

Cover of vi and Vim Editors Pocket Reference, 2nd Edition by Arnold Robbins Published by O'Reilly Media, Inc.
  1. vi and Vim Editors Pocket Reference
  2. 1. vi and Vim Editors Pocket Reference
    1. Introduction
    2. Conventions
    3. Acknowledgments
    4. Command-Line Options
    5. vi Commands
      1. Movement Commands
      2. Editing Commands
      3. Exit Commands
      4. Solaris vi Command-Mode Tag Commands
      5. Buffer Names
      6. Buffer and Marking Commands
    6. Input Mode Shortcuts
      1. Word Abbreviation
      2. Command and Input Mode Maps
      3. Executable Buffers
      4. Automatic Indentation
    7. Substitution and Regular Expressions
      1. The Substitute Command
      2. vi Regular Expressions
      3. POSIX Bracket Expressions
      4. Metacharacters Used in Replacement Strings
      5. More Substitution Tricks
    8. ex Commands
      1. Command Syntax
      2. Address Symbols
      3. Command Option Symbols
      4. Alphabetical List of Commands
    9. Initialization
    10. Recovery
    11. vi set Options
    12. Nothing like the Original
    13. Enhanced Tags and Tag Stacks
      1. Exuberant ctags
      2. Solaris vi Tag Stacking
    14. Vim—vi Improved
      1. Important Command-Line Options
      2. Vim Window Management
      3. Tabbed Editing
      4. Vim Extended Regular Expressions
      5. Command-Line History and Completion
      6. Tag Stacks
      7. Edit-Compile Speedup
      8. Programming Assistance
      9. Folding and Unfolding Text
      10. Insertion Completion Facilities
      11. Diff Mode
      12. Vim Scripting
      13. Vim set Options
    15. nvi—New vi
      1. Important Command-Line Options
      2. nvi Window Management Commands
      3. nvi Extended Regular Expressions
      4. Command-Line History and Completion Options
      5. Tag Stacks
      6. nvi 1.79 set Options
    16. elvis
      1. Important Command-Line Options
      2. elvis Window Management
      3. elvis Extended Regular Expressions
      4. Command-Line History and Completion Movement Keys
      5. Tag Stacks
      6. Edit-Compile Speedup
      7. elvis 2.2 set Options
    17. vile—vi like Emacs
      1. Important Command-Line Options
      2. vile Window Management Commands
      3. vile Extended Regular Expressions
      4. Command-Line History and Completion
      5. Tag Stacks
      6. Edit-Compile Speedup
      7. vile 9.8 set Options
    18. Internet Resources for vi
    19. Program Source and Contact Information
  3. Index
  4. About the Author
  5. Copyright
O'Reilly logo

vile—vi like Emacs

vile is a vi clone based originally on MicroEmacs, whose main goal is to provide the “finger feel” of vi.

Important Command-Line Options

-g N

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

-h

Invokes vile on the help file.

-R

Invokes vile in “read-only” mode; no writes are permitted while in this mode.

-s pattern

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

-v

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

-?

vile prints a short usage summary and exits.

@ cmdfile

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

vile Window Management Commands

Command

Key sequences

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-fileEe find-file

^X e

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

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 ...

The best content for your career. Discover unlimited learning on demand for around $1/day.