-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
240 lines (213 loc) · 6.38 KB
/
index.html
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>VIM</title>
<link rel="stylesheet" href="reveal.js/dist/reset.css">
<link rel="stylesheet" href="reveal.js/dist/reveal.css">
<link rel="stylesheet" href="reveal.js/dist/theme/solarized.css" id="theme">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="reveal.js/plugin/highlight/monokai.css" id="highlight-theme">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1> Vim </h1>
<hr />
</section>
<section>
<section>
<h3>What is Vim? and why Vim?</h3>
<img src="vim.png" style="height: 40rem;" />
</section>
<section id="why">
<h3>What is Vim? and why Vim?</h3>
<p>
<ul>
<li>
Vim is a <a href="#/modal-editor"><em>modal</em></a> editor
</li>
<li>
It's <a href="#/scalable"><em>scalable</em></a>
</li>
<li>
It's powerful. It is <a href="#/language"><em>like a language</em></a>
</li>
</ul>
</p>
</section>
</section>
<section id="modal-editor">
<h3>What is a <a href="#/why">modal</a> editor? you might ask</h3>
<p>
<ul>
<li>
<a href="#/normal">Normal</a>
</li>
<li>
<a href="#/insert">Insert</a>
</li>
<li>
<a href="#/visual">Visual</a>
</li>
</ul>
</p>
</section>
<section id="scalable">
<h3> What do you mean by <a href="#/why">"scalable"</a>?</h3>
<p>
<ul>
<li>Vim can be used to edit just config files or it can become your entire writing and coding platform.</li>
<li>You don't have to worry about learning new editors.</li>
</ul>
</p>
</section>
<section>
<section id="normal">
<h3> Normal Mode </h3>
<ul>
<li><b>h</b>: move left </li>
<li><b>j</b>: move down </li>
<li><b>k</b>: move up </li>
<li><b>l</b>: move right </li>
</ul>
</section>
<section>
<ul>
<li><b>0</b>: move to the beginning of the line</li>
<li><b>$</b>: move to the end of the line</li>
<li><b>w</b>: move forward one word</li>
<li><b>b</b>: move back one word</li>
<li><b>e</b>: move to the end of your word</li>
</ul>
</section>
<section>
<ul>
<li><b>gg</b>: go to the top of the file</li>
<li><b>G</b>: go to the bottom of the file</li>
<li><b>H</b>: move to the top of the screen</li>
<li><b>M</b>: move to the middle of the screen</li>
<li><b>L</b>: move to the bottom of the screen</li>
</ul>
</section>
<section>
<ul>
<li><b>x</b>: exterminate (delete) the character under the cursor</li>
<li><b>X</b>: exterminate (delete) the character before the cursor</li>
<li><b>dd</b>: delete the current line</li>
<li><b>D</b>: delete to the end of the line</li>
</ul>
</section>
<section id="language">
<h3> Don't tell me this is another programming <a href="#/why">language</a> </h3>
<p> Time to think right and combine some commands. </p>
</section>
<section>
<ul>
<li><b>f</b>: finds and stops at the character</li>
<li><b>t</b>: finds and stops before the character</li>
</ul>
</section>
</section>
<section id="insert">
<section>
<h3> Insert Mode </h3>
<ul>
<li>i: insert before the cursor</li>
<li>a: append after the cursor</li>
<li>I: insert at the beginning of the line</li>
<li>A: append at the end of the line</li>
<li>o: open a new line below the current one</li>
<li>O: open a new line above the current one</li>
<li>r: replace the one character under your cursor</li>
<li>R: replace the character under your cursor, but just keep typing afterwards</li>
</ul>
</section>
<section>
<ul>
<li>cm: change whatever you define as a movement, e.g. a word, or a sentence, or a paragraph.</li>
<li>C: change the current line from where you're at</li>
<li>ct?: change change up to the question mark</li>
<li>s: substitute from where you are to the next command (noun)</li>
<li>S: substitute the entire current line</li>
</ul>
</section>
</section>
<section id="visual">
<h3> Visual Mode </h3>
<ul>
<li><b>character-based</b>: v</li>
<li><b>line-based</b>: V</li>
<li><b>paragraphs</b>: Ctrl-v</li>
</ul>
</section>
<section>
<h3> Let's change a few things first</h3>
</section>
<section>
<section>
<h3> Searching time </h3>
<ul>
<li>/{string}: search for string</li>
<li>t: jump up to a character</li>
<li>f: jump onto a character</li>
<li>*: search for other instances of the word under your cursor</li>
<li>n: go to the next instance when you've searched for a string</li>
<li>N: go to the previous instance when you've searched for a string</li>
</ul>
</section>
<section>
<ul>
<li><b>Ctrl-i</b>: jump to your previos navigation location</li>
<li><b>Ctrl-o</b>: jump back to where you were</li>
</ul>
</section>
</section>
<section>
<h3> Repeating Actions </h3>
The "dot command"
</section>
<section>
<h3> Substitution </h3>
<ul>
<li><b>:%s/foo/bar/g</b>: Changes "foo" to "bar" on every line</li>
<li><b>:s/foo/bar/g</b>: Changes "foo" to "bar" on just the current line</li>
</ul>
</section>
<section>
<section>
<h3> Macros </h3>
Record and replay frequent commands.
</section>
<section>
<h3>Steps:</h3>
<ul>
<li>qa: start recording a macro named "a"</li>
<li>q: stop recording</li>
<li>@a: play back the macro</li>
</ul>
</section>
</section>
<section>
La fin.
</section>
</div>
</div>
<script src="reveal.js/dist/reveal.js"></script>
<script src="reveal.js/plugin/notes/notes.js"></script>
<script src="reveal.js/plugin/markdown/markdown.js"></script>
<script src="reveal.js/plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes]
});
</script>
</body>
</html>