utils 0.0.67 → 0.0.68

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.
Files changed (77) hide show
  1. data/VERSION +1 -1
  2. data/bin/edit +3 -1
  3. data/lib/utils/editor.rb +14 -0
  4. data/lib/utils/version.rb +1 -1
  5. data/utils.gemspec +3 -3
  6. metadata +3 -74
  7. data/lib/utils/config/vim/after/syntax/haml.vim +0 -9
  8. data/lib/utils/config/vim/after/syntax/html.vim +0 -11
  9. data/lib/utils/config/vim/autoload/Align.vim +0 -1029
  10. data/lib/utils/config/vim/autoload/AlignMaps.vim +0 -330
  11. data/lib/utils/config/vim/autoload/ctrlp/bookmarkdir.vim +0 -139
  12. data/lib/utils/config/vim/autoload/ctrlp/buffertag.vim +0 -238
  13. data/lib/utils/config/vim/autoload/ctrlp/changes.vim +0 -96
  14. data/lib/utils/config/vim/autoload/ctrlp/dir.vim +0 -90
  15. data/lib/utils/config/vim/autoload/ctrlp/line.vim +0 -63
  16. data/lib/utils/config/vim/autoload/ctrlp/mixed.vim +0 -83
  17. data/lib/utils/config/vim/autoload/ctrlp/mrufiles.vim +0 -119
  18. data/lib/utils/config/vim/autoload/ctrlp/quickfix.vim +0 -62
  19. data/lib/utils/config/vim/autoload/ctrlp/rtscript.vim +0 -49
  20. data/lib/utils/config/vim/autoload/ctrlp/tag.vim +0 -112
  21. data/lib/utils/config/vim/autoload/ctrlp/undo.vim +0 -154
  22. data/lib/utils/config/vim/autoload/ctrlp/utils.vim +0 -72
  23. data/lib/utils/config/vim/autoload/ctrlp.vim +0 -1772
  24. data/lib/utils/config/vim/autoload/rails.vim +0 -4570
  25. data/lib/utils/config/vim/autoload/rubycomplete.vim +0 -801
  26. data/lib/utils/config/vim/autoload/sqlcomplete.vim +0 -741
  27. data/lib/utils/config/vim/autoload/vimball.vim +0 -750
  28. data/lib/utils/config/vim/colors/flori.vim +0 -116
  29. data/lib/utils/config/vim/compiler/coffee.vim +0 -68
  30. data/lib/utils/config/vim/compiler/eruby.vim +0 -40
  31. data/lib/utils/config/vim/compiler/ruby.vim +0 -67
  32. data/lib/utils/config/vim/compiler/rubyunit.vim +0 -34
  33. data/lib/utils/config/vim/doc/Decho.txt +0 -372
  34. data/lib/utils/config/vim/doc/coffee-script.txt +0 -116
  35. data/lib/utils/config/vim/doc/ctrlp.txt +0 -1113
  36. data/lib/utils/config/vim/doc/fugitive.txt +0 -257
  37. data/lib/utils/config/vim/doc/rails.txt +0 -1022
  38. data/lib/utils/config/vim/doc/xml-plugin.txt +0 -226
  39. data/lib/utils/config/vim/ftdetect/coffee.vim +0 -8
  40. data/lib/utils/config/vim/ftdetect/eco.vim +0 -1
  41. data/lib/utils/config/vim/ftdetect/ragel.vim +0 -2
  42. data/lib/utils/config/vim/ftdetect/ruby.vim +0 -17
  43. data/lib/utils/config/vim/ftdetect/slim.vim +0 -2
  44. data/lib/utils/config/vim/ftplugin/coffee.vim +0 -221
  45. data/lib/utils/config/vim/ftplugin/eruby.vim +0 -100
  46. data/lib/utils/config/vim/ftplugin/ruby.vim +0 -260
  47. data/lib/utils/config/vim/ftplugin/xml.vim +0 -941
  48. data/lib/utils/config/vim/indent/IndentAnything_html.vim +0 -35
  49. data/lib/utils/config/vim/indent/coffee.vim +0 -338
  50. data/lib/utils/config/vim/indent/eruby.vim +0 -77
  51. data/lib/utils/config/vim/indent/javascript.vim +0 -116
  52. data/lib/utils/config/vim/indent/ruby.vim +0 -377
  53. data/lib/utils/config/vim/indent/slim.vim +0 -75
  54. data/lib/utils/config/vim/plugin/AlignMapsPlugin.vim +0 -242
  55. data/lib/utils/config/vim/plugin/AlignPlugin.vim +0 -41
  56. data/lib/utils/config/vim/plugin/Decho.vim +0 -592
  57. data/lib/utils/config/vim/plugin/IndentAnything.vim +0 -675
  58. data/lib/utils/config/vim/plugin/bufexplorer.vim +0 -1144
  59. data/lib/utils/config/vim/plugin/cecutil.vim +0 -508
  60. data/lib/utils/config/vim/plugin/ctrlp.vim +0 -61
  61. data/lib/utils/config/vim/plugin/fugitive.vim +0 -2041
  62. data/lib/utils/config/vim/plugin/lusty-explorer.vim +0 -1509
  63. data/lib/utils/config/vim/plugin/rails.vim +0 -339
  64. data/lib/utils/config/vim/plugin/rubyextra.vim +0 -193
  65. data/lib/utils/config/vim/plugin/surround.vim +0 -628
  66. data/lib/utils/config/vim/plugin/taglist.vim +0 -4546
  67. data/lib/utils/config/vim/plugin/test/IndentAnything/test.js +0 -131
  68. data/lib/utils/config/vim/plugin/vimballPlugin.vim +0 -40
  69. data/lib/utils/config/vim/syntax/Decho.vim +0 -101
  70. data/lib/utils/config/vim/syntax/coffee.vim +0 -217
  71. data/lib/utils/config/vim/syntax/eco.vim +0 -62
  72. data/lib/utils/config/vim/syntax/eruby.vim +0 -73
  73. data/lib/utils/config/vim/syntax/javascript.vim +0 -246
  74. data/lib/utils/config/vim/syntax/ragel.vim +0 -165
  75. data/lib/utils/config/vim/syntax/ruby.vim +0 -367
  76. data/lib/utils/config/vim/syntax/slim.vim +0 -117
  77. data/lib/utils/config/vimrc +0 -540
@@ -1,131 +0,0 @@
1
- //
2
- // Sample Javascript test code
3
- //
4
- if ( x )
5
- x;
6
- x = { f + // foo
7
- q
8
- go
9
- }
10
- r +
11
- bar + call( foo +
12
- bar
13
- // foo
14
- then
15
- bar
16
- )
17
- ntnth // TODO: this line should be at col 0
18
-
19
- foo = {
20
- at : the,
21
- bar : tender
22
- }
23
-
24
-
25
- r
26
- if (foo)
27
- // then
28
- // do something
29
- bar;
30
- yo;
31
- if (foo)
32
- {
33
- //
34
- // then do something
35
- bar;
36
- }
37
- if (bar)
38
- /*
39
- * Comment on something. Comment on something. Comment on something.
40
- * Comment on something. Comment on something.
41
- *
42
- */
43
- yo;
44
- foo
45
-
46
- {
47
- line = getline() /* comment after code but spanning multiple lines seems to
48
- * work pretty well.
49
- */
50
- foo
51
- }
52
-
53
- window.prototype.foo = {
54
- a : hole,
55
- dink : wad
56
- }
57
-
58
- document.getElementById(
59
- string);
60
-
61
- /*
62
- * :
63
- */
64
- if (go()) // do it
65
- foo;
66
- while (false) /* never do it */
67
- ;
68
-
69
-
70
- /***
71
- *
72
- * blah
73
- */
74
-
75
-
76
- switch (x) {
77
- case 'x':
78
- window.alert(x);
79
- break;
80
- default:
81
- break;
82
- }
83
-
84
- foo +
85
- //and + bar(
86
- //another
87
- )
88
- r +
89
- bar + call( foo +
90
- bar
91
- // foo
92
- then
93
- bar
94
- )
95
- foo
96
-
97
-
98
-
99
- {
100
- fuction foo() {
101
- /* comment */
102
- foo();
103
- }
104
- }
105
-
106
-
107
- /*****************************************************************************
108
- *
109
- * Known broken-ness:
110
- *
111
- */
112
-
113
- if (yo) /*
114
- * dude
115
- *
116
- */
117
- blah // this should be one level in
118
-
119
- //
120
-
121
- //
122
-
123
- if (
124
- something) /*
125
- */
126
- //
127
- // broken here. This should be one level back. But I'll argue (for now) that
128
- // the previous comment (which causes this) is bad style.
129
- //
130
-
131
-
@@ -1,40 +0,0 @@
1
- " vimballPlugin : construct a file containing both paths and files
2
- " Author: Charles E. Campbell, Jr.
3
- " Copyright: (c) 2004-2010 by Charles E. Campbell, Jr.
4
- " The VIM LICENSE applies to Vimball.vim, and Vimball.txt
5
- " (see |copyright|) except use "Vimball" instead of "Vim".
6
- " No warranty, express or implied.
7
- " *** *** Use At-Your-Own-Risk! *** ***
8
- "
9
- " (Rom 2:1 WEB) Therefore you are without excuse, O man, whoever you are who
10
- " judge. For in that which you judge another, you condemn yourself. For
11
- " you who judge practice the same things.
12
- " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
13
-
14
- " ---------------------------------------------------------------------
15
- " Load Once: {{{1
16
- if &cp || exists("g:loaded_vimballPlugin")
17
- finish
18
- endif
19
- let g:loaded_vimballPlugin = "v33"
20
- let s:keepcpo = &cpo
21
- set cpo&vim
22
-
23
- " ------------------------------------------------------------------------------
24
- " Public Interface: {{{1
25
- com! -ra -complete=file -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>)
26
- com! -na=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>)
27
- com! -na=0 VimballList call vimball#Vimball(0)
28
- com! -na=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings()
29
- au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")
30
- au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif
31
- au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
32
- au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")
33
- au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif
34
- au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
35
-
36
- " =====================================================================
37
- " Restoration And Modelines: {{{1
38
- " vim: fdm=marker
39
- let &cpo= s:keepcpo
40
- unlet s:keepcpo
@@ -1,101 +0,0 @@
1
- " DrChip's debugger syntax file
2
- " Language : DrChip's Dfunc/Decho/Dret output
3
- " Maintainer : Charles E. Campbell, Jr.
4
- " Last change: Aug 12, 2008
5
- " Version : 5
6
-
7
- " Remove any old syntax stuff hanging around
8
- syn clear
9
-
10
- " DechoTab support
11
- syn match dechoTabTitleSep "^---------$"
12
- syn match dechoTabTitle "^Decho Tab$"
13
-
14
- " Delimiters, strings, numbers
15
- syn match dechoDelimiter "[{}]$"
16
- syn match dechoDelimiter ","
17
- syn region dechoAngleBrkt oneline matchgroup=Green start="\w<"lc=1 matchgroup=Green end=">" contains=dechoNotify,dechoAngleBrktInc,dechoString
18
- syn region dechoAngleBrktInc contained oneline start="<" end=">" contains=dechoNotify,dechoAngleBrktInc,dechoString
19
- syn region dechoString oneline matchgroup=Blue start='"' matchgroup=Blue end='"' contains=dechoNotify
20
- syn match dechoNumber "\<-\=[0-9]\+\>"
21
- syn match dechoNumber "\<-\=[0-9]\+\ze:"
22
- syn match dechoNumber "\<=-\=[0-9a-fA-F]\+\>"
23
- syn match dechoNumber "\<[0-9a-fA-F]\+x$"
24
- syn match dechoNumber "\<[0-9a-fA-F]\+x[^a-zA-Z=]"me=e-1
25
-
26
- " Let me see errors/warnings/severe messages easily
27
- syn keyword dechoNotify fatal error severe
28
- syn match dechoNotify "!!!\|???"
29
- syn keyword dechoWarning warning
30
-
31
- " Bars, Function names, Return
32
- syn match dechoFunction contained "\%([sS]:\)\=\h[a-zA-Z0-9_#]*"
33
- syn match dechoBar "^|\+"
34
- syn match dechoStartFunc "^|*\%([sS]:\)\=\h[a-zA-Z0-9_#]*(" contains=dechoBar,dechoFunction,dechoDelimStart
35
- syn match dechoStopFunc "^|\+return \%([sS]:\)\=\h[a-zA-Z0-9_#]*" contains=dechoBar,dechoFunction
36
- syn match dechoComment "^[ \t]*#.*$"
37
- syn match dechoMatrix "^|[-+ 0-9.e]\+|$" contains=dechoMatrixBar
38
- syn match dechoMatrixBar contained "|"
39
-
40
- " Problems
41
- syn keyword dechoProblem PROBLEM[:] COMBAK[:] WARNING[:] SEVERE[:] NOTE[:] DIFFER[S:]
42
-
43
- if !exists("did_drchip_decho_syntax")
44
- let did_drchip_decho_syntax= 1
45
-
46
- " Links
47
- hi link dechoAngleBrktInc dechoAngleBrkt
48
-
49
- " If the "Warning" highlighting group hasn't been defined,
50
- " then this script will define it.
51
- let s:id_hlname= hlID("Warning")
52
- let s:fg_hlname= synIDattr(synIDtrans(s:id_hlname),"fg")
53
- if s:id_hlname == 0 || s:fg_hlname == 0 || s:fg_hlname == -1
54
- hi Warning term=NONE cterm=NONE gui=NONE ctermfg=black ctermbg=yellow guifg=black guibg=yellow
55
- endif
56
- unlet s:id_hlname s:fg_hlname
57
-
58
- hi link dechoAngleBrkt String
59
- hi link dechoComment Comment
60
- hi link dechoDelimiter Delimiter
61
- hi link dechoFunction Statement
62
- hi link dechoMatrixBar Delimiter
63
- hi link dechoNotify Error
64
- hi link dechoNumber Number
65
- hi link dechoProblem Error
66
- hi link dechoString String
67
- hi link dechoWarning Warning
68
- hi link dechoTabTitle PreProc
69
- hi link dechoTabTitleSep Delimiter
70
-
71
- " HLTest: tests if a highlighting group has been set up {{{2
72
- fun! s:HLTest(hlname)
73
- let id_hlname= hlID(a:hlname)
74
- if id_hlname == 0
75
- return 0
76
- endif
77
- let id_trans = synIDtrans(id_hlname)
78
- if id_trans == 0
79
- return 0
80
- endif
81
- let fg_hlname= synIDattr(id_trans,"fg")
82
- let bg_hlname= synIDattr(id_trans,"bg")
83
- if fg_hlname == -1 && bg_hlname == -1
84
- return 0
85
- endif
86
- if fg_hlname == "" && bg_hlname == ""
87
- return 0
88
- endif
89
- return 1
90
- endfun
91
-
92
- " define DechoBarHL as needed
93
- if s:HLTest("Magenta")
94
- hi link DechoBarHL Magenta
95
- else
96
- hi DechoBarHL start= stop= ctermfg=magenta guifg=magenta term=none cterm=none gui=none
97
- endif
98
- delf s:HLTest
99
- hi link dechoBar DechoBarHL
100
- endif
101
- " vim: ts=6
@@ -1,217 +0,0 @@
1
- " Language: CoffeeScript
2
- " Maintainer: Mick Koch <kchmck@gmail.com>
3
- " URL: http://github.com/kchmck/vim-coffee-script
4
- " License: WTFPL
5
-
6
- " Bail if our syntax is already loaded.
7
- if exists('b:current_syntax') && b:current_syntax == 'coffee'
8
- finish
9
- endif
10
-
11
- " Include JavaScript for coffeeEmbed.
12
- syn include @coffeeJS syntax/javascript.vim
13
-
14
- " Highlight long strings.
15
- syn sync minlines=100
16
-
17
- " CoffeeScript identifiers can have dollar signs.
18
- setlocal isident+=$
19
-
20
- " These are `matches` instead of `keywords` because vim's highlighting
21
- " priority for keywords is higher than matches. This causes keywords to be
22
- " highlighted inside matches, even if a match says it shouldn't contain them --
23
- " like with coffeeAssign and coffeeDot.
24
- syn match coffeeStatement /\<\%(return\|break\|continue\|throw\)\>/ display
25
- hi def link coffeeStatement Statement
26
-
27
- syn match coffeeRepeat /\<\%(for\|while\|until\|loop\)\>/ display
28
- hi def link coffeeRepeat Repeat
29
-
30
- syn match coffeeConditional /\<\%(if\|else\|unless\|switch\|when\|then\)\>/
31
- \ display
32
- hi def link coffeeConditional Conditional
33
-
34
- syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display
35
- hi def link coffeeException Exception
36
-
37
- syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\)\>/
38
- \ display
39
- " The `own` keyword is only a keyword after `for`.
40
- syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat
41
- \ display
42
- hi def link coffeeKeyword Keyword
43
-
44
- syn match coffeeOperator /\<\%(instanceof\|typeof\|delete\)\>/ display
45
- hi def link coffeeOperator Operator
46
-
47
- " The first case matches symbol operators only if they have an operand before.
48
- syn match coffeeExtendedOp /\%(\S\s*\)\@<=[+\-*/%&|\^=!<>?.]\+\|[-=]>\|--\|++\|:/
49
- \ display
50
- syn match coffeeExtendedOp /\<\%(and\|or\)=/ display
51
- hi def link coffeeExtendedOp coffeeOperator
52
-
53
- " This is separate from `coffeeExtendedOp` to help differentiate commas from
54
- " dots.
55
- syn match coffeeSpecialOp /[,;]/ display
56
- hi def link coffeeSpecialOp SpecialChar
57
-
58
- syn match coffeeBoolean /\<\%(true\|on\|yes\|false\|off\|no\)\>/ display
59
- hi def link coffeeBoolean Boolean
60
-
61
- syn match coffeeGlobal /\<\%(null\|undefined\)\>/ display
62
- hi def link coffeeGlobal Type
63
-
64
- " A special variable
65
- syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display
66
- " An @-variable
67
- syn match coffeeSpecialVar /@\%(\I\i*\)\?/ display
68
- hi def link coffeeSpecialVar Special
69
-
70
- " A class-like name that starts with a capital letter
71
- syn match coffeeObject /\<\u\w*\>/ display
72
- hi def link coffeeObject Structure
73
-
74
- " A constant-like name in SCREAMING_CAPS
75
- syn match coffeeConstant /\<\u[A-Z0-9_]\+\>/ display
76
- hi def link coffeeConstant Constant
77
-
78
- " A variable name
79
- syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeObject,
80
- \ coffeeConstant
81
-
82
- " A non-interpolated string
83
- syn cluster coffeeBasicString contains=@Spell,coffeeEscape
84
- " An interpolated string
85
- syn cluster coffeeInterpString contains=@coffeeBasicString,coffeeInterp
86
-
87
- " Regular strings
88
- syn region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/
89
- \ contains=@coffeeInterpString
90
- syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/
91
- \ contains=@coffeeBasicString
92
- hi def link coffeeString String
93
-
94
- " A integer, including a leading plus or minus
95
- syn match coffeeNumber /\i\@<![-+]\?\d\+\%([eE][+-]\?\d\+\)\?/ display
96
- " A hex number
97
- syn match coffeeNumber /\<0[xX]\x\+\>/ display
98
- syn match coffeeNumber /\<0b[01]\+\>/ display
99
- hi def link coffeeNumber Number
100
-
101
- " A floating-point number, including a leading plus or minus
102
- syn match coffeeFloat /\i\@<![-+]\?\d*\.\@<!\.\d\+\%([eE][+-]\?\d\+\)\?/
103
- \ display
104
- hi def link coffeeFloat Float
105
-
106
- " An error for reserved keywords
107
- if !exists("coffee_no_reserved_words_error")
108
- syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\)\>/
109
- \ display
110
- hi def link coffeeReservedError Error
111
- endif
112
-
113
- " A normal object assignment
114
- syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display
115
- hi def link coffeeObjAssign Identifier
116
-
117
- syn keyword coffeeTodo TODO FIXME XXX contained
118
- hi def link coffeeTodo Todo
119
-
120
- syn match coffeeComment /#.*/ contains=@Spell,coffeeTodo
121
- hi def link coffeeComment Comment
122
-
123
- syn region coffeeBlockComment start=/####\@!/ end=/###/
124
- \ contains=@Spell,coffeeTodo
125
- hi def link coffeeBlockComment coffeeComment
126
-
127
- " A comment in a heregex
128
- syn region coffeeHeregexComment start=/#/ end=/\ze\/\/\/\|$/ contained
129
- \ contains=@Spell,coffeeTodo
130
- hi def link coffeeHeregexComment coffeeComment
131
-
132
- " Embedded JavaScript
133
- syn region coffeeEmbed matchgroup=coffeeEmbedDelim
134
- \ start=/`/ skip=/\\\\\|\\`/ end=/`/
135
- \ contains=@coffeeJS
136
- hi def link coffeeEmbedDelim Delimiter
137
-
138
- syn region coffeeInterp matchgroup=coffeeInterpDelim start=/#{/ end=/}/ contained
139
- \ contains=@coffeeAll
140
- hi def link coffeeInterpDelim PreProc
141
-
142
- " A string escape sequence
143
- syn match coffeeEscape /\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\./ contained display
144
- hi def link coffeeEscape SpecialChar
145
-
146
- " A regex -- must not follow a parenthesis, number, or identifier, and must not
147
- " be followed by a number
148
- syn region coffeeRegex start=/\%(\%()\|\i\@<!\d\)\s*\|\i\)\@<!\/=\@!\s\@!/
149
- \ skip=/\[[^\]]\{-}\/[^\]]\{-}\]/
150
- \ end=/\/[gimy]\{,4}\d\@!/
151
- \ oneline contains=@coffeeBasicString
152
- hi def link coffeeRegex String
153
-
154
- " A heregex
155
- syn region coffeeHeregex start=/\/\/\// end=/\/\/\/[gimy]\{,4}/
156
- \ contains=@coffeeInterpString,coffeeHeregexComment
157
- \ fold
158
- hi def link coffeeHeregex coffeeRegex
159
-
160
- " Heredoc strings
161
- syn region coffeeHeredoc start=/"""/ end=/"""/ contains=@coffeeInterpString
162
- \ fold
163
- syn region coffeeHeredoc start=/'''/ end=/'''/ contains=@coffeeBasicString
164
- \ fold
165
- hi def link coffeeHeredoc String
166
-
167
- " An error for trailing whitespace, as long as the line isn't just whitespace
168
- if !exists("coffee_no_trailing_space_error")
169
- syn match coffeeSpaceError /\S\@<=\s\+$/ display
170
- hi def link coffeeSpaceError Error
171
- endif
172
-
173
- " An error for trailing semicolons, for help transitioning from JavaScript
174
- if !exists("coffee_no_trailing_semicolon_error")
175
- syn match coffeeSemicolonError /;$/ display
176
- hi def link coffeeSemicolonError Error
177
- endif
178
-
179
- " Ignore reserved words in dot accesses.
180
- syn match coffeeDotAccess /\.\@<!\.\s*\I\i*/he=s+1 contains=@coffeeIdentifier
181
- hi def link coffeeDotAccess coffeeExtendedOp
182
-
183
- " Ignore reserved words in prototype accesses.
184
- syn match coffeeProtoAccess /::\s*\I\i*/he=s+2 contains=@coffeeIdentifier
185
- hi def link coffeeProtoAccess coffeeExtendedOp
186
-
187
- " This is required for interpolations to work.
188
- syn region coffeeCurlies matchgroup=coffeeCurly start=/{/ end=/}/
189
- \ contains=@coffeeAll
190
- syn region coffeeBrackets matchgroup=coffeeBracket start=/\[/ end=/\]/
191
- \ contains=@coffeeAll
192
- syn region coffeeParens matchgroup=coffeeParen start=/(/ end=/)/
193
- \ contains=@coffeeAll
194
-
195
- " These are highlighted the same as commas since they tend to go together.
196
- hi def link coffeeBlock coffeeSpecialOp
197
- hi def link coffeeBracket coffeeBlock
198
- hi def link coffeeCurly coffeeBlock
199
- hi def link coffeeParen coffeeBlock
200
-
201
- " This is used instead of TOP to keep things coffee-specific for good
202
- " embedding. `contained` groups aren't included.
203
- syn cluster coffeeAll contains=coffeeStatement,coffeeRepeat,coffeeConditional,
204
- \ coffeeException,coffeeKeyword,coffeeOperator,
205
- \ coffeeExtendedOp,coffeeSpecialOp,coffeeBoolean,
206
- \ coffeeGlobal,coffeeSpecialVar,coffeeObject,
207
- \ coffeeConstant,coffeeString,coffeeNumber,
208
- \ coffeeFloat,coffeeReservedError,coffeeObjAssign,
209
- \ coffeeComment,coffeeBlockComment,coffeeEmbed,
210
- \ coffeeRegex,coffeeHeregex,coffeeHeredoc,
211
- \ coffeeSpaceError,coffeeSemicolonError,
212
- \ coffeeDotAccess,coffeeProtoAccess,
213
- \ coffeeCurlies,coffeeBrackets,coffeeParens
214
-
215
- if !exists('b:current_syntax')
216
- let b:current_syntax = 'coffee'
217
- endif
@@ -1,62 +0,0 @@
1
- " Vim syntax file
2
- " Language: eco
3
- " Maintainer: Jay Adkisson
4
- " Mostly stolen from eruby.vim
5
-
6
- if !exists("g:eco_default_subtype")
7
- let g:eco_default_subtype = "html"
8
- endif
9
-
10
- if !exists("b:eco_subtype")
11
- let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
12
- let b:eco_subtype = matchstr(s:lines,'eco_subtype=\zs\w\+')
13
- if b:eco_subtype == ''
14
- let b:eco_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eco\)\+$','',''),'\.\zs\w\+$')
15
- endif
16
- if b:eco_subtype == 'rhtml'
17
- let b:eco_subtype = 'html'
18
- elseif b:eco_subtype == 'jst'
19
- let b:eco_subtype = 'html'
20
- elseif b:eco_subtype == 'rb'
21
- let b:eco_subtype = 'ruby'
22
- elseif b:eco_subtype == 'yml'
23
- let b:eco_subtype = 'yaml'
24
- elseif b:eco_subtype == 'js' || b:eco_subtype == 'json'
25
- let b:eco_subtype = 'javascript'
26
- elseif b:eco_subtype == 'txt'
27
- " Conventional; not a real file type
28
- let b:eco_subtype = 'text'
29
- elseif b:eco_subtype == ''
30
- if exists('b:current_syntax') && b:current_syntax != ''
31
- let b:eco_subtype = b:current_syntax
32
- else
33
- let b:eco_subtype = g:eco_default_subtype
34
- endif
35
- endif
36
- endif
37
-
38
- if exists("b:eco_subtype") && b:eco_subtype != '' && b:eco_subtype != 'eco'
39
- exec "runtime! syntax/".b:eco_subtype.".vim"
40
- syn include @coffeeTop syntax/coffee.vim
41
- endif
42
-
43
- syn cluster ecoRegions contains=ecoBlock,ecoExpression,ecoComment
44
-
45
- syn region ecoBlock matchgroup=ecoDelimiter start=/<%/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend
46
- syn region ecoExpression matchgroup=ecoDelimiter start=/<%[=\-]/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend
47
- syn region ecoComment matchgroup=ecoComment start=/<%#/ end=/%>/ contains=@coffeeTodo,@Spell containedin=ALLBUT,@ecoRegions keepend
48
-
49
- " eco features not in coffeescript proper
50
- syn keyword ecoEnd end containedin=@ecoRegions
51
- syn match ecoIndentColon /\s+\w+:/ containedin=@ecoRegions
52
-
53
- " Define the default highlighting.
54
-
55
- hi def link ecoDelimiter Delimiter
56
- hi def link ecoComment Comment
57
- hi def link ecoEnd coffeeConditional
58
- hi def link ecoIndentColon None
59
-
60
- let b:current_syntax = 'eco'
61
-
62
- " vim: nowrap sw=2 sts=2 ts=8:
@@ -1,73 +0,0 @@
1
- " Vim syntax file
2
- " Language: eRuby
3
- " Maintainer: Tim Pope <vimNOSPAM@tpope.info>
4
- " URL: http://vim-ruby.rubyforge.org
5
- " Anon CVS: See above site
6
- " Release Coordinator: Doug Kearns <dougkearns@gmail.com>
7
-
8
- if exists("b:current_syntax")
9
- finish
10
- endif
11
-
12
- if !exists("main_syntax")
13
- let main_syntax = 'eruby'
14
- endif
15
-
16
- if !exists("g:eruby_default_subtype")
17
- let g:eruby_default_subtype = "html"
18
- endif
19
-
20
- if !exists("b:eruby_subtype") && main_syntax == 'eruby'
21
- let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
22
- let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
23
- if b:eruby_subtype == ''
24
- let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\)\+$','',''),'\.\zs\w\+$')
25
- endif
26
- if b:eruby_subtype == 'rhtml'
27
- let b:eruby_subtype = 'html'
28
- elseif b:eruby_subtype == 'rb'
29
- let b:eruby_subtype = 'ruby'
30
- elseif b:eruby_subtype == 'yml'
31
- let b:eruby_subtype = 'yaml'
32
- elseif b:eruby_subtype == 'js'
33
- let b:eruby_subtype = 'javascript'
34
- elseif b:eruby_subtype == 'txt'
35
- " Conventional; not a real file type
36
- let b:eruby_subtype = 'text'
37
- elseif b:eruby_subtype == ''
38
- let b:eruby_subtype = g:eruby_default_subtype
39
- endif
40
- endif
41
-
42
- if !exists("b:eruby_nest_level")
43
- let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.\%(erb\|rhtml\)\>','@','g'),'[^@]','','g'))
44
- endif
45
- if !b:eruby_nest_level
46
- let b:eruby_nest_level = 1
47
- endif
48
-
49
- if exists("b:eruby_subtype") && b:eruby_subtype != ''
50
- exe "runtime! syntax/".b:eruby_subtype.".vim"
51
- unlet! b:current_syntax
52
- endif
53
- syn include @rubyTop syntax/ruby.vim
54
-
55
- syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment
56
-
57
- exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline'
58
- exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="[=-]\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend'
59
- exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=\{1,4}" end="[=-]\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend'
60
- exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend'
61
-
62
- " Define the default highlighting.
63
-
64
- hi def link erubyDelimiter Delimiter
65
- hi def link erubyComment Comment
66
-
67
- let b:current_syntax = 'eruby'
68
-
69
- if main_syntax == 'eruby'
70
- unlet main_syntax
71
- endif
72
-
73
- " vim: nowrap sw=2 sts=2 ts=8: