The vi editor (short for visual editor) is a screen editor which is available on almost all Unix systems.  vi is a text editor, not a “WYSIWYG" word processor vi has no menus but instead uses combinations of keystrokes in order to accomplish commands.
Lets you add, change, and delete text but does not provide such formatting capabilities as centering lines or indenting paragraphs. Can be used from any type of terminal
At the Unix prompt type  vi  followed by a file name.  vi  filename Then hit  Return . You will see a screen similar to the one below which shows blank lines with tildes and the name and status of the file.  ~ ~ "myfile" [New file]
 
 
Command mode Insert mode
In command mode, the letters of the keyboard perform editing functions. Press escape <Esc> key to enter in command mode.  In insert mode, the letters you type form words and sentences.  Press the alphabet i to enter in insert mode.
 
KEY h   j   k   l   CURSOR MOVEMENT left one space  down one line  up one line  right one space
x     delete character dw     delete word dd     delete line cw     replace a word J     join succeeding line to  current cursor line u     undo last change
w     Forward word by word b     Backward word by word $     To end of line 0     To beginning of line H     to top line of screen  M     to middle line of screen  L     to last line of screen  G     to last line of file
1G     to first line of file  <Control>f     scroll forward one screen  <Control>b     scroll backward one screen <Control>d     scroll down one-half screen <Control>u     scroll up one-half screen
:q or ZZ     save file and then quit  :w    save file :q!     discard changes and quit file  :q     quit
SOME  EXAMPLES
 
 
 
 
 
 
 
 
 
THANK  YOU

1359 Vi Editor

  • 1.
  • 2.
    The vi editor(short for visual editor) is a screen editor which is available on almost all Unix systems. vi is a text editor, not a “WYSIWYG&quot; word processor vi has no menus but instead uses combinations of keystrokes in order to accomplish commands.
  • 3.
    Lets you add,change, and delete text but does not provide such formatting capabilities as centering lines or indenting paragraphs. Can be used from any type of terminal
  • 4.
    At the Unixprompt type vi followed by a file name. vi filename Then hit Return . You will see a screen similar to the one below which shows blank lines with tildes and the name and status of the file. ~ ~ &quot;myfile&quot; [New file]
  • 5.
  • 6.
  • 7.
  • 8.
    In command mode,the letters of the keyboard perform editing functions. Press escape <Esc> key to enter in command mode. In insert mode, the letters you type form words and sentences. Press the alphabet i to enter in insert mode.
  • 9.
  • 10.
    KEY h  j  k  l  CURSOR MOVEMENT left one space down one line up one line right one space
  • 11.
    x  delete character dw  delete word dd  delete line cw  replace a word J  join succeeding line to current cursor line u  undo last change
  • 12.
    w  Forward word by word b  Backward word by word $  To end of line 0  To beginning of line H  to top line of screen M  to middle line of screen L  to last line of screen G  to last line of file
  • 13.
    1G  to first line of file <Control>f  scroll forward one screen <Control>b  scroll backward one screen <Control>d  scroll down one-half screen <Control>u  scroll up one-half screen
  • 14.
    :q or ZZ  save file and then quit :w  save file :q!  discard changes and quit file :q  quit
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.