Guten Tag, heute ist der 8. September 2010 


Start
Chronik
Modellbahn
Lesezeichen
Homepages
Marcus
HTML & Co.
Linux/Unix
phpAV
Sicherheit_in der IT
Smarty
Typo3
Windows
Historie
Login
Suche
Homepages / Marcus / Linux/Unix / vi Editor commands /  Drucken 

general commands:

  • :w - write file to disk
  • :w! - write a readonly file!
  • :wq - write and quit
  • :q - quit vi
  • :q! - quit without saving
  • :set number - line numbering on
  • :set list - displays all characters
  • :set ff=dos - fileformat ; :set ff=unix
  • :set encoding=utf-8 - set file encoding character set
  • :split - split the window
  • :only - display only one window
  • Ctrl+w+w - goto next splitted window
  • :help nolist - online help about nolist

jump / search commands:

  • n - jump to next search match
  • N - jump to previous search match
  • <n> G - jump to line <n>
  • G - jump to eof
  • :1,$ s/pattern/new/g - substitute form line 1 to eof

block commands:

  • Ctrl+v - visual mode
  • :help CTRL-V-alternative
  • zf - fold marked area (with V)
  • zo - open folding
  • zc - close folding
  • zd - delete folded area markers
  • :help folding

editing commands:

  • i - insert mode
  • I - insert at beginning of line
  • ESC - end (insert) mode
  • A - append at end of line
  • . - repeat last action

  • r - replace character
  • R - replace till <ESC>
  • s<n> - substitute n characters
  • x - delete character
  • cw - change word
  • dw - delete word
  • d - delete line
  • yy - yank line
  • <n> Y - yank <n> lines
  • p - paste line
  • o - new line above

file buffer commands:

  • :e - load new file in editor buffer
  • :ls - list file buffers
  • :b n - switch to next file buffer
  • :b p - switch to previous file buffer
  • :b <TAB> - switch to "selected" file
  • :bd <n> - delete (close) file buffer n
Zuletzt aktualisiert am 11.10.2009 
© 1999-2010 M. Güldenmeister & Familie