Vi Summary

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Vi Summary as PDF for free.

More details

  • Words: 273
  • Pages: 1
Vi Editor Command Summary Common vi Editor commands This vi editor command summary is provided to help students get a quick start in the use of this editor in the Harris Computer Lab. Bold letters indicate the command and italics indicate a sample file name or a real file which you would enter in your command line. It is recommended that you obtain a current UNIX manual to use in conjunction with this guide. Use the UNIX command “man vi” to learn additional vi commands. The vi editing session operates in two modes, <Esc>+ for insert mode for entering text, and <Esc>+ for operating in command mode. + indicates keystrokes to be entered in sequence. _ indicates a space.

vi Editor command Open a file Save a file Save with new name Quit editing, no save Insert text

Syntax vi file1 <Esc>+<:>+w+! <Esc>+<:>+w+_+file1 <Esc>+<:>+q+! <Esc>+i++<Esc>

Description Open program in command mode Saves a file with current file name Saves a file with new name specified Quit edit session without saving Enter text before cursor until finished, then <Esc>

Append text

Enter text after cursor until finished, then <Esc>

Delete text

<Esc>+a++<Esc> <Esc>+x

Delete line Search for pattern Delete word

<Esc>+dd <Esc>+/+ <Esc> + dw

Position cursor, strike x for each character you wish to remove Position cursor, strike key for each line you wish to remove Position cursor, strike <Esc>+/+”findthis” Delete word (into buffer)

Undo

<Esc> + u

Undo last command

Join two lines Line number

<Esc> + J <Esc> + <:> + nu

Join next line to end of current line Display current line number

(Revised 02/26/04) vi-editor.doc

Related Documents

Vi Summary
June 2020 1
Vi
November 2019 54
Vi
November 2019 58
Vi
November 2019 55
Vi
May 2020 31