You are here: Home Linux Basics vi Texteditor basics
Search
Advanced Search…
E-Mail

Webmail: webmail.wyden.com

E-Mail Preferences: postfix.wyden.com/users

E-Mail Administration: postfix.wyden.com

Statistics
Total: 463
Total Pages: 284
Total Folders: 87
Total Files: 18
Total Links: 26
Last modification: 03.02.2012 16:00
 

vi Texteditor basics

by Wyden Silvan last modified 26.11.2009 16:44

#make the vi the standard editor
export EDITOR=vi (once)
echo "export EDITOR=vi" >> ~/.bashrc (after each login)

  • 0: beginning of line
  • $: end of line
  • a: append
  • d: cut a text marked with v
  • dd: delete a complet line
  • i: insert
  • o: new line below cursor position
  • O: new line above cursor position
  • p: paste
  • u: undo (Rückgängig)
  • v: visual mode
  • y: copy a text marked with v
  • yy: copy the whole line (paste with p)
  • /test: search in the file the keyword "test" -> n to go to next keyword
  • show number of the lines :set number -> set nonumber