SlideShare a Scribd company logo
3
Most read
7
Most read
9
Most read
VI Editor In Linux 
 Page 1
 Page 2 
Agenda 
WHAT IS VI EDITOR? 
HISTORY OF VI. 
CHARACTERISTIC OF VI. 
STARTING VI 
MODE IN VI EDITOR. 
COMMON VI COMMAND 
HOW TO EXIT FROM VI
 Page 3 
What is Vi Editor? 
 The visual editor on the Linux. 
 The vi editor comes with every version of Linux or Unix. 
 Using vi is similar to using other editors in that you can see your file on the 
screen .. 
 The vi editor is the most popular editor in linux. The current version is 
really "vim", but to invoke it simply type "vi". 
 Before vi the primary editor used on Unix was the line editor 
- User was able to see/edit only one line of the text at a time 
 The vi editor is not a text formatter (like MS Word, Word Perfect, etc.) 
- you cannot set margins 
- center headings 
- Etc…
 Page 4 
History of Vi Editor 
 Although other stories exist, the true one tells that vi was originally written 
by Bill Joy in 1976. 
 Who is Bill Joy you ask? 
- He co-founded Sun Microsystems in 1982 and served as chief scientist until 2003.
 Page 5 
Characteristics of vi 
 The vi editor is: 
- A very powerful 
- It is hard to learn, specially for windows users 
- Move from point to point in the file, and make changes. 
- Available on all UNIX systems
 Page 6 
Starting vi 
 Type vi <filename> at the shell prompt 
 After pressing enter the command prompt disappears and you see tilde(~) 
characters on all the lines 
 These tilde characters indicate that the line is blank
 Page 7 
Vi modes 
 There are three modes in vi 
- Command mode 
- Accessed by typing Esc 
- In this mode all the keys pressed by the user are interpret to the editor 
command. 
- Input mode 
- Accessed by typing “i” 
- This mode permits insertion of new text, editing of existing text or 
replacement of existing text. 
Ex mode( Last Line Mode) 
-The bottom line of the vi screen is called ex mode. 
- When you start vi by default it is in command mode 
-You exit the input mode by pressing the Esc key to get back 
to the command mode.
 Page 8 
VI EDITING MODES 
Command 
Mode 
Input 
Mode 
Last-Line 
Mode 
Esc 
Insert (i, I) 
Append (a, A), 
Open (o, O) 
Change (c), 
Replace (r, R) 
: Return
 Page 9 
Common Vi Commands 
 Moving Cursor Position 
 You can move around only when you are in the command mode 
 Arrow keys usually works(but may not) 
 The standard keys for moving cursor are: 
- h - for left 
- l - for right 
- j - for down 
- k - for up 
 w - to move one word forward 
 b - to move one word backward 
 $ - takes you to the end of line 
 <enter> takes the cursor the beginning of next line
 Page 10 
Conti.. 
 - - (minus) moves the cursor to the first character in the current line 
 H - takes the cursor to the beginning of the current screen Home position) 
 L - moves to the Lower last line 
 M - moves to the middle line on the current screen
 Page 11 
Conti.. 
 Control-d scrolls the screen down (half screen) 
 Control-u scrolls the screen up (half screen) 
 Control-f scrolls the screen forward (full screen) 
 Control-b scrolls the screen backward (full screen).
 Page 12 
Editing text 
 x - deletes the current character 
 d - is the delete command but pressing only d will not delete anything you 
need to press a second key 
- dw - deletes to end of word 
- dd - deletes the current line 
- d0 - deletes to beginning of line 
 There are many more keys to be used with delete command 
 The vi commands can be used followed by a number such as 
n<command key(s)> 
- For example dd deletes a line 5dd will delete five lines.
 Page 13 
Copy, cut and paste in vi 
 yy - (yank) copy current line to buffer 
 nyy - Where n is number of lines 
 p - Paste the yanked lines from buffer to the line below 
 P - Paste the yanked lines from buffer to the line above
 Page 14 
Undo and repeat command 
 u - undo the changes made by editing commands 
 . - (dot or period) repeats the last edit command
 Page 15 
How to exit from vi 
(command mode) 
 ZZ is for save and Exit (Note this command is uppercase) 
 :q <enter> is to exit, if you have not made any changes to the file
 Page 16 
Thank You

More Related Content

What's hot (20)

PPTX
Vi editor
ParikshitTaksande1
 
PPT
Architecture of Linux
SHUBHA CHATURVEDI
 
PPTX
Linux file system
Md. Tanvir Hossain
 
PPTX
VI editor in unix
Ahmed Fayyaz
 
PPTX
Linux commands
Mannu Khani
 
PPT
Unix File System
student(MCA)
 
PDF
OS - Process Concepts
Mukesh Chinta
 
PPT
Linux Administration
Harish1983
 
PPT
Introduction to System Calls
Vandana Salve
 
PPTX
Free Space Management, Efficiency & Performance, Recovery and NFS
United International University
 
PPTX
System calls
Bernard Senam
 
PPTX
Presentation on Operating System & its Components
Mahmuda Rahman
 
PPT
System call
Sumant Diwakar
 
PPT
Linux architecture
mcganesh
 
PPTX
file system in operating system
tittuajay
 
PPT
Linux file system
Burhan Abbasi
 
PPTX
File Management in Operating System
Janki Shah
 
PPT
Disk management
Agnas Jasmine
 
PDF
Intro to Linux Shell Scripting
vceder
 
PPTX
Different types of Editors in Linux
Bhavik Trivedi
 
Architecture of Linux
SHUBHA CHATURVEDI
 
Linux file system
Md. Tanvir Hossain
 
VI editor in unix
Ahmed Fayyaz
 
Linux commands
Mannu Khani
 
Unix File System
student(MCA)
 
OS - Process Concepts
Mukesh Chinta
 
Linux Administration
Harish1983
 
Introduction to System Calls
Vandana Salve
 
Free Space Management, Efficiency & Performance, Recovery and NFS
United International University
 
System calls
Bernard Senam
 
Presentation on Operating System & its Components
Mahmuda Rahman
 
System call
Sumant Diwakar
 
Linux architecture
mcganesh
 
file system in operating system
tittuajay
 
Linux file system
Burhan Abbasi
 
File Management in Operating System
Janki Shah
 
Disk management
Agnas Jasmine
 
Intro to Linux Shell Scripting
vceder
 
Different types of Editors in Linux
Bhavik Trivedi
 

Viewers also liked (20)

PDF
The "vi" Text Editor
Alessandro Manfredi
 
PPTX
Vi editor
Er Mittinpreet Singh
 
PDF
Vi Editor
Shiwang Kalkhanda
 
PPTX
Vi editor
Nidhi Sharma
 
PPT
Linux command ppt
kalyanineve
 
PPT
Introduction to vi editor
U.P Police
 
ODP
Linux Introduction (Commands)
anandvaidya
 
PPTX
File permission in linux
Prakash Poudel
 
PPT
Basic Unix
Rajesh Kumar
 
ODP
Linux commands
Balakumaran Arunachalam
 
ODP
An Introduction to Linux
anandvaidya
 
PDF
Linux File System
Anil Kumar Pugalia
 
PPTX
Linux.ppt
onu9
 
DOC
Hacking for Dummies 2
Chandra Pr. Singh
 
PDF
Permission chmod
mfstep
 
PDF
Linux : Booting and runlevels
John Ombagi
 
PPTX
sistemas operativos
HernanRP2014
 
PDF
Linux ud4 - editor vi
Javier Muñoz
 
PDF
Chmod
Any Saula
 
PPTX
Archivos y Directorios
Mayra Almache
 
The "vi" Text Editor
Alessandro Manfredi
 
Vi editor
Nidhi Sharma
 
Linux command ppt
kalyanineve
 
Introduction to vi editor
U.P Police
 
Linux Introduction (Commands)
anandvaidya
 
File permission in linux
Prakash Poudel
 
Basic Unix
Rajesh Kumar
 
Linux commands
Balakumaran Arunachalam
 
An Introduction to Linux
anandvaidya
 
Linux File System
Anil Kumar Pugalia
 
Linux.ppt
onu9
 
Hacking for Dummies 2
Chandra Pr. Singh
 
Permission chmod
mfstep
 
Linux : Booting and runlevels
John Ombagi
 
sistemas operativos
HernanRP2014
 
Linux ud4 - editor vi
Javier Muñoz
 
Chmod
Any Saula
 
Archivos y Directorios
Mayra Almache
 
Ad

Similar to Vi editor in linux (20)

DOCX
swl--3 (1).docx
HimanshuKimothi
 
PPTX
lectuer 21-22.pptx
poonam256394
 
PPTX
Vi Vi Editor Unit 4 Power point presentation
jatinlntcdc
 
PDF
1_Editors_in_Unix
Gautam Raja
 
PPTX
Text editor In RHEL
Varnnit Jain
 
PPT
07 vi text_editor
Shay Cohen
 
PDF
Productive text editing with Vim
bryanbibat
 
ODP
Augusta Linux User Group - Vim Introduction
Keith Pickett
 
PPTX
VI Editor - R.D.Sivakumar
Sivakumar R D .
 
PPTX
Introduction to Vim
Brandon Liu
 
PDF
Tuffarsi in vim
sambismo
 
PDF
Vi survival guide
Jadesh Chanda
 
PPTX
Vi and redirection & piping in linux
Neethu Jose
 
PDF
What is Vim?
Tatiana Tylosky
 
PDF
Vim Book
Maurício Sousa
 
PPT
Basic linux day 4
Saikumar Daram
 
PPTX
Unit -6_linux operating system_1234.pptx
ubalearchana6
 
PDF
Editing Tricks in Vim editor: The Power of dyp
Ramnath Banerjee
 
PPT
1359 Vi Editor
techbed
 
PDF
Using VI Editor in Red Hat by Rohit Kumar
Rohit Kumar
 
swl--3 (1).docx
HimanshuKimothi
 
lectuer 21-22.pptx
poonam256394
 
Vi Vi Editor Unit 4 Power point presentation
jatinlntcdc
 
1_Editors_in_Unix
Gautam Raja
 
Text editor In RHEL
Varnnit Jain
 
07 vi text_editor
Shay Cohen
 
Productive text editing with Vim
bryanbibat
 
Augusta Linux User Group - Vim Introduction
Keith Pickett
 
VI Editor - R.D.Sivakumar
Sivakumar R D .
 
Introduction to Vim
Brandon Liu
 
Tuffarsi in vim
sambismo
 
Vi survival guide
Jadesh Chanda
 
Vi and redirection & piping in linux
Neethu Jose
 
What is Vim?
Tatiana Tylosky
 
Vim Book
Maurício Sousa
 
Basic linux day 4
Saikumar Daram
 
Unit -6_linux operating system_1234.pptx
ubalearchana6
 
Editing Tricks in Vim editor: The Power of dyp
Ramnath Banerjee
 
1359 Vi Editor
techbed
 
Using VI Editor in Red Hat by Rohit Kumar
Rohit Kumar
 
Ad

Recently uploaded (20)

PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 

Vi editor in linux

  • 1. VI Editor In Linux  Page 1
  • 2.  Page 2 Agenda WHAT IS VI EDITOR? HISTORY OF VI. CHARACTERISTIC OF VI. STARTING VI MODE IN VI EDITOR. COMMON VI COMMAND HOW TO EXIT FROM VI
  • 3.  Page 3 What is Vi Editor?  The visual editor on the Linux.  The vi editor comes with every version of Linux or Unix.  Using vi is similar to using other editors in that you can see your file on the screen ..  The vi editor is the most popular editor in linux. The current version is really "vim", but to invoke it simply type "vi".  Before vi the primary editor used on Unix was the line editor - User was able to see/edit only one line of the text at a time  The vi editor is not a text formatter (like MS Word, Word Perfect, etc.) - you cannot set margins - center headings - Etc…
  • 4.  Page 4 History of Vi Editor  Although other stories exist, the true one tells that vi was originally written by Bill Joy in 1976.  Who is Bill Joy you ask? - He co-founded Sun Microsystems in 1982 and served as chief scientist until 2003.
  • 5.  Page 5 Characteristics of vi  The vi editor is: - A very powerful - It is hard to learn, specially for windows users - Move from point to point in the file, and make changes. - Available on all UNIX systems
  • 6.  Page 6 Starting vi  Type vi <filename> at the shell prompt  After pressing enter the command prompt disappears and you see tilde(~) characters on all the lines  These tilde characters indicate that the line is blank
  • 7.  Page 7 Vi modes  There are three modes in vi - Command mode - Accessed by typing Esc - In this mode all the keys pressed by the user are interpret to the editor command. - Input mode - Accessed by typing “i” - This mode permits insertion of new text, editing of existing text or replacement of existing text. Ex mode( Last Line Mode) -The bottom line of the vi screen is called ex mode. - When you start vi by default it is in command mode -You exit the input mode by pressing the Esc key to get back to the command mode.
  • 8.  Page 8 VI EDITING MODES Command Mode Input Mode Last-Line Mode Esc Insert (i, I) Append (a, A), Open (o, O) Change (c), Replace (r, R) : Return
  • 9.  Page 9 Common Vi Commands  Moving Cursor Position  You can move around only when you are in the command mode  Arrow keys usually works(but may not)  The standard keys for moving cursor are: - h - for left - l - for right - j - for down - k - for up  w - to move one word forward  b - to move one word backward  $ - takes you to the end of line  <enter> takes the cursor the beginning of next line
  • 10.  Page 10 Conti..  - - (minus) moves the cursor to the first character in the current line  H - takes the cursor to the beginning of the current screen Home position)  L - moves to the Lower last line  M - moves to the middle line on the current screen
  • 11.  Page 11 Conti..  Control-d scrolls the screen down (half screen)  Control-u scrolls the screen up (half screen)  Control-f scrolls the screen forward (full screen)  Control-b scrolls the screen backward (full screen).
  • 12.  Page 12 Editing text  x - deletes the current character  d - is the delete command but pressing only d will not delete anything you need to press a second key - dw - deletes to end of word - dd - deletes the current line - d0 - deletes to beginning of line  There are many more keys to be used with delete command  The vi commands can be used followed by a number such as n<command key(s)> - For example dd deletes a line 5dd will delete five lines.
  • 13.  Page 13 Copy, cut and paste in vi  yy - (yank) copy current line to buffer  nyy - Where n is number of lines  p - Paste the yanked lines from buffer to the line below  P - Paste the yanked lines from buffer to the line above
  • 14.  Page 14 Undo and repeat command  u - undo the changes made by editing commands  . - (dot or period) repeats the last edit command
  • 15.  Page 15 How to exit from vi (command mode)  ZZ is for save and Exit (Note this command is uppercase)  :q <enter> is to exit, if you have not made any changes to the file
  • 16.  Page 16 Thank You