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
