SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
Version: 1.0 / 12.06.2011
                                                                                                                             Nicole Cordes
VI - Cheat Sheet                                                                                                      http://www.cps-it.de        mehr wert im netz www.cps-it.de

Edit commands                                           Movement commands <MC>                                   Replace commands
u             Undo last command                         l, [LEFT]    Move one character left (lower L)           r            Replace current character
U             Undo all commands for current line        5l           Move 5 characters left                      R            Enter replacement mode
.             Repeat last command                       h, [RIGHT]   Move one character right                    :s/foo/bar   Replace next occurence of „foo“ with „bar“
y<MC>         Copy text depending on movement command   5h           Move 5 characters right                     :s/foo/      Replace all occurences of „foo“ with „bar“
yy            Copy current line (yank)                  k, [UP]      Move one line upwards                       bar/g

5yy           Copy 5 lines from current                 5k           Move 5 lines upwards                        :n,ms/foo/   Replace all occurences of „foo“ with „bar“
p             Paste (below)                             j, [DOWN]    Move one line downwards                     bar/g        from line n to m

P             Paste (above)                             5j           Move 5 lines downwards                      :%s/foo/     Replace all occurences of „foo“ with „bar“ in
d<MC>         Delete text depending on movement         w            Move one word right                         bar/g        file
              command                                   5w           Move 5 words right                          :%s/foo/     Replace all occurences of „foo“ with „bar“ in
D             Delete text to the end of line            b            Move one word left                          bar/gc       file with confirmation

dd            Delete current line                       5b           Move 5 words left
                                                                                                                 Screen commands
5dd           Delete 5 lines downwards from current     e            Move to the end of current word
                                                                                                                 z            Position line with cursor at top
:10,20d       Delete lines 10 - 20                      0            Move to beginning of line
                                                                                                                 z.           Position line with cursor at middle
x             Delete current character                  ^            Move to first non-blank character of line
                                                                                                                 z-           Position line with cursor at bottom
5x            Delete 5 characters from current          _            (underscore)
                                                                                                                 H            Go to top of screen (high)
d0            Delete to beginning of line               $            Move to end of line
                                                                                                                 5H           Go to 5th line from top of screen
d$            Delete to end of line                     +            Move to first character of next line
                                                                                                                 M            Go to middle of screen (middle)
                                                        -            Move to first character of previous line
File commands                                                                                                    L            Go to bottom of screen (low)
                                                        (            Move to next sentence
:q            Quit                                                                                               5L           Go to 5th line from bottom of screen
                                                        )            Move to previous sentence
:q!           Quit without saving                                                                                v            Switch to visual mode (show selection)
                                                        ]]           Move to next section
:w            Save changes
                                                        [[           Move to previous section                    Search commands
:wq, :x, ZZ   Save and exit
                                                        }            Move to next paragraph                      fc           Search forwards for „c“ (one character)
Insert commands                                         {            Move to previous paragraph                  Fc           Search backwards for „c“ (one character)
[ESC]         Switch back to command mode               %            Move to the corresponding opening/closing   tc           Search forwards for „c“ and go one character
i             Insert before cursor                                   bracket (()‘s, []‘s and {}‘s)                            backwards

I             Insert at the beginning of line           G            Go to last line                             Tc           Search backwards for „c“ and go one
a             Insert after cursor                       5G           Go to line 5                                             character forwards

A             Insert at the end of line                                                                          ;            Repeat search (keep direction)
c<MC>         Cut text depending on movement command    Miscellaneous                                            ,            Repeat search (reverse direction)
C             Cut text to the end of line               ~            Toogle upper / lower case                   /foo         Search forwards for „foo“
cc            Cut text of the current line              J            Join lines                                  ?foo         Search backwards for „foo“
o             Insert new line (below)                   :!ls         Run „ls“ command from editor                n            Repeat search (keep direction)
O             Insert new line (above)                   :r foo.bar   Read file foo.bar into current file         N            Repeat search (reverse direction)

Weitere ähnliche Inhalte

Was ist angesagt?

Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and SymfonyIgnacio Martín
 
Get to Green: How to Safely Refactor Legacy Code
Get to Green: How to Safely Refactor Legacy CodeGet to Green: How to Safely Refactor Legacy Code
Get to Green: How to Safely Refactor Legacy CodeGene Gotimer
 
Kotlin as a Better Java
Kotlin as a Better JavaKotlin as a Better Java
Kotlin as a Better JavaGarth Gilmour
 
7 rules of simple and maintainable code
7 rules of simple and maintainable code7 rules of simple and maintainable code
7 rules of simple and maintainable codeGeshan Manandhar
 
Declarative UIs with Jetpack Compose
Declarative UIs with Jetpack ComposeDeclarative UIs with Jetpack Compose
Declarative UIs with Jetpack ComposeRamon Ribeiro Rabello
 
Capabilities for Resources and Effects
Capabilities for Resources and EffectsCapabilities for Resources and Effects
Capabilities for Resources and EffectsMartin Odersky
 
cd - The Change Directory Command
cd - The Change Directory Commandcd - The Change Directory Command
cd - The Change Directory CommandJake Corn
 
Android Training Syllabus - Course
Android Training Syllabus - CourseAndroid Training Syllabus - Course
Android Training Syllabus - CourseTOPS Technologies
 
Dart and Flutter Basics.pptx
Dart and Flutter Basics.pptxDart and Flutter Basics.pptx
Dart and Flutter Basics.pptxDSCVSSUT
 
The OO Design Principles
The OO Design PrinciplesThe OO Design Principles
The OO Design PrinciplesSteve Zhang
 
[Android] DI in multimodule application
[Android] DI in multimodule application[Android] DI in multimodule application
[Android] DI in multimodule applicationOleg Mazhukin
 
Introducción a shell script
Introducción a shell scriptIntroducción a shell script
Introducción a shell scriptPablo Macon
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 

Was ist angesagt? (20)

Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and Symfony
 
Dart programming language
Dart programming languageDart programming language
Dart programming language
 
Kotlin on android
Kotlin on androidKotlin on android
Kotlin on android
 
Get to Green: How to Safely Refactor Legacy Code
Get to Green: How to Safely Refactor Legacy CodeGet to Green: How to Safely Refactor Legacy Code
Get to Green: How to Safely Refactor Legacy Code
 
Introduction to Makefile
Introduction to MakefileIntroduction to Makefile
Introduction to Makefile
 
Kotlin as a Better Java
Kotlin as a Better JavaKotlin as a Better Java
Kotlin as a Better Java
 
7 rules of simple and maintainable code
7 rules of simple and maintainable code7 rules of simple and maintainable code
7 rules of simple and maintainable code
 
Declarative UIs with Jetpack Compose
Declarative UIs with Jetpack ComposeDeclarative UIs with Jetpack Compose
Declarative UIs with Jetpack Compose
 
Capabilities for Resources and Effects
Capabilities for Resources and EffectsCapabilities for Resources and Effects
Capabilities for Resources and Effects
 
Flutter Session GDSC BPIT.pptx
Flutter Session GDSC BPIT.pptxFlutter Session GDSC BPIT.pptx
Flutter Session GDSC BPIT.pptx
 
Android MVVM
Android MVVMAndroid MVVM
Android MVVM
 
cd - The Change Directory Command
cd - The Change Directory Commandcd - The Change Directory Command
cd - The Change Directory Command
 
Android Training Syllabus - Course
Android Training Syllabus - CourseAndroid Training Syllabus - Course
Android Training Syllabus - Course
 
Java features
Java featuresJava features
Java features
 
Dart and Flutter Basics.pptx
Dart and Flutter Basics.pptxDart and Flutter Basics.pptx
Dart and Flutter Basics.pptx
 
The OO Design Principles
The OO Design PrinciplesThe OO Design Principles
The OO Design Principles
 
[Android] DI in multimodule application
[Android] DI in multimodule application[Android] DI in multimodule application
[Android] DI in multimodule application
 
Introducción a shell script
Introducción a shell scriptIntroducción a shell script
Introducción a shell script
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
 

Ähnlich wie Vi Cheat Sheet v 1 00

Ähnlich wie Vi Cheat Sheet v 1 00 (20)

Vi Editor Cheat Sheet
Vi Editor Cheat SheetVi Editor Cheat Sheet
Vi Editor Cheat Sheet
 
API TEST
API TESTAPI TEST
API TEST
 
API TEST
API TESTAPI TEST
API TEST
 
Vi cheat sheet
Vi cheat sheetVi cheat sheet
Vi cheat sheet
 
vi cheat sheet
vi cheat sheetvi cheat sheet
vi cheat sheet
 
Vi help-sheet-011
Vi help-sheet-011Vi help-sheet-011
Vi help-sheet-011
 
Vi editor commands
Vi editor commandsVi editor commands
Vi editor commands
 
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
 
Using vi editor
Using vi editorUsing vi editor
Using vi editor
 
vim - Tips and_tricks
vim - Tips and_tricksvim - Tips and_tricks
vim - Tips and_tricks
 
vim-cheatsheet.pdf
vim-cheatsheet.pdfvim-cheatsheet.pdf
vim-cheatsheet.pdf
 
Vi cheat sheet
Vi cheat sheetVi cheat sheet
Vi cheat sheet
 
Vi reference
Vi referenceVi reference
Vi reference
 
Vi reference
Vi referenceVi reference
Vi reference
 
Vim Cheat Sheet.pdf
Vim Cheat Sheet.pdfVim Cheat Sheet.pdf
Vim Cheat Sheet.pdf
 
UNIX - Class2 - vi Editor
UNIX - Class2 - vi EditorUNIX - Class2 - vi Editor
UNIX - Class2 - vi Editor
 
Vi CheatSheet
Vi CheatSheetVi CheatSheet
Vi CheatSheet
 
Introduction to vi editor
Introduction to vi editorIntroduction to vi editor
Introduction to vi editor
 
Vim 1
Vim 1Vim 1
Vim 1
 
Rubizza #1 | Special Lecture. Vim
Rubizza #1 | Special Lecture. Vim Rubizza #1 | Special Lecture. Vim
Rubizza #1 | Special Lecture. Vim
 

Kürzlich hochgeladen

Transportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptxTransportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptxForth
 
Centering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna RivettCentering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna RivettForth
 
Building a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda BaileyBuilding a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda BaileyForth
 
Study on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructureStudy on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructureEuropeanCleanTruckin
 
Centering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard EzikeCentering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard EzikeForth
 
Equity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining InstituteEquity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining InstituteForth
 
Lakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerckLakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerckLakshanMadhushanka3
 
USDA’s EV Charging Infrastructure Solutions by Chris McLean
USDA’s EV Charging Infrastructure Solutionsby Chris McLeanUSDA’s EV Charging Infrastructure Solutionsby Chris McLean
USDA’s EV Charging Infrastructure Solutions by Chris McLeanForth
 
Environmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen CampblinEnvironmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen CampblinForth
 
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...Forth
 
Program Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya CooperProgram Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya CooperForth
 
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdfNosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdfJulia Kaye
 
Commercial Extractor fan repair services
Commercial Extractor fan repair servicesCommercial Extractor fan repair services
Commercial Extractor fan repair servicesmb1294198
 
Centering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito PerezCentering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito PerezForth
 
Building a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh RodriguezBuilding a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh RodriguezForth
 

Kürzlich hochgeladen (17)

Transportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptxTransportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptx
 
Centering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna RivettCentering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna Rivett
 
Reinventing the Car - as I reported it in 1985!
Reinventing the Car - as I reported it in 1985!Reinventing the Car - as I reported it in 1985!
Reinventing the Car - as I reported it in 1985!
 
Building a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda BaileyBuilding a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
 
Study on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructureStudy on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructure
 
Centering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard EzikeCentering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard Ezike
 
Equity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining InstituteEquity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining Institute
 
Lakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerckLakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerck
 
USDA’s EV Charging Infrastructure Solutions by Chris McLean
USDA’s EV Charging Infrastructure Solutionsby Chris McLeanUSDA’s EV Charging Infrastructure Solutionsby Chris McLean
USDA’s EV Charging Infrastructure Solutions by Chris McLean
 
Environmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen CampblinEnvironmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen Campblin
 
EVAT - Future Mobility Transformation in Thailand
EVAT - Future Mobility Transformation in ThailandEVAT - Future Mobility Transformation in Thailand
EVAT - Future Mobility Transformation in Thailand
 
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
 
Program Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya CooperProgram Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya Cooper
 
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdfNosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
 
Commercial Extractor fan repair services
Commercial Extractor fan repair servicesCommercial Extractor fan repair services
Commercial Extractor fan repair services
 
Centering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito PerezCentering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito Perez
 
Building a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh RodriguezBuilding a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh Rodriguez
 

Vi Cheat Sheet v 1 00

  • 1. Version: 1.0 / 12.06.2011 Nicole Cordes VI - Cheat Sheet http://www.cps-it.de mehr wert im netz www.cps-it.de Edit commands Movement commands <MC> Replace commands u Undo last command l, [LEFT] Move one character left (lower L) r Replace current character U Undo all commands for current line 5l Move 5 characters left R Enter replacement mode . Repeat last command h, [RIGHT] Move one character right :s/foo/bar Replace next occurence of „foo“ with „bar“ y<MC> Copy text depending on movement command 5h Move 5 characters right :s/foo/ Replace all occurences of „foo“ with „bar“ yy Copy current line (yank) k, [UP] Move one line upwards bar/g 5yy Copy 5 lines from current 5k Move 5 lines upwards :n,ms/foo/ Replace all occurences of „foo“ with „bar“ p Paste (below) j, [DOWN] Move one line downwards bar/g from line n to m P Paste (above) 5j Move 5 lines downwards :%s/foo/ Replace all occurences of „foo“ with „bar“ in d<MC> Delete text depending on movement w Move one word right bar/g file command 5w Move 5 words right :%s/foo/ Replace all occurences of „foo“ with „bar“ in D Delete text to the end of line b Move one word left bar/gc file with confirmation dd Delete current line 5b Move 5 words left Screen commands 5dd Delete 5 lines downwards from current e Move to the end of current word z Position line with cursor at top :10,20d Delete lines 10 - 20 0 Move to beginning of line z. Position line with cursor at middle x Delete current character ^ Move to first non-blank character of line z- Position line with cursor at bottom 5x Delete 5 characters from current _ (underscore) H Go to top of screen (high) d0 Delete to beginning of line $ Move to end of line 5H Go to 5th line from top of screen d$ Delete to end of line + Move to first character of next line M Go to middle of screen (middle) - Move to first character of previous line File commands L Go to bottom of screen (low) ( Move to next sentence :q Quit 5L Go to 5th line from bottom of screen ) Move to previous sentence :q! Quit without saving v Switch to visual mode (show selection) ]] Move to next section :w Save changes [[ Move to previous section Search commands :wq, :x, ZZ Save and exit } Move to next paragraph fc Search forwards for „c“ (one character) Insert commands { Move to previous paragraph Fc Search backwards for „c“ (one character) [ESC] Switch back to command mode % Move to the corresponding opening/closing tc Search forwards for „c“ and go one character i Insert before cursor bracket (()‘s, []‘s and {}‘s) backwards I Insert at the beginning of line G Go to last line Tc Search backwards for „c“ and go one a Insert after cursor 5G Go to line 5 character forwards A Insert at the end of line ; Repeat search (keep direction) c<MC> Cut text depending on movement command Miscellaneous , Repeat search (reverse direction) C Cut text to the end of line ~ Toogle upper / lower case /foo Search forwards for „foo“ cc Cut text of the current line J Join lines ?foo Search backwards for „foo“ o Insert new line (below) :!ls Run „ls“ command from editor n Repeat search (keep direction) O Insert new line (above) :r foo.bar Read file foo.bar into current file N Repeat search (reverse direction)