0% found this document useful (0 votes)
45 views

Vi Commands

Vi is a text editor that allows users to open, edit, save and quit files. It provides basic commands to navigate text such as moving left, right, up and down as well as moving by words, sentences and paragraphs. Vi also allows deleting and inserting text using commands like x, X, i, o and a. Additional commands allow replacing text, opening new lines, and navigating to specific lines or the beginning and end of the file.

Uploaded by

amgos44
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Vi Commands

Vi is a text editor that allows users to open, edit, save and quit files. It provides basic commands to navigate text such as moving left, right, up and down as well as moving by words, sentences and paragraphs. Vi also allows deleting and inserting text using commands like x, X, i, o and a. Additional commands allow replacing text, opening new lines, and navigating to specific lines or the beginning and end of the file.

Uploaded by

amgos44
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

vi editor commands Basics vi command Vi file_name Vi +n file_name File operation :e file :w :w file :w! :wq! :q :x :q!

Moving in vi h L or <space> K J or <enter> b w ( ) { } nG G Ctrl+w Ctrl+u Ctrl+d Ctrl+b Ctrl+F start at line 1 of file start at line n of file edit save save Save Save quit save Quit file as file as an existing file & quit vi the file if any changes & quit vi vi without saving

left one character right one character up one line Down one line left one word right one word start of sentence end of sentence start of paragraph end of paragraph to reach line n end of file first character of insertion Up half Screen Down half screen Up one Screen Down one Screen

deleting text x X dw d0 dd d$ d{ d} Inserting Text a A i o O

character under cursor character to the left of cursor word to the beginning of line current line end of line beginning of the paragraph end of the paragraph

after the cursor after last character on the line before first character on the line Open line below current line Open line above current line

replacing text r R

current character only[one char] in replacement mode till you press ESC/INSERT

You might also like