vimdeck 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -0
- data/VERSION +1 -1
- data/bin/vimdeck +1 -0
- data/lib/templates/script.vim.erb +3 -1
- data/lib/vimdeck.rb +5 -3
- data/presentation/script.vim +58 -0
- data/presentation/slide015.md +14 -6
- data/presentation/slide016.md +95 -0
- data/presentation/slide017.md +95 -0
- data/presentation/slide018.md +95 -0
- data/presentation/slide019.md +87 -0
- data/slides.md +68 -0
- metadata +5 -1
data/README.md
CHANGED
@@ -130,3 +130,7 @@ Images are even converted to ascii art!
|
|
130
130
|
---------------------
|
131
131
|
|
132
132
|
Made by [tybenz](http://github.com/tybenz): [tybenz.com](http://tybenz.com) // [@tybenz](http://twitter.com/tybenz)
|
133
|
+
|
134
|
+
|
135
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|
136
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.9
|
data/bin/vimdeck
CHANGED
@@ -9,7 +9,9 @@ noremap Q :q<CR>
|
|
9
9
|
<% @buffers.each do |buffer| %>
|
10
10
|
b <%= buffer[:num] %>
|
11
11
|
<% if buffer[:code] %>
|
12
|
-
|
12
|
+
<% buffer[:code].each do |code| %>
|
13
|
+
<%= code[:start] %>,<%= code[:end] %>SyntaxInclude <%= code[:language] %>
|
14
|
+
<% end %>
|
13
15
|
<% end %>
|
14
16
|
<% buffer[:comments].each do |comment| %>
|
15
17
|
call matchadd("Comment", "<%= comment %>")
|
data/lib/vimdeck.rb
CHANGED
@@ -180,7 +180,8 @@ module Vimdeck
|
|
180
180
|
code = nil
|
181
181
|
code = slide.match( /```([^\n]*)\n.*\n```/m )
|
182
182
|
if code
|
183
|
-
buffer[:code] =
|
183
|
+
buffer[:code] = []
|
184
|
+
code_hash = { :language => code[1] }
|
184
185
|
code_height = code[0].split("\n").length - 2
|
185
186
|
code = code[0].gsub( /```[^\n]*\n/, '' ).gsub( /\n```/, '' )
|
186
187
|
slide = slide.gsub( /```[^\n]*\n/, '' ).gsub( /\n```/, '' )
|
@@ -188,9 +189,10 @@ module Vimdeck
|
|
188
189
|
if code_height > 0
|
189
190
|
start = slide.index(code)
|
190
191
|
start = slide[0..start].split("\n").length
|
191
|
-
|
192
|
-
|
192
|
+
code_hash[:end] = code_height + start - 1
|
193
|
+
code_hash[:start] = start
|
193
194
|
end
|
195
|
+
buffer[:code] << code_hash
|
194
196
|
end
|
195
197
|
|
196
198
|
# Prepending each line with slide_padding
|
data/presentation/script.vim
CHANGED
@@ -45,15 +45,19 @@ call matchadd("Comment", "• First\\n • Second\\(\\_.*slide 007\\)\\@=
|
|
45
45
|
|
46
46
|
b 8
|
47
47
|
|
48
|
+
|
48
49
|
6,17SyntaxInclude ruby
|
49
50
|
|
50
51
|
|
51
52
|
|
53
|
+
|
52
54
|
b 9
|
53
55
|
|
56
|
+
|
54
57
|
6,17SyntaxInclude ruby
|
55
58
|
|
56
59
|
|
60
|
+
|
57
61
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \\(\\_.*slide 009\\)\\@=")
|
58
62
|
|
59
63
|
call matchadd("Comment", "\\n end\\n end\\n end\\(\\_.*slide 009\\)\\@=")
|
@@ -61,9 +65,11 @@ call matchadd("Comment", "\\n end\\n end\\n end\\(\\_
|
|
61
65
|
|
62
66
|
b 10
|
63
67
|
|
68
|
+
|
64
69
|
6,17SyntaxInclude ruby
|
65
70
|
|
66
71
|
|
72
|
+
|
67
73
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def\\(\\_.*slide 010\\)\\@=")
|
68
74
|
|
69
75
|
call matchadd("Comment", "highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 010\\)\\@=")
|
@@ -71,9 +77,11 @@ call matchadd("Comment", "highlight = \"vimdeck\"\\n end\\n
|
|
71
77
|
|
72
78
|
b 11
|
73
79
|
|
80
|
+
|
74
81
|
6,17SyntaxInclude ruby
|
75
82
|
|
76
83
|
|
84
|
+
|
77
85
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\(\\_.*slide 011\\)\\@=")
|
78
86
|
|
79
87
|
call matchadd("Comment", "= \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 011\\)\\@=")
|
@@ -81,9 +89,11 @@ call matchadd("Comment", "= \"vimdeck\"\\n end\\n end\\n
|
|
81
89
|
|
82
90
|
b 12
|
83
91
|
|
92
|
+
|
84
93
|
6,17SyntaxInclude ruby
|
85
94
|
|
86
95
|
|
96
|
+
|
87
97
|
call matchadd("Comment", "module\\(\\_.*slide 012\\)\\@=")
|
88
98
|
|
89
99
|
call matchadd("Comment", "class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 012\\)\\@=")
|
@@ -91,9 +101,11 @@ call matchadd("Comment", "class foo\\n def slide\\n \"of
|
|
91
101
|
|
92
102
|
b 13
|
93
103
|
|
104
|
+
|
94
105
|
6,17SyntaxInclude ruby
|
95
106
|
|
96
107
|
|
108
|
+
|
97
109
|
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\(\\_.*slide 013\\)\\@=")
|
98
110
|
|
99
111
|
call matchadd("Comment", "end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 013\\)\\@=")
|
@@ -101,9 +113,11 @@ call matchadd("Comment", "end\\n\\n def can\\n highlight
|
|
101
113
|
|
102
114
|
b 14
|
103
115
|
|
116
|
+
|
104
117
|
6,17SyntaxInclude ruby
|
105
118
|
|
106
119
|
|
120
|
+
|
107
121
|
call matchadd("Comment", "module Parts\\n class foo\\n def\\(\\_.*slide 014\\)\\@=")
|
108
122
|
|
109
123
|
call matchadd("Comment", "\"of a\"\\n end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 014\\)\\@=")
|
@@ -112,5 +126,49 @@ call matchadd("Comment", "\"of a\"\\n end\\n\\n def can\\n
|
|
112
126
|
b 15
|
113
127
|
|
114
128
|
|
129
|
+
6,16SyntaxInclude javascript
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
b 16
|
135
|
+
|
136
|
+
|
137
|
+
6,16SyntaxInclude javascript
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
call matchadd("Comment", "(function( window, $, undefined ) {\\n $( '.hello' ).on( 'click', function sayHello() {\\(\\_.*slide 016\\)\\@=")
|
142
|
+
|
143
|
+
call matchadd("Comment", "\\n });\\n })( window, jQuery );\\(\\_.*slide 016\\)\\@=")
|
144
|
+
|
145
|
+
|
146
|
+
b 17
|
147
|
+
|
148
|
+
|
149
|
+
6,16SyntaxInclude javascript
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
call matchadd("Comment", "<body>\\(\\_.*slide 017\\)\\@=")
|
154
|
+
|
155
|
+
call matchadd("Comment", "</body>\\(\\_.*slide 017\\)\\@=")
|
156
|
+
|
157
|
+
|
158
|
+
b 18
|
159
|
+
|
160
|
+
|
161
|
+
6,16SyntaxInclude javascript
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
call matchadd("Comment", "(function( window, $, undefined ) {\\n $( '.hello' ).on( 'click', function sayHello() {\\(\\_.*slide 018\\)\\@=")
|
166
|
+
|
167
|
+
call matchadd("Comment", "\\n });\\n })( window, jQuery );\\n\\n <body>\\n <a href=\"#\" class=\"hello\">Hello!</a>\\n </body>\\(\\_.*slide 018\\)\\@=")
|
168
|
+
|
169
|
+
|
170
|
+
b 19
|
171
|
+
|
172
|
+
|
115
173
|
|
116
174
|
b 1
|
data/presentation/slide015.md
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
-
|
2
|
-
/_
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
_________ ___ ____ ___ ______ ___
|
2
|
+
/ ___/ __ \/ _ \/ __/ / _ \_ __/ |_ |
|
3
|
+
/ /__/ /_/ / // / _/ / ___// / / __/
|
4
|
+
\___/\____/____/___/ /_/ /_/ /____/
|
5
|
+
|
6
|
+
(function( window, $, undefined ) {
|
7
|
+
$( '.hello' ).on( 'click', function sayHello() {
|
8
|
+
alert( 'Why, hello there!' );
|
9
|
+
});
|
10
|
+
})( window, jQuery );
|
11
|
+
|
12
|
+
<body>
|
13
|
+
<a href="#" class="hello">Hello!</a>
|
14
|
+
</body>
|
7
15
|
|
8
16
|
|
9
17
|
|
@@ -0,0 +1,95 @@
|
|
1
|
+
_________ ___ ____ ___ ______ ___
|
2
|
+
/ ___/ __ \/ _ \/ __/ / _ \_ __/ |_ |
|
3
|
+
/ /__/ /_/ / // / _/ / ___// / / __/
|
4
|
+
\___/\____/____/___/ /_/ /_/ /____/
|
5
|
+
|
6
|
+
(function( window, $, undefined ) {
|
7
|
+
$( '.hello' ).on( 'click', function sayHello() {
|
8
|
+
alert( 'Why, hello there!' );
|
9
|
+
});
|
10
|
+
})( window, jQuery );
|
11
|
+
|
12
|
+
<body>
|
13
|
+
<a href="#" class="hello">Hello!</a>
|
14
|
+
</body>
|
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
|
+
slide 016
|
@@ -0,0 +1,95 @@
|
|
1
|
+
_________ ___ ____ ___ ______ ___
|
2
|
+
/ ___/ __ \/ _ \/ __/ / _ \_ __/ |_ |
|
3
|
+
/ /__/ /_/ / // / _/ / ___// / / __/
|
4
|
+
\___/\____/____/___/ /_/ /_/ /____/
|
5
|
+
|
6
|
+
(function( window, $, undefined ) {
|
7
|
+
$( '.hello' ).on( 'click', function sayHello() {
|
8
|
+
alert( 'Why, hello there!' );
|
9
|
+
});
|
10
|
+
})( window, jQuery );
|
11
|
+
|
12
|
+
<body>
|
13
|
+
<a href="#" class="hello">Hello!</a>
|
14
|
+
</body>
|
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
|
+
slide 017
|
@@ -0,0 +1,95 @@
|
|
1
|
+
_________ ___ ____ ___ ______ ___
|
2
|
+
/ ___/ __ \/ _ \/ __/ / _ \_ __/ |_ |
|
3
|
+
/ /__/ /_/ / // / _/ / ___// / / __/
|
4
|
+
\___/\____/____/___/ /_/ /_/ /____/
|
5
|
+
|
6
|
+
(function( window, $, undefined ) {
|
7
|
+
$( '.hello' ).on( 'click', function sayHello() {
|
8
|
+
alert( 'Why, hello there!' );
|
9
|
+
});
|
10
|
+
})( window, jQuery );
|
11
|
+
|
12
|
+
<body>
|
13
|
+
<a href="#" class="hello">Hello!</a>
|
14
|
+
</body>
|
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
|
+
slide 018
|
@@ -0,0 +1,87 @@
|
|
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
|
+
slide 019
|
data/slides.md
CHANGED
@@ -162,4 +162,72 @@ end~}
|
|
162
162
|
```
|
163
163
|
|
164
164
|
|
165
|
+
## CODE PT 2
|
166
|
+
|
167
|
+
```javascript
|
168
|
+
(function( window, $, undefined ) {
|
169
|
+
$( '.hello' ).on( 'click', function sayHello() {
|
170
|
+
alert( 'Why, hello there!' );
|
171
|
+
});
|
172
|
+
})( window, jQuery );
|
173
|
+
```
|
174
|
+
|
175
|
+
```html
|
176
|
+
<body>
|
177
|
+
<a href="#" class="hello">Hello!</a>
|
178
|
+
</body>
|
179
|
+
```
|
180
|
+
|
181
|
+
|
182
|
+
## CODE PT 2
|
183
|
+
|
184
|
+
```javascript
|
185
|
+
{~(function( window, $, undefined ) {
|
186
|
+
$( '.hello' ).on( 'click', function sayHello() {~}
|
187
|
+
alert( 'Why, hello there!' );{~
|
188
|
+
});
|
189
|
+
})( window, jQuery );~}
|
190
|
+
```
|
191
|
+
|
192
|
+
```html
|
193
|
+
<body>
|
194
|
+
<a href="#" class="hello">Hello!</a>
|
195
|
+
</body>
|
196
|
+
```
|
197
|
+
|
198
|
+
|
199
|
+
## CODE PT 2
|
200
|
+
|
201
|
+
```javascript
|
202
|
+
(function( window, $, undefined ) {
|
203
|
+
$( '.hello' ).on( 'click', function sayHello() {
|
204
|
+
alert( 'Why, hello there!' );
|
205
|
+
});
|
206
|
+
})( window, jQuery );
|
207
|
+
```
|
208
|
+
|
209
|
+
```html
|
210
|
+
{~<body>~}
|
211
|
+
<a href="#" class="hello">Hello!</a>
|
212
|
+
{~</body>~}
|
213
|
+
```
|
214
|
+
|
215
|
+
|
216
|
+
## CODE PT 2
|
217
|
+
|
218
|
+
```javascript
|
219
|
+
{~(function( window, $, undefined ) {
|
220
|
+
$( '.hello' ).on( 'click', function sayHello() {~}
|
221
|
+
alert( 'Why, hello there!' );{~
|
222
|
+
});
|
223
|
+
})( window, jQuery );
|
224
|
+
```
|
225
|
+
|
226
|
+
```html
|
227
|
+
<body>
|
228
|
+
<a href="#" class="hello">Hello!</a>
|
229
|
+
</body>~}
|
230
|
+
```
|
231
|
+
|
232
|
+
|
165
233
|
# The End!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vimdeck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -93,6 +93,10 @@ files:
|
|
93
93
|
- presentation/slide013.md
|
94
94
|
- presentation/slide014.md
|
95
95
|
- presentation/slide015.md
|
96
|
+
- presentation/slide016.md
|
97
|
+
- presentation/slide017.md
|
98
|
+
- presentation/slide018.md
|
99
|
+
- presentation/slide019.md
|
96
100
|
- Rakefile
|
97
101
|
- README.md
|
98
102
|
- slides.md
|