VI Editor Commands
Terms
undefined, object
copy deck
- Edit file
- vi [file]
- Recover edit session
- vi -r [file]
- Repaint current screen
- "CTRL/L"
- Beginning of current line
- O or ^
- Beginning of first screen line
- H or [[
- Beginning of last screen line
- L or ]]
- Beginning of middle screen line
- M
- Down one line
- j, "Return", +
- End of current line
- $
- Left one character
- h, "CTRL/H"
- Left to beginning of word
- b or B
- Right one character
- l, "Space"
- Right to end of word
- e, E
- Right to beginning of word
- w or W
- Up one line
- k or -
- Beginning of next sentence
- )
- Beginning of previous sentence
- (
- Back one screen
- "CTRL/B"
- Down half screen
- "CTRL/D"
- Forward one screen
- "CTRL/F"
- Forward to end of file
- G
- Move cursor to specified line*
- line no. G
- Up half screen
- "CTRL/U"
- Backward for pattern
- ?pattern
- Forward for pattern
- /pattern
- Repeat pattern serach
- n
- Reverse direction of search
- N
- Append text after cursor
- a
- Append text after end of line
- A
- Insert text before cursor
- i
- Insert text at beginning of line
- I
- Open new line after current line
- o
- Open new line before current line
- O
- Take next char literally & display
- "CTRL/W"
- Change current word
- cw or cW
- Change current line (cursor to end)
- C
- Delete character (cursor forward)*
- x
- Delete character (before cursor)*
- X
- Delete word*
- dw or dW
- Delete line*
- dd
- Delete text to end of line
- D
- Duplicate text
- (use yank and put)
- Join current line with next line*
- J
- Move text
- (use delete and put)
- Put buffer text after/below cursor
- p
- Put buffer text before/above cursor
- P
- Repeat last modification command
- .
- Replace current character*
- r
- Replace text to end of line
- R
- Substitute text for character*
- s
- Undo your previous command
- u
- Transpose characters
- xp
- Yank(copy) word to buffer*
- yw
- Yank(copy) current line to buffer*
- Y
- Overwrite last character
- "DELETE"
- Overwirte last word
- "CTRL/W"
- Quit (no changes made)
- :q!
- Quit and save changes
- ZZ or :wq!
- Quit and discard changes
- :q!
- Copy specified lines+
- :co or t
- Display number of each text line
- :set nu
- Move lines after specified line+
- :m
- Read file in after specified line+
- :r file
- Review current editor options
- :set
- Review editor options
- :set all
- Set new editor option
- :set option
- Write changes to original file+
- :w
- Write changes to specified file+
- :w file
- Write (overwirtes) to existing file+
- :w! file