mirror of
https://github.com/cheat/cheat.git
synced 2024-11-23 22:41:35 +01:00
Added cheatsheet for vi
This commit is contained in:
parent
02ab2e7b8d
commit
3223ca6c0e
37
cheatsheets/vi
Normal file
37
cheatsheets/vi
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# To edit text (enter "insert" mode)
|
||||||
|
i
|
||||||
|
|
||||||
|
# To disable editing
|
||||||
|
Esc
|
||||||
|
|
||||||
|
# To exit and save changes
|
||||||
|
:x
|
||||||
|
|
||||||
|
# To quit without saving
|
||||||
|
:q!
|
||||||
|
|
||||||
|
# The following commands only work when not in insert mode
|
||||||
|
|
||||||
|
# To delete a line
|
||||||
|
dd
|
||||||
|
|
||||||
|
# To copy a line
|
||||||
|
y
|
||||||
|
|
||||||
|
# To paste a line
|
||||||
|
p
|
||||||
|
|
||||||
|
# To search for some text
|
||||||
|
/searchtext
|
||||||
|
|
||||||
|
# To search and replace
|
||||||
|
:1,$s/searchtext/replacetext/
|
||||||
|
|
||||||
|
# To move to the start of a line
|
||||||
|
0
|
||||||
|
|
||||||
|
# To move to the end of a line
|
||||||
|
$
|
||||||
|
|
||||||
|
# To move to the next word
|
||||||
|
w
|
Loading…
Reference in New Issue
Block a user