SlideShare a Scribd company logo
1 of 12
Submitted by
Nidhi Sharma
8503
Msc-it(3rd sem)
A text

editor is one of the most essential tools
provided with the Linux operating system.
With an editor, you can create and modify text files
that have a variety of applications:
 System files
 Shell programs
 Documents
 Mail messages
Basically, editors enable you to
insert, delete, move, and search text ranging from
individual characters to thousands of lines.
 Two of the most popular editors for Linux system
are emacs and vi.
•

VI editor is a basic text editor that is an
acronym of
‘ visual editor’ and was originally written by Bill
Joy in 1976.
•Basically there are three types of editors
available in UNIX; these are named as ‘ed’ ‘ex’
and ‘vi’.
• The ‘ed’ is a line editor and is just like EDLIN
program in DOS.
• The ‘ex’ editor is an advanced version of ‘ed’
that is more user friendly comparative to ‘ed’.
• The ‘vi’ is a screen editor and compared to ‘ed’
or ‘ex’ it is quite better.
There are following way you can start using vi
editor:
Command

Description

vi

Create a unnamed file.

vi filename

Creates a new file if it already does not exist,
otherwise opens existing file.

vi -R filename Or view Opens an existing file in read only mode.
filename

vi +n filename

Where n represents the line number where
vi will place its cursor in filename.
•Command

mode: This mode enables you to perform
administrative tasks such as saving files, executing
commands, moving the cursor, cutting (yanking) and
pasting lines or words, and finding and replacing. In this
mode, whatever you type is interpreted as a command.
•Insert

mode: This mode enables you to insert text into
the file. Everything that's typed in this mode is interpreted
as input and finally it is put in the file
•.
•Ex mode: In ‘ex’ mode the user is permitted to give
commands at the last line known as command line .This
mode prompts the user to file handling like as saving the
file or exit the editor with or without saving the file.
Command

Description

i

insert text before cursor, until <Esc> hit

I

insert text at beginning of current line,
until <Esc> hit

a

append text after cursor, until <Esc> hit

A

append text to end of current line ,
until <Esc> hit

o

open and put text in a new line below
current line, until <Esc> hit

O

open and put text in a new line above
current line, until <Esc> hit
Command

Description

:w

Saves file and remains in editing
mode

:x or zz

Saves file and quits editing mode

:wq

Saves file and quits editing mode

:q

Quits editing mode

:q!

quits the file without saving changes
to exit from the editor.
Command

Description

b

Beginning of previous word

w

Beginning of next word

e

End of current/next word

0(Zero)

Beginning of line

$

End of line

(

Beginning of current/previous sentence

)

Beginning of next sentence

{

Beginning of current/previous paragraph

}

End of current paragraph
Command

Description

h

left one space

j

down one line

k

up one line

l

right one space
Command

Description

x
Nx

delete single character under cursor
delete N characters, starting with character under cursor

X

Deletes the character before the cursor location.

dw
Ndw

delete the single word beginning with character under
cursor
delete N words beginning with character under cursor.

d^

Deletes from current cursor position to the beginning of
the line.

d$

Deletes from the current character to the end of the line.

dd
Ndd

delete entire current line
delete N lines, beginning with the current line;
e.g., 5dd deletes 5 lines

dg

Deletes all the line from the current one to the end of the
file.
Moving sections of text around in a file basically requires
three steps:
1)
“Yank” the text into a buffer.
2)
Move the cursor to where you want to insert the text.
3)
Place the text from buffer at the new location.
Command

Description

yy

yank (copy) a line

2yy

yank 2 lines

yw

yank word

y$

yank to end of line

p

put (paste) the clipboard after cursor

P

put (paste) before cursor
Command

Description

/pattern

search for pattern

?pattern

search backward for pattern

n

repeat search in same direction

N

repeat search in opposite direction

:%s/old/new/g

replace all old with new throughout file

:%s/old/new/gc

replace all old with new throughout file with
confirmations

More Related Content

What's hot

What's hot (20)

Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basics
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
Pipes and filters
Pipes and filtersPipes and filters
Pipes and filters
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Vim Editor And Basic Scripting (Ch-7)
Vim Editor And Basic Scripting (Ch-7)Vim Editor And Basic Scripting (Ch-7)
Vim Editor And Basic Scripting (Ch-7)
 
Java swing
Java swingJava swing
Java swing
 
Shell programming
Shell programmingShell programming
Shell programming
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
VB.NET:An introduction to Namespaces in .NET framework
VB.NET:An introduction to  Namespaces in .NET frameworkVB.NET:An introduction to  Namespaces in .NET framework
VB.NET:An introduction to Namespaces in .NET framework
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
 
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
 
JavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScriptJavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScript
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Bash shell
Bash shellBash shell
Bash shell
 
MYSQL - PHP Database Connectivity
MYSQL - PHP Database ConnectivityMYSQL - PHP Database Connectivity
MYSQL - PHP Database Connectivity
 
Linux commands
Linux commandsLinux commands
Linux commands
 

Viewers also liked

Linux command ppt
Linux command pptLinux command ppt
Linux command pptkalyanineve
 
Introduction to vi editor
Introduction to vi editorIntroduction to vi editor
Introduction to vi editorU.P Police
 
Different types of Editors in Linux
Different types of Editors in LinuxDifferent types of Editors in Linux
Different types of Editors in LinuxBhavik Trivedi
 
Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 
Data flow diagram
Data flow diagram Data flow diagram
Data flow diagram Nidhi Sharma
 
Text editors project
Text editors projectText editors project
Text editors projectMohit kumar
 
Implement text editor
Implement text editorImplement text editor
Implement text editorAmaan Shaikh
 
Unix Internals OS Architecture
Unix Internals OS ArchitectureUnix Internals OS Architecture
Unix Internals OS ArchitectureKhader Shaik
 
Notepad
NotepadNotepad
NotepadLiz
 
Using VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit KumarUsing VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit KumarRohit Kumar
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editortechbed
 
Emacs presentation
Emacs presentationEmacs presentation
Emacs presentationLingfei Kong
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014Peter Martin
 
Notepad Presentation Mca
Notepad Presentation McaNotepad Presentation Mca
Notepad Presentation Mcahamzaghanchi
 
Full Presentation on Notepad
Full Presentation on NotepadFull Presentation on Notepad
Full Presentation on Notepadmanish chaturvedi
 

Viewers also liked (20)

Vi Editor
Vi EditorVi Editor
Vi Editor
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 
The "vi" Text Editor
The "vi" Text EditorThe "vi" Text Editor
The "vi" Text Editor
 
Introduction to vi editor
Introduction to vi editorIntroduction to vi editor
Introduction to vi editor
 
Different types of Editors in Linux
Different types of Editors in LinuxDifferent types of Editors in Linux
Different types of Editors in Linux
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Data flow diagram
Data flow diagram Data flow diagram
Data flow diagram
 
Open source
Open sourceOpen source
Open source
 
Text editors project
Text editors projectText editors project
Text editors project
 
Implement text editor
Implement text editorImplement text editor
Implement text editor
 
Unix Internals OS Architecture
Unix Internals OS ArchitectureUnix Internals OS Architecture
Unix Internals OS Architecture
 
Notepad
NotepadNotepad
Notepad
 
Using VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit KumarUsing VI Editor in Red Hat by Rohit Kumar
Using VI Editor in Red Hat by Rohit Kumar
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editor
 
Emacs presentation
Emacs presentationEmacs presentation
Emacs presentation
 
Linux files
Linux filesLinux files
Linux files
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014
 
Dma
DmaDma
Dma
 
Notepad Presentation Mca
Notepad Presentation McaNotepad Presentation Mca
Notepad Presentation Mca
 
Full Presentation on Notepad
Full Presentation on NotepadFull Presentation on Notepad
Full Presentation on Notepad
 

Similar to Vi editor

Similar to Vi editor (20)

1_Editors_in_Unix
1_Editors_in_Unix1_Editors_in_Unix
1_Editors_in_Unix
 
intro unix/linux 04
intro unix/linux 04intro unix/linux 04
intro unix/linux 04
 
Using vi editor
Using vi editorUsing vi editor
Using vi editor
 
VI Editors
VI EditorsVI Editors
VI Editors
 
VI Editor - R.D.Sivakumar
VI Editor - R.D.SivakumarVI Editor - R.D.Sivakumar
VI Editor - R.D.Sivakumar
 
changing and deleting text ,change word and line under vi editor
changing and deleting text ,change word and line under vi editorchanging and deleting text ,change word and line under vi editor
changing and deleting text ,change word and line under vi editor
 
Unix commands
Unix commandsUnix commands
Unix commands
 
Using Vi Editor.pptx
Using Vi Editor.pptxUsing Vi Editor.pptx
Using Vi Editor.pptx
 
Using Vi Editor.pptx
Using Vi Editor.pptxUsing Vi Editor.pptx
Using Vi Editor.pptx
 
07 vi text_editor
07 vi text_editor07 vi text_editor
07 vi text_editor
 
swl--3 (1).docx
swl--3 (1).docxswl--3 (1).docx
swl--3 (1).docx
 
Qc document draft
Qc document draftQc document draft
Qc document draft
 
Linux text editors Vim nano
Linux text editors Vim nano Linux text editors Vim nano
Linux text editors Vim nano
 
Linux text editors
Linux text editorsLinux text editors
Linux text editors
 
Linux programming - Getting self started
Linux programming - Getting self started Linux programming - Getting self started
Linux programming - Getting self started
 
lectuer 21-22.pptx
lectuer 21-22.pptxlectuer 21-22.pptx
lectuer 21-22.pptx
 
Vi editor commands
Vi editor commandsVi editor commands
Vi editor commands
 
Ch05
Ch05Ch05
Ch05
 
Foss manual (1)
Foss manual (1)Foss manual (1)
Foss manual (1)
 
Operating System Laboratory presentation .ppt
Operating System Laboratory presentation .pptOperating System Laboratory presentation .ppt
Operating System Laboratory presentation .ppt
 

Recently uploaded

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 

Recently uploaded (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 

Vi editor

  • 2. A text editor is one of the most essential tools provided with the Linux operating system. With an editor, you can create and modify text files that have a variety of applications:  System files  Shell programs  Documents  Mail messages Basically, editors enable you to insert, delete, move, and search text ranging from individual characters to thousands of lines.  Two of the most popular editors for Linux system are emacs and vi.
  • 3. • VI editor is a basic text editor that is an acronym of ‘ visual editor’ and was originally written by Bill Joy in 1976. •Basically there are three types of editors available in UNIX; these are named as ‘ed’ ‘ex’ and ‘vi’. • The ‘ed’ is a line editor and is just like EDLIN program in DOS. • The ‘ex’ editor is an advanced version of ‘ed’ that is more user friendly comparative to ‘ed’. • The ‘vi’ is a screen editor and compared to ‘ed’ or ‘ex’ it is quite better.
  • 4. There are following way you can start using vi editor: Command Description vi Create a unnamed file. vi filename Creates a new file if it already does not exist, otherwise opens existing file. vi -R filename Or view Opens an existing file in read only mode. filename vi +n filename Where n represents the line number where vi will place its cursor in filename.
  • 5. •Command mode: This mode enables you to perform administrative tasks such as saving files, executing commands, moving the cursor, cutting (yanking) and pasting lines or words, and finding and replacing. In this mode, whatever you type is interpreted as a command. •Insert mode: This mode enables you to insert text into the file. Everything that's typed in this mode is interpreted as input and finally it is put in the file •. •Ex mode: In ‘ex’ mode the user is permitted to give commands at the last line known as command line .This mode prompts the user to file handling like as saving the file or exit the editor with or without saving the file.
  • 6. Command Description i insert text before cursor, until <Esc> hit I insert text at beginning of current line, until <Esc> hit a append text after cursor, until <Esc> hit A append text to end of current line , until <Esc> hit o open and put text in a new line below current line, until <Esc> hit O open and put text in a new line above current line, until <Esc> hit
  • 7. Command Description :w Saves file and remains in editing mode :x or zz Saves file and quits editing mode :wq Saves file and quits editing mode :q Quits editing mode :q! quits the file without saving changes to exit from the editor.
  • 8. Command Description b Beginning of previous word w Beginning of next word e End of current/next word 0(Zero) Beginning of line $ End of line ( Beginning of current/previous sentence ) Beginning of next sentence { Beginning of current/previous paragraph } End of current paragraph
  • 9. Command Description h left one space j down one line k up one line l right one space
  • 10. Command Description x Nx delete single character under cursor delete N characters, starting with character under cursor X Deletes the character before the cursor location. dw Ndw delete the single word beginning with character under cursor delete N words beginning with character under cursor. d^ Deletes from current cursor position to the beginning of the line. d$ Deletes from the current character to the end of the line. dd Ndd delete entire current line delete N lines, beginning with the current line; e.g., 5dd deletes 5 lines dg Deletes all the line from the current one to the end of the file.
  • 11. Moving sections of text around in a file basically requires three steps: 1) “Yank” the text into a buffer. 2) Move the cursor to where you want to insert the text. 3) Place the text from buffer at the new location. Command Description yy yank (copy) a line 2yy yank 2 lines yw yank word y$ yank to end of line p put (paste) the clipboard after cursor P put (paste) before cursor
  • 12. Command Description /pattern search for pattern ?pattern search backward for pattern n repeat search in same direction N repeat search in opposite direction :%s/old/new/g replace all old with new throughout file :%s/old/new/gc replace all old with new throughout file with confirmations

Editor's Notes

  1. http://www.worldtimzone.com/res/vi.htmlhttp://www.developerdrive.com/2012/06/5-differences-between-c-and-java-objects-and-classes/
  2. http://www.people.imise.uni-leipzig.de/nab.raj.roshyara/vi_commands.pdfhttp://www.cs.colostate.edu/helpdocs/vi.html