Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vi commands: ( http://www.unix-manuals.com/refs/vi-ref/vi-ref.htm )
- ===================================
- Insert mode [ i ]
- ===================================
- i - insert text at cursor
- I - insert text at beginning of line
- A - viib kursori line'i lõppu (append text at line A)
- a - append text after cursor (sama nagu i, lihtsalt esimene char läheb PÄRAST kursorit; i puhul läheb kusori kohale);
- o - open line below cursor (open line st tekitab ridade vahele uue rea)
- O - open line above cursor
- cw - kustutab antud sõna (ehk change word)
- cc - kustutab antud rea (ehk change line)
- C - kustutab kursorist kuni rea lõppu
- ===================================
- Command mode [ Esc ]
- ===================================
- CURSOR MOVEMENT:
- arrows / h j k l
- 0 - go to beginning of line
- $ - go to end of line
- nG - go to line n == :n
- G - go to last line (end of file)
- w/b - scroll by word
- ===================================
- EDIT:
- . - repeat last command
- yy - copies line
- p - pastes below cursor
- P - pastes above cursor
- u - undo previous command
- U - undo all changes to line
- D - sama mis C (kustutab kursorist kuni rea lõppu), kuid jääb command mode'i
- :set ignorecase - Ignore case sensitivity when searching
- :set noignorecase - Restore case sensitivity (default)
- ?string - search backward for string (st otsib alt-üles)
- /string - search forward for string
- :syntax on - highlighting
- :syntax off
- ===================================
- DELETE:
- x - delete char at cursor (st käitub nagu del )
- X - delete (backspace) text at cursor (st käitub nagu backspace)
- D - delete current to end of line
- dd - delete entire line
- 5dd - delete 5 lines
- :5,10d - delete lines 5-10
- ===================================
- Save/quit:
- :w - save changes to buffer
- zz or :wq - save changes and quit
- :q! - quit w/o saving
- :w filename - save file to new file
- ===================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement