SlideShare a Scribd company logo
3
Most read
7
Most read
11
Most read
Introduction to
vi editor
 Index
WHAT IS VI EDITOR?
HISTORY OF VI.
CHARACTERISTIC OF VI.
STARTING VI .
MODE IN VI EDITOR.
COMMON VI COMMAND.
HOW TO EXIT FROM VI .
 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
What is Vi editor?
History of Vi editor
 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.
Characterstics of Vi.
 A very powerful.
 Move from point to point in the file, and make changes.
 Available on all UNIX systems.
 It is hard to learn, specially for windows
 users.
 The vi editor is:
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
Vi mode
Command mode.
 Accessed by typing Esc .
 In this mode all the keys pressed by the user are interpret
to the editor command.
 There are three modes in vi :-
Input mode
 Accessed by typing “i” .
 This mode permits insertion of new text, editing of existing text
 or replacement of existing text.
 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.
 Ex mode( Last Line Mode)
 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
COMMON VI COMMAND
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
• 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
How to exit for Vi.
 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
Thanks

More Related Content

PPT
Chapter 4- Communication in distributed system.ppt
PDF
Open Access Publications PPT.pdf
PPTX
Operating system
PPTX
Predatory Journals
PPTX
Data types in C
PPTX
Distributed Systems Introduction and Importance
PPTX
Selection Reporting & Misrepresentation .Dr.Anjali Upadhye.pptx
PDF
Introduction to flutter
Chapter 4- Communication in distributed system.ppt
Open Access Publications PPT.pdf
Operating system
Predatory Journals
Data types in C
Distributed Systems Introduction and Importance
Selection Reporting & Misrepresentation .Dr.Anjali Upadhye.pptx
Introduction to flutter

What's hot (20)

PPTX
Vi editor
PPT
Vi editor in linux
PPTX
VI editor in unix
PPTX
Unix Linux Commands Presentation 2013
PPT
Basic 50 linus command
PDF
PPTX
PPT
Linux basic commands
PPT
Unix File System
PPTX
Vim Editor And Basic Scripting (Ch-7)
PPT
Linux command ppt
PPTX
Page replacement algorithms
PPT
Linux Administration
PPT
Basic command ppt
PPTX
Introduction to Vim
PPT
Shell programming
PDF
Linux Directory Structure
PDF
PPTX
Linux Basic commands and VI Editor
PPTX
Bash shell scripting
Vi editor
Vi editor in linux
VI editor in unix
Unix Linux Commands Presentation 2013
Basic 50 linus command
Linux basic commands
Unix File System
Vim Editor And Basic Scripting (Ch-7)
Linux command ppt
Page replacement algorithms
Linux Administration
Basic command ppt
Introduction to Vim
Shell programming
Linux Directory Structure
Linux Basic commands and VI Editor
Bash shell scripting
Ad

Similar to Vi editor (20)

PPTX
lectuer 21-22.pptx
DOCX
swl--3 (1).docx
PPTX
Text editor In RHEL
PDF
Vi survival guide
PPTX
Vi editor
PPTX
Unit -6_linux operating system_1234.pptx
ODP
Augusta Linux User Group - Vim Introduction
PPTX
VI Editor - R.D.Sivakumar
PDF
What is Vim?
PPTX
Vi and redirection & piping in linux
PPT
Basic linux day 4
PPT
07 vi text_editor
PDF
1_Editors_in_Unix
PDF
Editing Tricks in Vim editor: The Power of dyp
PPTX
Vi editor
PDF
Vim Book
PPTX
Vi Vi Editor Unit 4 Power point presentation
PDF
Productive text editing with Vim
PPTX
Presentacion vim
PDF
Linux text editors Vim nano
lectuer 21-22.pptx
swl--3 (1).docx
Text editor In RHEL
Vi survival guide
Vi editor
Unit -6_linux operating system_1234.pptx
Augusta Linux User Group - Vim Introduction
VI Editor - R.D.Sivakumar
What is Vim?
Vi and redirection & piping in linux
Basic linux day 4
07 vi text_editor
1_Editors_in_Unix
Editing Tricks in Vim editor: The Power of dyp
Vi editor
Vim Book
Vi Vi Editor Unit 4 Power point presentation
Productive text editing with Vim
Presentacion vim
Linux text editors Vim nano
Ad

Recently uploaded (20)

PDF
Digital Logic Computer Design lecture notes
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
web development for engineering and engineering
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPT
Project quality management in manufacturing
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PDF
composite construction of structures.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
PPT on Performance Review to get promotions
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Well-logging-methods_new................
Digital Logic Computer Design lecture notes
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Foundation to blockchain - A guide to Blockchain Tech
CYBER-CRIMES AND SECURITY A guide to understanding
web development for engineering and engineering
Operating System & Kernel Study Guide-1 - converted.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Project quality management in manufacturing
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
OOP with Java - Java Introduction (Basics)
composite construction of structures.pdf
Internet of Things (IOT) - A guide to understanding
PPT on Performance Review to get promotions
Structs to JSON How Go Powers REST APIs.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Well-logging-methods_new................

Vi editor

  • 2.  Index 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.  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 What is Vi editor?
  • 4. History of Vi editor  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. Characterstics of Vi.  A very powerful.  Move from point to point in the file, and make changes.  Available on all UNIX systems.  It is hard to learn, specially for windows  users.  The vi editor is:
  • 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. Vi mode Command mode.  Accessed by typing Esc .  In this mode all the keys pressed by the user are interpret to the editor command.  There are three modes in vi :- Input mode  Accessed by typing “i” .  This mode permits insertion of new text, editing of existing text  or replacement of existing text.
  • 8.  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.  Ex mode( Last Line Mode)
  • 9.  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
  • 10. COMMON VI COMMAND 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 .
  • 11. • 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 • 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
  • 12. How to exit for Vi.  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