-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro.html
307 lines (280 loc) · 12.6 KB
/
intro.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>This is a coffeepot</title>
<meta name="description" content="A presentation on Vim and Regexes">
<meta name="author" content="Siddharth Shukla and Frederik Schaefer">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/solarized.css" id="theme">
<link rel="stylesheet" href="custom.css">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section class="seb" data-background="images/javascript.jpg">
<h1 style="color:white">Vim and Regexes</h1>
<h3 style="color:white">Spice up your text editor</h3>
<p>
<small><a href="http://sshukla.de" target="_blank" style="color:white">Siddharth Shukla</a> /
<a href="http://twitter.com/thunderboltsid" target="_blank" style="color:white">@thunderboltsid</a>
</small>
<small><a href="https://github.com/jfschaefer" target="_blank" style="color:white">Frederik Schaefer</a> / <a href="http://twitter.com/idontusetwitter"
target="_blank" style="color:white">@idontusetwitter</a></small>
</p>
</section>
<section>
<section>
<h2>Who are we?</h2>
</section>
<section data-background="images/sid.jpg">
<h2 style="color:#fff;">Siddharth Shukla</h2>
<ul>
<li class="grad">
Third year CS Undergrad at JUB
</li>
<li class="grad">
Started using Vim last summer
</li>
<li class="grad">
Intern - Dolby Laboratories (Feb - Sept. 2015)
</li>
</ul>
</section>
<section class="seb" data-background="images/frederik.jpg">
<h2 style="color:#fff;">Frederik Schaefer</h2>
<ul>
<li class="grad">
Third year CS Undergrad at JUB
</li>
<li class="grad">
Using Vim since... Jacobs
</li>
<li class="grad">
We can use emojis 😎
</li>
</ul>
</section>
</section>
<section>
<section class="seb" data-background="images/agenda.jpg">
<ul>
<li class="gray">Introduction</li>
<li class="green">Modal Editors</li>
<li class="blue">Vim</li>
<li class="violet">Regular Expressions</li>
<li class="gray">Questions and Answers</li>
</ul>
</section>
</section>
<section>
<section class="seb" data-background="images/goals.jpg">
<h2>After this presentation you will...</h2>
<ul>
<li class="grad">know what modal editors are</li>
<li class="grad">know how Vim can make you more productive</li>
<li class="grad">know how Regexes can save you from misery</li>
</ul>
</section>
</section>
<section>
<section class="seb" data-background="images/iwish.jpg">
<h2 style="color:white">Things I wish I knew before</h2>
</section>
<section class="seb" data-background="images/iwish.jpg">
<ul>
<li class="grad">It's going to be different!</li>
<li class="grad">Learning Vim is a process</li>
<li class="grad">You need to breakup with your 🐁</li>
<li class="grad">Learn something new every week</li>
<li class="grad">It's not that "hard"</li>
</ul>
</section>
</section>
<section>
<section class="seb" data-background="images/webdevelopment.jpg">
<h2>There are modes!!!</h2>
</section>
<section class="seb" data-background="images/webdevelopment.jpg">
<h2>What about them?</h2>
<ul>
<li class="green">Normal</li>
<li class="blue">Insert</li>
<li class="violet">Visual</li>
</ul>
</section>
</section>
<section>
<section class="seb" data-background="rgba(0,0,0,1)">
<img src="images/tweet.png">
</section>
<section class="seb" data-background="rgba(0,0,0,1)">
<img src="images/faketweet.png">
</section>
<section class="seb" data-background="images/vim.png">
<h2>So, what's the hype about?</h2>
</section>
<section class="seb" data-background="images/vimhome.png">
<h2>The best text editor is the one you know best. But...</h2>
<ul>
<li class="grad">Vim is preinstalled on almost every OS</li>
<li class="grad">Vim can be run from a terminal or with the graphical interface (gvim)</li>
<li class="grad">Access to your ~/.vimrc file from github and you're ready to code</li>
</ul>
</section>
<section class="seb" data-background="images/homerow.jpg">
<h2 style="color:white">Home row navigation!</h2>
</section>
<section class="seb" data-background="images/vimhome.png">
<h2>Powerful Commands... Let's try some</h2>
<ul>
<li class="grad">d(delete) + i(in) + w(word)</li>
<li class="grad">c(change) + i(in) + w(word)</li>
<li class="grad">c(change) + t(till) + "(quotes)</li>
<li class="grad">:1,6s/foo/bar/g</li>
</ul>
</section>
</section>
<section>
<section class="seb" data-background="images/regularexpression.jpg">
<h2 style="color:white">Regexes...</h2>
<ul>
<li style="color:white" class="grad">A way to describe structure of a string</li>
<li style="color:white" class="grad">... that looks very messy</li>
</ul>
</section>
<section class="seb" data-background="images/regex.jpg">
<h2>Usage</h2>
<ul>
<li class="grad">Text Editors</li>
<li class="grad">Command Line Tools</li>
<li class="grad">Form Validation</li>
<li class="grad">Route description</li>
<li class="grad">Wherever need be...</li>
</ul>
</section>
<section class="seb" data-background="rgba(0,0,0,1)">
<img src="images/perl.png">
<section class="seb" data-background="images/numbers.jpg">
<p style="color:white;font-size:48pt;">
[+-]?(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?
</p>
</section>
<section class="seb" data-background="images/numbers.jpg">
<h2>Examples</h2>
<ul>
<li class="grad">a+b <span style="color:black">matches </span> ab, aaaab</li>
<li class="grad">[0-9]+ <span style="color:black">matches </span> 0312, 23</li>
<li class="grad">([0-9]x)+ <span style="color:black">matches </span> 3x5x, 0x</li>
</ul>
</section>
<section class="seb" data-background="images/numbers.jpg">
<h2>Find digits in file</h2>
<p style="color:white;font-size:40pt;">
cat example | grep --color=auto -P '[0-9]+'
</p>
</section>
<section class="seb" data-background="images/numbers.jpg">
<h2>Reset fontsize in config file</h2>
<p style="color:white;font-size:40pt;">
sed "s/^\(fontsize *= *\).*$/\124/" font.config
</p>
<p style="color:black; font-size:40pt;">
We find a match for <span style="color:white;">^\(fontsize *= *\).*$</span>
and replace it by <span style="color:white;">\124</span>
</p>
<p style="color:black; font-size:40pt;">
With parentheses you can mark groups and access them later
using <span style="color:white;">\1</span>,
<span style="color:white;">\2</span>, ...
</section>
</section>
<section style="text-align: left;">
<h1>THE END</h1>
<p>
- <a href="http://www.openvim.com" target="_blank">Try the
interactive tutorial</a> <br>
- <a href="http://vim-adventures.com" target="_blank">Play Vim Adventures online</a>
<br>
- <a href="http://michael.peopleofhonoronly.com/vim/vim_cheat_sheet_for_programmers_print.png" target="_blank">Vim Cheat Sheet</a> <br>
- <a href="http://vimcasts.org/" target="_blank">Vimcasts</a><br>
- <a href="http://rayninfo.co.uk/vimtips.html" target="_blank">David Rayner's Best of Vim Tips</a><br>
- <a href="http://www.viemu.com/a-why-vi-vim.html" target="_blank">Why, oh WHY, do those #?@! nutheads use vi?</a><br>
- <a href="https://regexcrossword.com/" target="_blank">Regex Crossword</a><br>
</p>
</section>
<section>
<section data-background="rgba(0,0,0,1)">
<img src="images/questions.jpg">
</section>
</section>
<section>
<section class="seb" data-background="images/thankyou.jpg">
<h2>Thank you</h2>
</section>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'convex', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{
src: 'lib/js/classList.js', condition: function () {
return !document.body.classList;
}
},
{
src: 'plugin/markdown/marked.js', condition: function () {
return !!document.querySelector('[data-markdown]');
}
},
{
src: 'plugin/markdown/markdown.js', condition: function () {
return !!document.querySelector('[data-markdown]');
}
},
{
src: 'plugin/highlight/highlight.js',
async: true,
condition: function () {
return !!document.querySelector('pre code');
},
callback: function () {
hljs.initHighlightingOnLoad();
}
},
{src: 'plugin/zoom-js/zoom.js', async: true},
{src: 'plugin/notes/notes.js', async: true}
]
});
</script>
</body>
</html>