SlideShare a Scribd company logo
UNIX




  vi Editor



              Presentation By

                        Nihar R Paital
vi Control Mode Commands

   h   Move left one character
   l   Move right one character
   w   Move right one word
   b   Move left one word
   W   Move to beginning of next non-blank word
   B   Move to beginning of preceding non-blank word
   e   Move to end of current word
   E   Move to end of current non-blank word
   0   Move to beginning of line
   ^   Move to first non-blank character in line
   $   Move to end of line                  Nihar R Paital
Vi Control Mode Commands for Searching the History File


   k or -    :Move backward one line
   j or +    :Move forward one line
   G         :Move to line given by repeat count
   ? string :Search backward for string
   / string :Search forward for string
   n         :Repeat search in same direction as
    previous
   N         :Repeat search in opposite direction
    of previous                        Nihar R Paital
Entering and Changing Text

   i Text inserted before current character
    (insert)
   a Text inserted after current character
    (append)
   I Text inserted at beginning of line
   A Text inserted at end of line
   R Text overwrites existing text
   o Text inserted at the next new line.

                                     Nihar R Paital
vi-mode Deletion Commands

   dh Delete one character backwards
   dl Delete one character forwards
   db Delete one word backwards
   dw Delete one word forwards
   dB Delete one non-blank word backwards
   dW Delete one non-blank word forwards
   d$ Delete to end of line
   d0 Delete to beginning of line

                                        Nihar R Paital
Abbreviations for vi-mode Delete Commands


   D Equivalent to d$ (delete to end of line)
   dd Equivalent to 0d$ (delete entire line)
   C Equivalent to c$ (delete to end of line, enter
    input mode)
   cc Equivalent to 0c$ (delete entire line, enter input
    mode)
   X Equivalent to dh (delete character backwards)
   x Equivalent to dl (delete character forwards)


                                             Nihar R Paital
Vi-mode Character-finding Commands

   fx Move right to next occurrence of x
   Fx Move left to previous occurrence of x
   tx Move right to next occurrence of x , then back
    one space
   Tx Move left to previous occurrence of x , then
    forward one space
   ;   Redo last character-finding command
   ,   Redo last character-finding command in
    opposite direction


                                           Nihar R Paital
Thank You!




             Nihar R Paital

More Related Content

PPT
Chapter 4 Keyboard in MATLAB Shortcuts
PPT
Unix fundamentals
PDF
Emacs入门
PDF
Beginning with vi text editor
PDF
Emacs - COSCUP 2012
PPT
1359 Vi Editor
PDF
How Emacs changed my life
PDF
vi cheat sheet
Chapter 4 Keyboard in MATLAB Shortcuts
Unix fundamentals
Emacs入门
Beginning with vi text editor
Emacs - COSCUP 2012
1359 Vi Editor
How Emacs changed my life
vi cheat sheet

Similar to UNIX - Class2 - vi Editor (7)

PDF
API TEST
PDF
Vi Cheat Sheet
PDF
API TEST
PDF
Vi cheat sheet
PPTX
Linux Text Editor (Vi) Command List Summary
PDF
Vi Cheat Sheet v 1 00
PDF
Vi help-sheet-011
API TEST
Vi Cheat Sheet
API TEST
Vi cheat sheet
Linux Text Editor (Vi) Command List Summary
Vi Cheat Sheet v 1 00
Vi help-sheet-011
Ad

More from Nihar Ranjan Paital (11)

PPS
Oracle Select Query
PDF
Useful macros and functions for excel
PPS
Unix - Class7 - awk
PPS
UNIX - Class5 - Advance Shell Scripting-P2
PPS
UNIX - Class3 - Programming Constructs
PPS
UNIX - Class1 - Basic Shell
PPS
UNIX - Class6 - sed - Detail
PPS
UNIX - Class4 - Advance Shell Scripting-P1
PDF
PPT
Csql for telecom
PPT
Select Operations in CSQL
Oracle Select Query
Useful macros and functions for excel
Unix - Class7 - awk
UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class3 - Programming Constructs
UNIX - Class1 - Basic Shell
UNIX - Class6 - sed - Detail
UNIX - Class4 - Advance Shell Scripting-P1
Csql for telecom
Select Operations in CSQL
Ad

Recently uploaded (20)

PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Cloud computing and distributed systems.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
A comparative analysis of optical character recognition models for extracting...
Empathic Computing: Creating Shared Understanding
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
Cloud computing and distributed systems.
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The AUB Centre for AI in Media Proposal.docx
NewMind AI Weekly Chronicles - August'25-Week II

UNIX - Class2 - vi Editor

  • 1. UNIX vi Editor Presentation By Nihar R Paital
  • 2. vi Control Mode Commands  h Move left one character  l Move right one character  w Move right one word  b Move left one word  W Move to beginning of next non-blank word  B Move to beginning of preceding non-blank word  e Move to end of current word  E Move to end of current non-blank word  0 Move to beginning of line  ^ Move to first non-blank character in line  $ Move to end of line Nihar R Paital
  • 3. Vi Control Mode Commands for Searching the History File  k or - :Move backward one line  j or + :Move forward one line  G :Move to line given by repeat count  ? string :Search backward for string  / string :Search forward for string  n :Repeat search in same direction as previous  N :Repeat search in opposite direction of previous Nihar R Paital
  • 4. Entering and Changing Text  i Text inserted before current character (insert)  a Text inserted after current character (append)  I Text inserted at beginning of line  A Text inserted at end of line  R Text overwrites existing text  o Text inserted at the next new line. Nihar R Paital
  • 5. vi-mode Deletion Commands  dh Delete one character backwards  dl Delete one character forwards  db Delete one word backwards  dw Delete one word forwards  dB Delete one non-blank word backwards  dW Delete one non-blank word forwards  d$ Delete to end of line  d0 Delete to beginning of line Nihar R Paital
  • 6. Abbreviations for vi-mode Delete Commands  D Equivalent to d$ (delete to end of line)  dd Equivalent to 0d$ (delete entire line)  C Equivalent to c$ (delete to end of line, enter input mode)  cc Equivalent to 0c$ (delete entire line, enter input mode)  X Equivalent to dh (delete character backwards)  x Equivalent to dl (delete character forwards) Nihar R Paital
  • 7. Vi-mode Character-finding Commands  fx Move right to next occurrence of x  Fx Move left to previous occurrence of x  tx Move right to next occurrence of x , then back one space  Tx Move left to previous occurrence of x , then forward one space  ; Redo last character-finding command  , Redo last character-finding command in opposite direction Nihar R Paital
  • 8. Thank You! Nihar R Paital