Skip to content

Commit 4ed056b

Browse files
committed
Use shell script to generate all syntax file for different filetypes
1 parent cb35320 commit 4ed056b

27 files changed

Lines changed: 1442 additions & 852 deletions

autoload/jslibsyntax.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function! jslibsyntax#load(path)
2525
exec('let use = b:javascript_lib_use_'.lib)
2626
endif
2727
if use
28-
let fn = a:path.'/autoload/syntax/'.lib.'.vim'
28+
let fn = a:path.'/autoload/syntax/'.lib.'.'.&filetype.'.vim'
2929
if filereadable(fn)
3030
exe('source '.fn)
3131
let loaded = loaded + 1
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
" Vim syntax file
2+
" Language: AngularJS for coffee
3+
" Maintainer: othree <othree@gmail.com>
4+
" Last Change: 2013/02/22
5+
" Version: 1.1.13
6+
" URL: http://angularjs.org/
7+
8+
syntax keyword coffeeAngular angular containedin=ALLBUT,coffeeComment
9+
syntax match coffeeAngulardot containedin=ALLBUT,coffeeComment /\(\<angular\.\)\@<=\h\w*/ contains=coffeeAngularMethods
10+
syntax keyword coffeeAngularMethods contained bind bootstrap copy element equals
11+
syntax keyword coffeeAngularMethods contained extend forEach fromJson identity injector
12+
syntax keyword coffeeAngularMethods contained isArray isDate isDefined isElement isFunction
13+
syntax keyword coffeeAngularMethods contained isNumber isObject isString isUndefined lowercase
14+
syntax keyword coffeeAngularMethods contained mock module noop toJson uppercase version
15+
16+
syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment $anchorScroll $cacheFactory $compile $controller $document
17+
syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment $exceptionHandler $filter $http $httpBackend $interpolate
18+
syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment $locale $location $log $parse $q $rootElement $rootScope
19+
syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment $scope $route $routeParams $templateCache $timeout $window
20+
syntax keyword coffeeAServices containedin=ALLBUT,coffeeComment $cookies $cookieStore $resource $sanitize
21+
22+
syntax match coffeeAShttpdot containedin=ALLBUT,coffeeComment /\(\<\$http\.\)\@<=\h\w*/ contains=coffeeAShttpMethods
23+
syntax keyword coffeeAShttpMethods contained get head post put delete jsonp defaults prendingRequests
24+
25+
syntax match coffeeASinterpolatedot containedin=ALLBUT,coffeeComment /\(\<\$interpolate\.\)\@<=\h\w*/ contains=coffeeASinterpolateMethods
26+
syntax keyword coffeeASinterpolateMethods contained endSymbol startSymbol
27+
28+
syntax match coffeeASlocationdot containedin=ALLBUT,coffeeComment /\(\<\$location\.\)\@<=\h\w*/ contains=coffeeASlocationMethods
29+
syntax keyword coffeeASlocationMethods contained absUrl hash host path port protocol replace search url
30+
31+
syntax match coffeeASlogdot containedin=ALLBUT,coffeeComment /\(\<\$log\.\)\@<=\h\w*/ contains=coffeeASlogMethods
32+
syntax keyword coffeeASlogMethods contained error info log warn
33+
34+
syntax match coffeeASqdot containedin=ALLBUT,coffeeComment /\(\<\$q\.\)\@<=\h\w*/ contains=coffeeASqMethods
35+
syntax keyword coffeeASqMethods contained all defer reject when
36+
37+
syntax match coffeeASroutedot containedin=ALLBUT,coffeeComment /\(\<\$route\.\)\@<=\h\w*/ contains=coffeeASrouteMethods
38+
syntax keyword coffeeASrouteMethods contained reload current route
39+
40+
syntax match coffeeAStimeoutdot containedin=ALLBUT,coffeeComment /\(\<\$timeout\.\)\@<=\h\w*/ contains=coffeeAStimeoutMethods
41+
syntax keyword coffeeAStimeoutMethods contained cancel
42+
43+
syntax match coffeeASscopedot containedin=ALLBUT,coffeeComment /\(\<\$scope\.\|\$rootScope\)\@<=\h\w*/ contains=coffeeASscopeMethods
44+
syntax keyword coffeeASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id
45+
46+
syntax match coffeeAScookieStoredot containedin=ALLBUT,coffeeComment /\(\<\$cookieStore\.\)\@<=\h\w*/ contains=coffeeAScookieStoreMethods
47+
syntax keyword coffeeAScookieStoreMethods contained get put remove
48+
49+
syntax cluster coffeeAFunctions contains=coffeeAMFunctions
50+
syntax cluster coffeeAAttrs contains=coffeeAMAttrs
51+
52+
syntax keyword coffeeAMFunctions contained config constant controller directive factory
53+
syntax keyword coffeeAMFunctions contained filter provider run service value
54+
syntax keyword coffeeAMAttrs contained name requires
55+
56+
57+
" Define the default highlighting.
58+
" For version 5.7 and earlier: only when not done already
59+
" For version 5.8 and later: only when an item doesn't have highlighting yet
60+
if version >= 508 || !exists("did_lisp_syntax_inits")
61+
if version < 508
62+
let did_lisp_syntax_inits = 1
63+
command -nargs=+ HiLink hi link <args>
64+
else
65+
command -nargs=+ HiLink hi def link <args>
66+
endif
67+
68+
HiLink coffeeAngular Constant
69+
HiLink coffeeAServices Constant
70+
71+
HiLink coffeeAngularMethods PreProc
72+
HiLink coffeeAMFunctions PreProc
73+
HiLink coffeeAMAttrs PreProc
74+
75+
HiLink coffeeAShttpMethods PreProc
76+
HiLink coffeeASinterpolateMethods PreProc
77+
HiLink coffeeASlocationMethods PreProc
78+
HiLink coffeeASlogMethods PreProc
79+
HiLink coffeeASqMethods PreProc
80+
HiLink coffeeASrouteMethods PreProc
81+
HiLink coffeeAStimeoutMethods PreProc
82+
HiLink coffeeASscopeMethods PreProc
83+
HiLink coffeeAScookieStoreMethods PreProc
84+
85+
delcommand HiLink
86+
endif
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
" Vim syntax file
2+
" Language: AngularJS for javascript
3+
" Maintainer: othree <othree@gmail.com>
4+
" Last Change: 2013/02/22
5+
" Version: 1.1.13
6+
" URL: http://angularjs.org/
7+
8+
syntax keyword javascriptAngular angular containedin=ALLBUT,javascriptComment
9+
syntax match javascriptAngulardot containedin=ALLBUT,javascriptComment /\(\<angular\.\)\@<=\h\w*/ contains=javascriptAngularMethods
10+
syntax keyword javascriptAngularMethods contained bind bootstrap copy element equals
11+
syntax keyword javascriptAngularMethods contained extend forEach fromJson identity injector
12+
syntax keyword javascriptAngularMethods contained isArray isDate isDefined isElement isFunction
13+
syntax keyword javascriptAngularMethods contained isNumber isObject isString isUndefined lowercase
14+
syntax keyword javascriptAngularMethods contained mock module noop toJson uppercase version
15+
16+
syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment $anchorScroll $cacheFactory $compile $controller $document
17+
syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment $exceptionHandler $filter $http $httpBackend $interpolate
18+
syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment $locale $location $log $parse $q $rootElement $rootScope
19+
syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment $scope $route $routeParams $templateCache $timeout $window
20+
syntax keyword javascriptAServices containedin=ALLBUT,javascriptComment $cookies $cookieStore $resource $sanitize
21+
22+
syntax match javascriptAShttpdot containedin=ALLBUT,javascriptComment /\(\<\$http\.\)\@<=\h\w*/ contains=javascriptAShttpMethods
23+
syntax keyword javascriptAShttpMethods contained get head post put delete jsonp defaults prendingRequests
24+
25+
syntax match javascriptASinterpolatedot containedin=ALLBUT,javascriptComment /\(\<\$interpolate\.\)\@<=\h\w*/ contains=javascriptASinterpolateMethods
26+
syntax keyword javascriptASinterpolateMethods contained endSymbol startSymbol
27+
28+
syntax match javascriptASlocationdot containedin=ALLBUT,javascriptComment /\(\<\$location\.\)\@<=\h\w*/ contains=javascriptASlocationMethods
29+
syntax keyword javascriptASlocationMethods contained absUrl hash host path port protocol replace search url
30+
31+
syntax match javascriptASlogdot containedin=ALLBUT,javascriptComment /\(\<\$log\.\)\@<=\h\w*/ contains=javascriptASlogMethods
32+
syntax keyword javascriptASlogMethods contained error info log warn
33+
34+
syntax match javascriptASqdot containedin=ALLBUT,javascriptComment /\(\<\$q\.\)\@<=\h\w*/ contains=javascriptASqMethods
35+
syntax keyword javascriptASqMethods contained all defer reject when
36+
37+
syntax match javascriptASroutedot containedin=ALLBUT,javascriptComment /\(\<\$route\.\)\@<=\h\w*/ contains=javascriptASrouteMethods
38+
syntax keyword javascriptASrouteMethods contained reload current route
39+
40+
syntax match javascriptAStimeoutdot containedin=ALLBUT,javascriptComment /\(\<\$timeout\.\)\@<=\h\w*/ contains=javascriptAStimeoutMethods
41+
syntax keyword javascriptAStimeoutMethods contained cancel
42+
43+
syntax match javascriptASscopedot containedin=ALLBUT,javascriptComment /\(\<\$scope\.\|\$rootScope\)\@<=\h\w*/ contains=javascriptASscopeMethods
44+
syntax keyword javascriptASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id
45+
46+
syntax match javascriptAScookieStoredot containedin=ALLBUT,javascriptComment /\(\<\$cookieStore\.\)\@<=\h\w*/ contains=javascriptAScookieStoreMethods
47+
syntax keyword javascriptAScookieStoreMethods contained get put remove
48+
49+
syntax cluster javascriptAFunctions contains=javascriptAMFunctions
50+
syntax cluster javascriptAAttrs contains=javascriptAMAttrs
51+
52+
syntax keyword javascriptAMFunctions contained config constant controller directive factory
53+
syntax keyword javascriptAMFunctions contained filter provider run service value
54+
syntax keyword javascriptAMAttrs contained name requires
55+
56+
57+
" Define the default highlighting.
58+
" For version 5.7 and earlier: only when not done already
59+
" For version 5.8 and later: only when an item doesn't have highlighting yet
60+
if version >= 508 || !exists("did_lisp_syntax_inits")
61+
if version < 508
62+
let did_lisp_syntax_inits = 1
63+
command -nargs=+ HiLink hi link <args>
64+
else
65+
command -nargs=+ HiLink hi def link <args>
66+
endif
67+
68+
HiLink javascriptAngular Constant
69+
HiLink javascriptAServices Constant
70+
71+
HiLink javascriptAngularMethods PreProc
72+
HiLink javascriptAMFunctions PreProc
73+
HiLink javascriptAMAttrs PreProc
74+
75+
HiLink javascriptAShttpMethods PreProc
76+
HiLink javascriptASinterpolateMethods PreProc
77+
HiLink javascriptASlocationMethods PreProc
78+
HiLink javascriptASlogMethods PreProc
79+
HiLink javascriptASqMethods PreProc
80+
HiLink javascriptASrouteMethods PreProc
81+
HiLink javascriptAStimeoutMethods PreProc
82+
HiLink javascriptASscopeMethods PreProc
83+
HiLink javascriptAScookieStoreMethods PreProc
84+
85+
delcommand HiLink
86+
endif

autoload/syntax/angularjs.ls.vim

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
" Vim syntax file
2+
" Language: AngularJS for ls
3+
" Maintainer: othree <othree@gmail.com>
4+
" Last Change: 2013/02/22
5+
" Version: 1.1.13
6+
" URL: http://angularjs.org/
7+
8+
syntax keyword lsAngular angular containedin=ALLBUT,lsComment
9+
syntax match lsAngulardot containedin=ALLBUT,lsComment /\(\<angular\.\)\@<=\h\w*/ contains=lsAngularMethods
10+
syntax keyword lsAngularMethods contained bind bootstrap copy element equals
11+
syntax keyword lsAngularMethods contained extend forEach fromJson identity injector
12+
syntax keyword lsAngularMethods contained isArray isDate isDefined isElement isFunction
13+
syntax keyword lsAngularMethods contained isNumber isObject isString isUndefined lowercase
14+
syntax keyword lsAngularMethods contained mock module noop toJson uppercase version
15+
16+
syntax keyword lsAServices containedin=ALLBUT,lsComment $anchorScroll $cacheFactory $compile $controller $document
17+
syntax keyword lsAServices containedin=ALLBUT,lsComment $exceptionHandler $filter $http $httpBackend $interpolate
18+
syntax keyword lsAServices containedin=ALLBUT,lsComment $locale $location $log $parse $q $rootElement $rootScope
19+
syntax keyword lsAServices containedin=ALLBUT,lsComment $scope $route $routeParams $templateCache $timeout $window
20+
syntax keyword lsAServices containedin=ALLBUT,lsComment $cookies $cookieStore $resource $sanitize
21+
22+
syntax match lsAShttpdot containedin=ALLBUT,lsComment /\(\<\$http\.\)\@<=\h\w*/ contains=lsAShttpMethods
23+
syntax keyword lsAShttpMethods contained get head post put delete jsonp defaults prendingRequests
24+
25+
syntax match lsASinterpolatedot containedin=ALLBUT,lsComment /\(\<\$interpolate\.\)\@<=\h\w*/ contains=lsASinterpolateMethods
26+
syntax keyword lsASinterpolateMethods contained endSymbol startSymbol
27+
28+
syntax match lsASlocationdot containedin=ALLBUT,lsComment /\(\<\$location\.\)\@<=\h\w*/ contains=lsASlocationMethods
29+
syntax keyword lsASlocationMethods contained absUrl hash host path port protocol replace search url
30+
31+
syntax match lsASlogdot containedin=ALLBUT,lsComment /\(\<\$log\.\)\@<=\h\w*/ contains=lsASlogMethods
32+
syntax keyword lsASlogMethods contained error info log warn
33+
34+
syntax match lsASqdot containedin=ALLBUT,lsComment /\(\<\$q\.\)\@<=\h\w*/ contains=lsASqMethods
35+
syntax keyword lsASqMethods contained all defer reject when
36+
37+
syntax match lsASroutedot containedin=ALLBUT,lsComment /\(\<\$route\.\)\@<=\h\w*/ contains=lsASrouteMethods
38+
syntax keyword lsASrouteMethods contained reload current route
39+
40+
syntax match lsAStimeoutdot containedin=ALLBUT,lsComment /\(\<\$timeout\.\)\@<=\h\w*/ contains=lsAStimeoutMethods
41+
syntax keyword lsAStimeoutMethods contained cancel
42+
43+
syntax match lsASscopedot containedin=ALLBUT,lsComment /\(\<\$scope\.\|\$rootScope\)\@<=\h\w*/ contains=lsASscopeMethods
44+
syntax keyword lsASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id
45+
46+
syntax match lsAScookieStoredot containedin=ALLBUT,lsComment /\(\<\$cookieStore\.\)\@<=\h\w*/ contains=lsAScookieStoreMethods
47+
syntax keyword lsAScookieStoreMethods contained get put remove
48+
49+
syntax cluster lsAFunctions contains=lsAMFunctions
50+
syntax cluster lsAAttrs contains=lsAMAttrs
51+
52+
syntax keyword lsAMFunctions contained config constant controller directive factory
53+
syntax keyword lsAMFunctions contained filter provider run service value
54+
syntax keyword lsAMAttrs contained name requires
55+
56+
57+
" Define the default highlighting.
58+
" For version 5.7 and earlier: only when not done already
59+
" For version 5.8 and later: only when an item doesn't have highlighting yet
60+
if version >= 508 || !exists("did_lisp_syntax_inits")
61+
if version < 508
62+
let did_lisp_syntax_inits = 1
63+
command -nargs=+ HiLink hi link <args>
64+
else
65+
command -nargs=+ HiLink hi def link <args>
66+
endif
67+
68+
HiLink lsAngular Constant
69+
HiLink lsAServices Constant
70+
71+
HiLink lsAngularMethods PreProc
72+
HiLink lsAMFunctions PreProc
73+
HiLink lsAMAttrs PreProc
74+
75+
HiLink lsAShttpMethods PreProc
76+
HiLink lsASinterpolateMethods PreProc
77+
HiLink lsASlocationMethods PreProc
78+
HiLink lsASlogMethods PreProc
79+
HiLink lsASqMethods PreProc
80+
HiLink lsASrouteMethods PreProc
81+
HiLink lsAStimeoutMethods PreProc
82+
HiLink lsASscopeMethods PreProc
83+
HiLink lsAScookieStoreMethods PreProc
84+
85+
delcommand HiLink
86+
endif
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
" Vim syntax file
2+
" Language: AngularJS for typescript
3+
" Maintainer: othree <othree@gmail.com>
4+
" Last Change: 2013/02/22
5+
" Version: 1.1.13
6+
" URL: http://angularjs.org/
7+
8+
syntax keyword typescriptAngular angular containedin=ALLBUT,typescriptComment
9+
syntax match typescriptAngulardot containedin=ALLBUT,typescriptComment /\(\<angular\.\)\@<=\h\w*/ contains=typescriptAngularMethods
10+
syntax keyword typescriptAngularMethods contained bind bootstrap copy element equals
11+
syntax keyword typescriptAngularMethods contained extend forEach fromJson identity injector
12+
syntax keyword typescriptAngularMethods contained isArray isDate isDefined isElement isFunction
13+
syntax keyword typescriptAngularMethods contained isNumber isObject isString isUndefined lowercase
14+
syntax keyword typescriptAngularMethods contained mock module noop toJson uppercase version
15+
16+
syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment $anchorScroll $cacheFactory $compile $controller $document
17+
syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment $exceptionHandler $filter $http $httpBackend $interpolate
18+
syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment $locale $location $log $parse $q $rootElement $rootScope
19+
syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment $scope $route $routeParams $templateCache $timeout $window
20+
syntax keyword typescriptAServices containedin=ALLBUT,typescriptComment $cookies $cookieStore $resource $sanitize
21+
22+
syntax match typescriptAShttpdot containedin=ALLBUT,typescriptComment /\(\<\$http\.\)\@<=\h\w*/ contains=typescriptAShttpMethods
23+
syntax keyword typescriptAShttpMethods contained get head post put delete jsonp defaults prendingRequests
24+
25+
syntax match typescriptASinterpolatedot containedin=ALLBUT,typescriptComment /\(\<\$interpolate\.\)\@<=\h\w*/ contains=typescriptASinterpolateMethods
26+
syntax keyword typescriptASinterpolateMethods contained endSymbol startSymbol
27+
28+
syntax match typescriptASlocationdot containedin=ALLBUT,typescriptComment /\(\<\$location\.\)\@<=\h\w*/ contains=typescriptASlocationMethods
29+
syntax keyword typescriptASlocationMethods contained absUrl hash host path port protocol replace search url
30+
31+
syntax match typescriptASlogdot containedin=ALLBUT,typescriptComment /\(\<\$log\.\)\@<=\h\w*/ contains=typescriptASlogMethods
32+
syntax keyword typescriptASlogMethods contained error info log warn
33+
34+
syntax match typescriptASqdot containedin=ALLBUT,typescriptComment /\(\<\$q\.\)\@<=\h\w*/ contains=typescriptASqMethods
35+
syntax keyword typescriptASqMethods contained all defer reject when
36+
37+
syntax match typescriptASroutedot containedin=ALLBUT,typescriptComment /\(\<\$route\.\)\@<=\h\w*/ contains=typescriptASrouteMethods
38+
syntax keyword typescriptASrouteMethods contained reload current route
39+
40+
syntax match typescriptAStimeoutdot containedin=ALLBUT,typescriptComment /\(\<\$timeout\.\)\@<=\h\w*/ contains=typescriptAStimeoutMethods
41+
syntax keyword typescriptAStimeoutMethods contained cancel
42+
43+
syntax match typescriptASscopedot containedin=ALLBUT,typescriptComment /\(\<\$scope\.\|\$rootScope\)\@<=\h\w*/ contains=typescriptASscopeMethods
44+
syntax keyword typescriptASscopeMethods contained $apply $broadcast $destroy $digest $emit $eval $evalAsync $new $on $watch $id
45+
46+
syntax match typescriptAScookieStoredot containedin=ALLBUT,typescriptComment /\(\<\$cookieStore\.\)\@<=\h\w*/ contains=typescriptAScookieStoreMethods
47+
syntax keyword typescriptAScookieStoreMethods contained get put remove
48+
49+
syntax cluster typescriptAFunctions contains=typescriptAMFunctions
50+
syntax cluster typescriptAAttrs contains=typescriptAMAttrs
51+
52+
syntax keyword typescriptAMFunctions contained config constant controller directive factory
53+
syntax keyword typescriptAMFunctions contained filter provider run service value
54+
syntax keyword typescriptAMAttrs contained name requires
55+
56+
57+
" Define the default highlighting.
58+
" For version 5.7 and earlier: only when not done already
59+
" For version 5.8 and later: only when an item doesn't have highlighting yet
60+
if version >= 508 || !exists("did_lisp_syntax_inits")
61+
if version < 508
62+
let did_lisp_syntax_inits = 1
63+
command -nargs=+ HiLink hi link <args>
64+
else
65+
command -nargs=+ HiLink hi def link <args>
66+
endif
67+
68+
HiLink typescriptAngular Constant
69+
HiLink typescriptAServices Constant
70+
71+
HiLink typescriptAngularMethods PreProc
72+
HiLink typescriptAMFunctions PreProc
73+
HiLink typescriptAMAttrs PreProc
74+
75+
HiLink typescriptAShttpMethods PreProc
76+
HiLink typescriptASinterpolateMethods PreProc
77+
HiLink typescriptASlocationMethods PreProc
78+
HiLink typescriptASlogMethods PreProc
79+
HiLink typescriptASqMethods PreProc
80+
HiLink typescriptASrouteMethods PreProc
81+
HiLink typescriptAStimeoutMethods PreProc
82+
HiLink typescriptASscopeMethods PreProc
83+
HiLink typescriptAScookieStoreMethods PreProc
84+
85+
delcommand HiLink
86+
endif

0 commit comments

Comments
 (0)