/
editing.txt
85 lines (61 loc) · 3.14 KB
/
editing.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
This document is for practice of Vim editing techniques. Through the tutorial, you can always quit with `:q!` and re-open this file.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example I: Use `x` to delete characters
There are some mistakes in this sentence.
--> There are somee mistakes inn thiis sentence.
--> There are some mistakkes in this senttence.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example II: Use `dw` to delete words
There are some mistakes in this sentence.
--> There are some some mistakes in this this sentence.
--> There are are are some mistakes in this sentence.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example III: Use `d$` to delete to the end of line
There are some mistakes in this sentence.
--> There are some mistakes in this sentence. &328afhj da823a;jkd
--> There are some mistakes in this sentence. &328dss sss ssfffffffffffa
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example IV: Use `<n>dw` with a count argument n to delete n words
--> This is MEOW MEOW MEOW a BLACK RED BLUE YELLOW simple sentence.
--> This is a simple SKJHF SLKJI IXMZ POKSQS SMCZIIM sentence.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example V: Use `dd` and `<n>dd` to delete line(s)
This is a sentence.
--> This is a sentence to be deleted.
This is a sentence.
--> This is a sentence to be deleted.
This is a sentence.
--> This is a sentence to be deleted.
--> This is a sentence to be deleted.
--> This is a sentence to be deleted.
This is a sentence.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example VI: Use `u` to undo
There are some mistakes in this sentence.
--> There are somee mistakess in this sentence.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example VII: Use `p` to put (i.e. paste)
There are some mistakes in this sentence.
--> There are mistakes some in this sentence.
--> There are some in this sentence. mistakes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example VIII: Use `r` or `R` to replace character(s)
There are some mistakes in this sentence.
--> There are sume mistakes in this sentence.
--> There are some misqhdsi in this sentence.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example IX: Use `c` to change the text
There are some mistakes in this sentence.
--> There are abcd mistakes in this sentence.
--> There are some &skdjfa;lfjdklajiojiofdkla;dj;sald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example X: Use `v` to switch to visual mode and move the cursor to select
There are some mistakes in this sentence.
--> There
--> There
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example XI: Use `"<tag>yy` to yank (copy) and name the buffer, `"<tag>p` to put
This is Sentence 3.
This is Sentence 1.
This is Sentence 2.
--> Order the sentences 1-3 in correct order.