'vi' Commands to Insert and Change Text

This section provides a list of commands to insert, delete, replace and move text.

Here is a list of 'vi' commands to insert new text into the text file:

   a{text}<Esc>
     Insert text after the cursor

   A{text}<Esc>
     Insert text after the end of the line

   i{text}<Esc>
     Insert text at the cursor

   I{text}<Esc>
     Insert text at the beginning of the line

   o{text}<Esc>
     Insert a new line after the current line

   O{text}<Esc>
     Insert a new line before the current line

Here is a list of 'vi' commands to delete text from the text file:

   [n]x
      Delete the character at cursor position n times

   [n]X
      Delete the character before the cursor position n times

   D
      Delete the rest of the line

   [n]d{motion}
      Delete text from the cursor position to where the motion ends
      For example 'd$' deletes text from the cursor position to the
      end of current line.

   [n]dd
      Delete the current line n times

Here is a list of 'vi' commands to replace text with new text:

   r<char>
      Replace one character

   R{text}<Esc>
      Replace text

   [n]s{text}<Esc>
      Substitute text for at least n characters

   [n]S{text}<Esc>
      Substitute text for at least n lines

Here is a list of 'vi' commands to move text:

   [n]y{motion}
      Yank text from the cursor position to where motion ends
      for n times. The text will save in undo or named buffer.

   [n]yy
      Yank the current line n times

   p
      Put undo or named buffer after the cursor

   P
      Put undo or named buffer before the cursor

   [n]>{motion}
      Shift left from the current line to the line where motion ends

   [n]<{motion}
      Shift right from the current line to the line where motion ends

   [n]>>
      Shift left the current line n times

   [n]<<
      Shift right the current line n times

Table of Contents

 About This Book

 2002 - .NET Framework Developed by Microsoft

 1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf

 1995 - Java Language Developed by Sun Microsystems

 1991 - WWW (World Wide Web) Developed by Tim Berners-Lee

 1991 - Gopher Protocol Created by a University of Minnesota Team

 1984 - X Window System Developed a MIT Team

 1984 - Macintosh Developed by Apple Inc.

 1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman

 1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer

 1978 - Bash (Bourne-Again Shell) Developed by Brian Fox

 1978 - The C Shell Developed by Bill Joy

 1977 - The Bourne Shell Developed by Stephen Bourne

 1977 - Apple II Designed by Steve Jobs and Steve Wozniak

1976 - vi Text Editor Developed by Bill Joy

 What Is vi Text Editor

 'vi' Commands to Move Cursor and Search for Locations

'vi' Commands to Insert and Change Text

 'vi' Miscellaneous Commands in 'ex' Line Mode

 1974 - Internet by Vinton Cerf

 1972 - C Language Developed by Dennis Ritchie

 1971 - FTP Protocol Created by Abhay Bhushan

 1970 - UNIX Operating System Developed by AT&T Bell Labs

 1957 - FORTRAN Language Developed by IBM

 References

 Full Version in PDF/EPUB