VI Text Editor with Commands: Linux/Unix

VI Text Editor with Commands: Linux/Unix 


The VI editor is the most popular text editor in the Linux. Below, are some reasons which make it a easy used editor –
  1. It is available in almost all Linux Distributions
  2. It works the same across different Distributions
  3. It is user-friendly
VI Text Editor with Commands: Linux/Unix
VI Text Editor with Commands: Linux/Unix

  • i – Insert at cursor (into insert mode)
  • a – Write after cursor (into insert mode)
  • A – Write at the end of line (into insert mode)
  • u – Undo last change
  • U – Undo all changes to the entire line
  • ESC – Terminate insert mode. This mode we will not able to insert data into the file
  • o – Open a new line (into insert mode)
  • dd – Delete line (in ESC mode use dd)
  • 3dd – Delete 3 lines (in ESC mode use 3dd)
  • D – Delete contents of line after the cursor
  • C – Delete contents of a line after the cursor and insert new text. Press ESC key to end insertion
  • dw – Delete word ((in ESC mode use dw)
  • 4dw – Delete 4 words ((in ESC mode use 4dw)
  • cw – Change word ((in ESC mode use cw)
  • x – Delete character at the cursor ((in ESC mode use x)r – Replace character ((in ESC mode use r)
  • R – Overwrite characters from cursor onward ((in ESC mode use R)
  • / – Find the word ((in ESC mode use)

Related Posts

Leave a Reply

Your email address will not be published.