0% found this document useful (0 votes)
72 views2 pages

VI Cheat Sheet: Editing Commands From Command Mode

This document provides a cheat sheet of common commands for navigating and editing text in the VI text editor. It lists insert, append, navigation, search/replace, copy/paste, and save/quit commands, along with brief explanations of what each command does. Key commands include i to insert text, esc to enter command mode, w to skip to the next word, / and ? to search forward or backward, p to paste copied or cut text, :wq to write and quit the file.

Uploaded by

Anupam Lalit
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 DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views2 pages

VI Cheat Sheet: Editing Commands From Command Mode

This document provides a cheat sheet of common commands for navigating and editing text in the VI text editor. It lists insert, append, navigation, search/replace, copy/paste, and save/quit commands, along with brief explanations of what each command does. Key commands include i to insert text, esc to enter command mode, w to skip to the next word, / and ? to search forward or backward, p to paste copied or cut text, :wq to write and quit the file.

Uploaded by

Anupam Lalit
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 DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

VI Cheat Sheet

esc Toggle to command(beep) mode from an insert mode Editing commands from command mode i Insert at cursor a Append after cursor A Append at the end of the line o Open a line for editing below where the cursor is sitting O Open a line for editing above where the cursor is sitting Command mode instructions G Go to the end of the file :<number> - Go to line number :w Write the file :wq Write the file and exit vi w Skip to the next word boundary b Skip to the previous word boundary :ZZ Write and quit the file :%s/<search pattern>/<replace pattern>/g Global search and replace, leave off the g to only replace the first occurrence of the pattern in a line yy Yank(copy) the line p Put(paste) the line ?<string> - Search for string(remember it is case sensitive), N finds the next matching pattern and n finds the previous /<string> - Search for string(remember it is case sensitive), n finds the next matching pattern and N finds the previous

You might also like