vimdeck 0.0.5 → 0.0.7
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/VERSION +1 -1
- data/bin/vimdeck +2 -1
- data/lib/templates/script.vim.erb +3 -0
- data/lib/vimdeck.rb +20 -8
- data/presentation/script.vim +83 -1
- data/presentation/{slide0.md → slide001.md} +1 -0
- data/presentation/{slide1.md → slide002.md} +1 -0
- data/presentation/{slide2.md → slide003.md} +1 -0
- data/presentation/{slide3.md → slide004.md} +4 -3
- data/presentation/slide005.md +90 -0
- data/presentation/slide006.md +90 -0
- data/presentation/slide007.md +94 -0
- data/presentation/slide008.md +94 -0
- data/presentation/slide009.md +94 -0
- data/presentation/slide010.md +94 -0
- data/presentation/slide011.md +94 -0
- data/presentation/slide012.md +94 -0
- data/presentation/slide013.md +94 -0
- data/presentation/{slide5.md → slide014.md} +1 -0
- data/presentation/slide015.md +83 -0
- data/presentation/slide016.md +92 -0
- data/presentation/slide017.md +83 -0
- data/presentation/slide018.md +92 -0
- data/presentation/slide019.md +87 -0
- data/slides.md +142 -9
- data/vimdeck-0.0.5.gem +0 -0
- metadata +21 -7
- data/presentation/slide4.md +0 -94
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/bin/vimdeck
CHANGED
@@ -8,5 +8,8 @@ b <%= buffer[:num] %>
|
|
8
8
|
<% if buffer[:code] %>
|
9
9
|
<%= buffer[:code][:start] %>,<%= buffer[:code][:end] %>SyntaxInclude <%= buffer[:code][:language] %>
|
10
10
|
<% end %>
|
11
|
+
<% buffer[:comments].each do |comment| %>
|
12
|
+
call matchadd("Comment", "<%= comment %>")
|
13
|
+
<% end %>
|
11
14
|
<% end %>
|
12
15
|
b 1
|
data/lib/vimdeck.rb
CHANGED
@@ -68,24 +68,36 @@ module Vimdeck
|
|
68
68
|
code_height = code[0].split("\n").length - 2
|
69
69
|
code = code[0].gsub( /```[^\n]*\n/, '' ).gsub( /\n```/, '' )
|
70
70
|
slide = slide.gsub( /```[^\n]*\n/, '' ).gsub( /\n```/, '' )
|
71
|
+
|
72
|
+
if code_height > 0
|
73
|
+
start = slide.index(code)
|
74
|
+
start = slide[0..start].split("\n").length
|
75
|
+
buffer[:code][:end] = code_height + start - 1
|
76
|
+
buffer[:code][:start] = start
|
77
|
+
end
|
71
78
|
end
|
72
79
|
|
73
80
|
slide += "\n" * 80
|
74
|
-
|
75
|
-
if code_height > 0
|
76
|
-
start = slide.index(code)
|
77
|
-
start = slide[0..start].split("\n").length
|
78
|
-
buffer[:code][:end] = code_height + start - 1
|
79
|
-
buffer[:code][:start] = start
|
80
|
-
end
|
81
|
+
slide += "slide #{i+1}"
|
81
82
|
|
82
83
|
spaces = " "
|
83
84
|
slide = slide.gsub( /\n/, "\n#{spaces}" )
|
84
85
|
slide = spaces + slide
|
85
86
|
slide = slide.gsub( / *\n/, "\n" ).gsub( / *$/, '' )
|
86
87
|
|
88
|
+
regex = /\{\~(.*?)\~\}/m
|
89
|
+
match = slide.match(regex)
|
90
|
+
buffer[:comments] = []
|
91
|
+
while match && match[1] && match.post_match do
|
92
|
+
slide.sub!(regex, match[1])
|
93
|
+
pattern = match[1] + "||(||_.*slide #{i+1}||)||@="
|
94
|
+
buffer[:comments] << pattern.gsub(/\n/, "||n").gsub(/\[/, "||[").gsub(/\]/, "||]").gsub(/\|/, "\\").gsub(/\"/, "\\\"")
|
95
|
+
match = match.post_match.match(regex)
|
96
|
+
end
|
97
|
+
|
98
|
+
filenum = "%03d" % (i+1)
|
87
99
|
|
88
|
-
File.open("presentation/slide#{
|
100
|
+
File.open("presentation/slide#{filenum}.md", "w") do |file|
|
89
101
|
file.write slide
|
90
102
|
end
|
91
103
|
|
data/presentation/script.vim
CHANGED
@@ -7,21 +7,103 @@ noremap <Right> :bn<CR>
|
|
7
7
|
b 1
|
8
8
|
|
9
9
|
|
10
|
+
|
10
11
|
b 2
|
11
12
|
|
12
13
|
|
14
|
+
|
13
15
|
b 3
|
14
16
|
|
15
17
|
|
18
|
+
|
16
19
|
b 4
|
17
20
|
|
18
21
|
|
22
|
+
call matchadd("Comment", "• Second\\n • Third\\(\\_.*slide 4\\)\\@=")
|
23
|
+
|
24
|
+
|
19
25
|
b 5
|
20
26
|
|
21
|
-
|
27
|
+
|
28
|
+
call matchadd("Comment", "• First\\(\\_.*slide 5\\)\\@=")
|
29
|
+
|
30
|
+
call matchadd("Comment", "• Third\\(\\_.*slide 5\\)\\@=")
|
22
31
|
|
23
32
|
|
24
33
|
b 6
|
25
34
|
|
26
35
|
|
36
|
+
call matchadd("Comment", "• First\\n • Second\\(\\_.*slide 6\\)\\@=")
|
37
|
+
|
38
|
+
|
39
|
+
b 7
|
40
|
+
|
41
|
+
2,14SyntaxInclude ruby
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
b 8
|
46
|
+
|
47
|
+
2,14SyntaxInclude ruby
|
48
|
+
|
49
|
+
|
50
|
+
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\n highlight = \\(\\_.*slide 8\\)\\@=")
|
51
|
+
|
52
|
+
call matchadd("Comment", "\\n end\\n end\\n end\\(\\_.*slide 8\\)\\@=")
|
53
|
+
|
54
|
+
|
55
|
+
b 9
|
56
|
+
|
57
|
+
2,14SyntaxInclude ruby
|
58
|
+
|
59
|
+
|
60
|
+
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def\\(\\_.*slide 9\\)\\@=")
|
61
|
+
|
62
|
+
call matchadd("Comment", "highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 9\\)\\@=")
|
63
|
+
|
64
|
+
|
65
|
+
b 10
|
66
|
+
|
67
|
+
2,14SyntaxInclude ruby
|
68
|
+
|
69
|
+
|
70
|
+
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\n \"of a\"\\n end\\n\\n def can\\(\\_.*slide 10\\)\\@=")
|
71
|
+
|
72
|
+
call matchadd("Comment", "= \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 10\\)\\@=")
|
73
|
+
|
74
|
+
|
75
|
+
b 11
|
76
|
+
|
77
|
+
2,14SyntaxInclude ruby
|
78
|
+
|
79
|
+
|
80
|
+
call matchadd("Comment", "module\\(\\_.*slide 11\\)\\@=")
|
81
|
+
|
82
|
+
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 11\\)\\@=")
|
83
|
+
|
84
|
+
|
85
|
+
b 12
|
86
|
+
|
87
|
+
2,14SyntaxInclude ruby
|
88
|
+
|
89
|
+
|
90
|
+
call matchadd("Comment", "module Parts\\n class foo\\n def slide\\(\\_.*slide 12\\)\\@=")
|
91
|
+
|
92
|
+
call matchadd("Comment", "end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 12\\)\\@=")
|
93
|
+
|
94
|
+
|
95
|
+
b 13
|
96
|
+
|
97
|
+
2,14SyntaxInclude ruby
|
98
|
+
|
99
|
+
|
100
|
+
call matchadd("Comment", "module Parts\\n class foo\\n def\\(\\_.*slide 13\\)\\@=")
|
101
|
+
|
102
|
+
call matchadd("Comment", "\"of a\"\\n end\\n\\n def can\\n highlight = \"vimdeck\"\\n end\\n end\\n end\\(\\_.*slide 13\\)\\@=")
|
103
|
+
|
104
|
+
|
105
|
+
b 14
|
106
|
+
|
107
|
+
|
108
|
+
|
27
109
|
b 1
|
@@ -0,0 +1,90 @@
|
|
1
|
+
____ ____ __
|
2
|
+
/ __ )__ __/ / /__ / /______
|
3
|
+
/ __ / / / / / / _ \/ __/ ___/
|
4
|
+
/ /_/ / /_/ / / / __/ /_(__ )
|
5
|
+
/_____/\__,_/_/_/\___/\__/____/
|
6
|
+
|
7
|
+
|
8
|
+
• First
|
9
|
+
• Second
|
10
|
+
• Third
|
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
|
+
slide 5
|
@@ -0,0 +1,90 @@
|
|
1
|
+
____ ____ __
|
2
|
+
/ __ )__ __/ / /__ / /______
|
3
|
+
/ __ / / / / / / _ \/ __/ ___/
|
4
|
+
/ /_/ / /_/ / / / __/ /_(__ )
|
5
|
+
/_____/\__,_/_/_/\___/\__/____/
|
6
|
+
|
7
|
+
|
8
|
+
• First
|
9
|
+
• Second
|
10
|
+
• Third
|
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
|
+
slide 6
|
@@ -0,0 +1,94 @@
|
|
1
|
+
|
2
|
+
# VIMDECK DOES CODE!
|
3
|
+
|
4
|
+
module Parts
|
5
|
+
class foo
|
6
|
+
def slide
|
7
|
+
"of a"
|
8
|
+
end
|
9
|
+
|
10
|
+
def can
|
11
|
+
highlight = "vimdeck"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
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
|
+
slide 7
|
@@ -0,0 +1,94 @@
|
|
1
|
+
|
2
|
+
# VIMDECK DOES CODE!
|
3
|
+
|
4
|
+
module Parts
|
5
|
+
class foo
|
6
|
+
def slide
|
7
|
+
"of a"
|
8
|
+
end
|
9
|
+
|
10
|
+
def can
|
11
|
+
highlight = "vimdeck"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
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
|
+
slide 8
|
@@ -0,0 +1,94 @@
|
|
1
|
+
|
2
|
+
# VIMDECK DOES CODE!
|
3
|
+
|
4
|
+
module Parts
|
5
|
+
class foo
|
6
|
+
def slide
|
7
|
+
"of a"
|
8
|
+
end
|
9
|
+
|
10
|
+
def can
|
11
|
+
highlight = "vimdeck"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
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
|
+
slide 9
|