0% found this document useful (0 votes)
37 views1 page

Vim Guide1

The document provides a quick reference guide for basic Vim commands including commands for quitting, saving, deleting text, inserting text, undoing/redoing commands, searching, replacing text, and setting options. It lists commands for quitting without and with saving, deleting characters, words, lines, and to the end of a line/file, as well as inserting text and undoing/redoing the last command or fixing an entire line. It also includes commands for searching forward and backward, replacing text on the current line or within a range of lines, executing external commands, and turning on line numbering or turning off search highlighting.

Uploaded by

dionpp39
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

Vim Guide1

The document provides a quick reference guide for basic Vim commands including commands for quitting, saving, deleting text, inserting text, undoing/redoing commands, searching, replacing text, and setting options. It lists commands for quitting without and with saving, deleting characters, words, lines, and to the end of a line/file, as well as inserting text and undoing/redoing the last command or fixing an entire line. It also includes commands for searching forward and backward, replacing text on the current line or within a range of lines, executing external commands, and turning on line numbering or turning off search highlighting.

Uploaded by

dionpp39
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

vim

Box 1321 l Seahurst, WA 98062 V: 206.988.5858 W: www.soundtraining.net

quick reference guide

Press the <ESC> (escape) key to ensure youre in normal mode, then: :q! quits without saving :wq saves and quits (write quit) x deletes individual characters i inserts text dw deletes to the end of a word (d2w deletes two words, d3w deletes three words, etc.) d$ deletes to the end of a line dd deletes an entire line (2dd deletes two lines, 23dd deletes 23 lines, etc.) u undoes the last command U fixes an entire line <CTRL>R redoes the command p puts the last deletion after the cursor r replaces the character under the cursor cw is the change word command, that deletes the word (from the cursor to the right) and places you in insert mode c$ is the change line command, that deletes the line (from the cursor to the right) and places you in insert mode <CTRL>g shows your location in a file <SHIFT>G moves to the end of the file, [number]<SHIFT>G moves to the line number specified in the command, for example 1<SHIFT>G moves to line #1. /[search term] searches forward through a file for the search term. For example, /apache will search for the next instance of the word apache in the file ?[search term] searches backwards through a file for the search term. For example, ?apache will search for the last instance before the cursor of the word apache in the file :s/[old]/[new] will replace the next instance of old with new. For example, :s/blue/red will replace the next instance of blue with red. :s/[old]/[new]/g will replace the every instance of old on the current line with new. For example, :s/blue/red will replace the every instance of blue with red. :#,#s/[old]/[new]/g will replace every instance of old with new in the range of lines specified with the # sign. :! allows you to execute external commands :set nu turns on line numbering :nohlsearch turns off highlighting of search terms
2004, soundtraining.net All rights reserved.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy