karottenreibe-vim-syntax 0.0.2 → 0.0.3
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/HISTORY.markdown +6 -1
- data/Rakefile +17 -0
- data/VERSION +1 -0
- data/lib/vim-syntax.rb +10 -6
- data/vim-syntax.gemspec +28 -13
- metadata +14 -11
data/HISTORY.markdown
CHANGED
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'jeweler'
|
2
|
+
|
3
|
+
task :release do
|
4
|
+
sh "vim HISTORY.markdown"
|
5
|
+
sh "vim README.markdown"
|
6
|
+
sh "git commit -a -m 'prerelease adjustments' || 1"
|
7
|
+
end
|
8
|
+
|
9
|
+
Jeweler::Tasks.new do |gem|
|
10
|
+
gem.name = "vim-syntax"
|
11
|
+
gem.summary = gem.description = "A simple (!) extension to the syntax gem, that allows you to highlight vim syntax."
|
12
|
+
gem.email = "karottenreibe@gmail.com"
|
13
|
+
gem.homepage = "http://github.com/karottenreibe/vim-syntax"
|
14
|
+
gem.authors = ["Fabian Streitel"]
|
15
|
+
gem.add_dependency('syntax')
|
16
|
+
end
|
17
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.3
|
data/lib/vim-syntax.rb
CHANGED
@@ -6,14 +6,18 @@ class VimTokenizer < Syntax::Tokenizer
|
|
6
6
|
def step
|
7
7
|
@got_command ||= false
|
8
8
|
|
9
|
-
if comment = scan(%r{"
|
9
|
+
if comment = scan(%r{\n".*?$}) # full line comment
|
10
|
+
start_group(:whitespace, "\n")
|
10
11
|
start_group(:comment, comment)
|
11
|
-
elsif
|
12
|
+
elsif comment = scan(%r{"[^"]*?$}) # end of line comment
|
13
|
+
start_group(:comment, comment)
|
14
|
+
elsif string = scan(%r{"[^"]*?"|'[^']*?'})
|
12
15
|
start_group(:string, string)
|
13
|
-
elsif scan(%r{function (\w+)\(\)(.*?)endfunction}m)
|
14
|
-
start_group(:command,
|
15
|
-
start_group(:functionname, subgroup(
|
16
|
-
start_group(:functionbody, subgroup(
|
16
|
+
elsif scan(%r{(function!?) (\w+)\(\)(.*?)endfunction}m)
|
17
|
+
start_group(:command, subgroup(1))
|
18
|
+
start_group(:functionname, subgroup(2))
|
19
|
+
start_group(:functionbody, subgroup(3))
|
20
|
+
start_group(:command, 'endfunction')
|
17
21
|
elsif number = scan(%r{\d+})
|
18
22
|
start_group(:number, number)
|
19
23
|
elsif key = scan(%r{<[^<]+>})
|
data/vim-syntax.gemspec
CHANGED
@@ -1,31 +1,46 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
1
4
|
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = %q{vim-syntax}
|
5
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
6
9
|
|
7
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors =
|
9
|
-
s.date = %q{2009-
|
10
|
-
s.description = %q{
|
11
|
+
s.authors = ["Fabian Streitel"]
|
12
|
+
s.date = %q{2009-08-05}
|
13
|
+
s.description = %q{A simple (!) extension to the syntax gem, that allows you to highlight vim syntax.}
|
11
14
|
s.email = %q{karottenreibe@gmail.com}
|
12
|
-
s.
|
13
|
-
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"HISTORY.markdown",
|
21
|
+
"LICENSE.txt",
|
22
|
+
"README.markdown",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"lib/vim-syntax.rb",
|
26
|
+
"vim-syntax.gemspec"
|
27
|
+
]
|
14
28
|
s.homepage = %q{http://github.com/karottenreibe/vim-syntax}
|
15
|
-
s.
|
16
|
-
s.
|
29
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
30
|
+
s.require_paths = ["lib"]
|
31
|
+
s.rubygems_version = %q{1.3.4}
|
32
|
+
s.summary = %q{A simple (!) extension to the syntax gem, that allows you to highlight vim syntax.}
|
17
33
|
|
18
34
|
if s.respond_to? :specification_version then
|
19
35
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
20
|
-
s.specification_version =
|
36
|
+
s.specification_version = 3
|
21
37
|
|
22
38
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
23
|
-
s.add_runtime_dependency(%q<syntax
|
39
|
+
s.add_runtime_dependency(%q<syntax>, [">= 0"])
|
24
40
|
else
|
25
|
-
s.add_dependency(%q<syntax
|
41
|
+
s.add_dependency(%q<syntax>, [">= 0"])
|
26
42
|
end
|
27
43
|
else
|
28
|
-
s.add_dependency(%q<syntax
|
44
|
+
s.add_dependency(%q<syntax>, [">= 0"])
|
29
45
|
end
|
30
46
|
end
|
31
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karottenreibe-vim-syntax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabian Streitel
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-05 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,26 +22,29 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: "0"
|
24
24
|
version:
|
25
|
-
description:
|
25
|
+
description: A simple (!) extension to the syntax gem, that allows you to highlight vim syntax.
|
26
26
|
email: karottenreibe@gmail.com
|
27
27
|
executables: []
|
28
28
|
|
29
29
|
extensions: []
|
30
30
|
|
31
|
-
extra_rdoc_files:
|
32
|
-
|
31
|
+
extra_rdoc_files:
|
32
|
+
- LICENSE.txt
|
33
|
+
- README.markdown
|
33
34
|
files:
|
34
35
|
- HISTORY.markdown
|
35
|
-
- README.markdown
|
36
36
|
- LICENSE.txt
|
37
|
-
-
|
37
|
+
- README.markdown
|
38
|
+
- Rakefile
|
39
|
+
- VERSION
|
38
40
|
- lib/vim-syntax.rb
|
41
|
+
- vim-syntax.gemspec
|
39
42
|
has_rdoc: false
|
40
43
|
homepage: http://github.com/karottenreibe/vim-syntax
|
41
44
|
licenses:
|
42
45
|
post_install_message:
|
43
|
-
rdoc_options:
|
44
|
-
|
46
|
+
rdoc_options:
|
47
|
+
- --charset=UTF-8
|
45
48
|
require_paths:
|
46
49
|
- lib
|
47
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -61,7 +64,7 @@ requirements: []
|
|
61
64
|
rubyforge_project:
|
62
65
|
rubygems_version: 1.3.5
|
63
66
|
signing_key:
|
64
|
-
specification_version:
|
65
|
-
summary:
|
67
|
+
specification_version: 3
|
68
|
+
summary: A simple (!) extension to the syntax gem, that allows you to highlight vim syntax.
|
66
69
|
test_files: []
|
67
70
|
|