vimdeck 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -1,4 +1,5 @@
1
1
  set nonumber
2
+ set hidden
2
3
  noremap <PageUp> :bp<CR>
3
4
  noremap <Left> :bp<CR>
4
5
  noremap <PageDown> :bn<CR>
data/lib/vimdeck.rb CHANGED
@@ -33,7 +33,7 @@ module Vimdeck
33
33
  [
34
34
  # block-level calls
35
35
  :block_quote,
36
- :block_html, :list, :list_item,
36
+ :block_html, :list_item,
37
37
 
38
38
  # span-level calls
39
39
  :autolink, :codespan, :double_emphasis,
@@ -52,6 +52,14 @@ module Vimdeck
52
52
  end
53
53
  end
54
54
 
55
+ def list(content, type)
56
+ if type == :unordered
57
+ "<!~#{content}~!>"
58
+ else
59
+ "<@~#{content}~@>"
60
+ end
61
+ end
62
+
55
63
  def header(title, level)
56
64
  case level
57
65
  when 1
@@ -104,6 +112,30 @@ module Vimdeck
104
112
  slide_num = "%03d" % (i+1)
105
113
  slide = renderer.render(slide)
106
114
 
115
+ regex = /\<\@\~(.*)\~\@\>/m
116
+ match = slide.match(regex)
117
+ while match && match[1] && match.post_match do
118
+ list = match[1].split("\n")
119
+ j = 0
120
+ list = list.map do |li|
121
+ j += 1
122
+ "#{j}. #{li}"
123
+ end
124
+ slide.sub!(regex, list.join("\n"))
125
+ match = match.post_match.match(regex)
126
+ end
127
+
128
+ regex = /\<\!\~(.*)\~\!\>/m
129
+ match = slide.match(regex)
130
+ while match && match[1] && match.post_match do
131
+ list = match[1].split("\n")
132
+ list = list.map do |li|
133
+ "\u2022 #{li}"
134
+ end
135
+ slide.sub!(regex, list.join("\n"))
136
+ match = match.post_match.match(regex)
137
+ end
138
+
107
139
  # buffer gets stashed into @buffers array for script template
108
140
  # needs to track things like the buffer number, code highlighting
109
141
  # and focus/unfocus stuff
@@ -1,4 +1,5 @@
1
1
  set nonumber
2
+ set hidden
2
3
  noremap <PageUp> :bp<CR>
3
4
  noremap <Left> :bp<CR>
4
5
  noremap <PageDown> :bn<CR>
@@ -21,7 +22,7 @@ b 3
21
22
  b 4
22
23
 
23
24
 
24
- call matchadd("Comment", "• Second\\n • Third\\(\\_.*slide 4\\)\\@=")
25
+ call matchadd("Comment", "\\n • Second\\n • Third\\(\\_.*slide 4\\)\\@=")
25
26
 
26
27
 
27
28
  b 5
@@ -29,7 +30,7 @@ b 5
29
30
 
30
31
  call matchadd("Comment", "• First\\(\\_.*slide 5\\)\\@=")
31
32
 
32
- call matchadd("Comment", "• Third\\(\\_.*slide 5\\)\\@=")
33
+ call matchadd("Comment", "\\n • Third\\(\\_.*slide 5\\)\\@=")
33
34
 
34
35
 
35
36
  b 6
@@ -3,10 +3,9 @@
3
3
  / / /_/ / /|_/ / _ / _// , _/ _// // / / /___/ /_\ \ / /
4
4
  /_/|_/\____/_/ /_/____/___/_/|_/___/____/ /____/___/___/ /_/
5
5
 
6
- This is how a numbered list
7
- Looks in vimdeck
8
- What do you think?
9
-
6
+ 1. This is how a numbered list
7
+ 2. Looks in vimdeck
8
+ 3. What do you think?
10
9
 
11
10
 
12
11
 
@@ -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 15
data/slides.md CHANGED
@@ -17,16 +17,16 @@
17
17
 
18
18
  # BULLETS
19
19
 
20
- • First
21
- {~• Second
20
+ • First{~
21
+ Second
22
22
  • Third~}
23
23
 
24
24
 
25
25
  # BULLETS
26
26
 
27
27
  {~• First~}
28
- • Second
29
- {~• Third~}
28
+ • Second{~
29
+ Third~}
30
30
 
31
31
 
32
32
  # BULLETS
data/vimdeck-0.1.3.gem ADDED
Binary file
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.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -75,7 +75,6 @@ files:
75
75
  - img/demo4.png
76
76
  - img/vim.png
77
77
  - lib/templates/script.vim.erb
78
- - lib/test
79
78
  - lib/vimdeck.rb
80
79
  - LICENSE.txt
81
80
  - presentation/script.vim
@@ -93,6 +92,7 @@ files:
93
92
  - presentation/slide012.md
94
93
  - presentation/slide013.md
95
94
  - presentation/slide014.md
95
+ - presentation/slide015.md
96
96
  - Rakefile
97
97
  - README.md
98
98
  - slides.md
@@ -101,6 +101,7 @@ files:
101
101
  - vimdeck-0.1.0.gem
102
102
  - vimdeck-0.1.1.gem
103
103
  - vimdeck-0.1.2.gem
104
+ - vimdeck-0.1.3.gem
104
105
  - vimdeck.gemspec
105
106
  homepage: http://github.com/tybenz/vimdeck
106
107
  licenses:
data/lib/test DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require './vimdeck2'
4
-
5
- Vimdeck.slideshow($1)