ver 2010.02 → 2010.08

Sign up to get free protection for your applications and to get access to all the features.
Files changed (651) hide show
  1. data/.gitignore +1 -0
  2. data/.yardopts +1 -1
  3. data/AUTHORS +2 -2
  4. data/CHANGELOG +1160 -0
  5. data/MANIFEST +212 -62
  6. data/README.textile +68 -9
  7. data/Rakefile +2 -2
  8. data/bin/ver +33 -8
  9. data/config/commands/ANTLR.rb +11 -0
  10. data/config/commands/ActionScript.rb +102 -0
  11. data/config/commands/Active4D.rb +30 -0
  12. data/config/commands/Ada.rb +11 -0
  13. data/config/commands/Ant.rb +90 -0
  14. data/config/commands/Apache.rb +98 -0
  15. data/config/commands/AppleScript.rb +169 -0
  16. data/config/commands/Blogging.rb +72 -0
  17. data/config/commands/Bulletin Board.rb +10 -0
  18. data/config/commands/Bundle Development.rb +83 -0
  19. data/config/commands/C++ Qt.rb +158 -0
  20. data/config/commands/C.rb +82 -0
  21. data/config/commands/CMake.rb +32 -0
  22. data/config/commands/CSS.rb +76 -0
  23. data/config/commands/CTags.rb +29 -0
  24. data/config/commands/CVS.rb +114 -0
  25. data/config/commands/CoffeeScript.rb +58 -0
  26. data/config/commands/Context Free.rb +20 -0
  27. data/config/commands/Cucumber.rb +94 -0
  28. data/config/commands/D.rb +47 -0
  29. data/config/commands/Darcs.rb +72 -0
  30. data/config/commands/Diff.rb +76 -0
  31. data/config/commands/Doxygen.rb +9 -0
  32. data/config/commands/Experimental Wiki.rb +9 -0
  33. data/config/commands/Experimental.rb +172 -0
  34. data/config/commands/F-Script.rb +13 -0
  35. data/config/commands/FXScript.rb +11 -0
  36. data/config/commands/FileMerge.rb +42 -0
  37. data/config/commands/Fortran.rb +58 -0
  38. data/config/commands/GTD2.rb +134 -0
  39. data/config/commands/GTDAlt.rb +225 -0
  40. data/config/commands/GetBundle.rb +41 -0
  41. data/config/commands/Go.rb +29 -0
  42. data/config/commands/Graphviz.rb +11 -0
  43. data/config/commands/Greasemonkey.rb +158 -0
  44. data/config/commands/Gri.rb +11 -0
  45. data/config/commands/Groovy Grails.rb +174 -0
  46. data/config/commands/Groovy.rb +66 -0
  47. data/config/commands/HTML.rb +206 -0
  48. data/config/commands/Haskell.rb +48 -0
  49. data/config/commands/Hotkey.rb +50 -0
  50. data/config/commands/Hyperlink Helper.rb +81 -0
  51. data/config/commands/ImageBrowser.rb +10 -0
  52. data/config/commands/Io.rb +11 -0
  53. data/config/commands/JSFL.rb +29 -0
  54. data/config/commands/JSON.rb +11 -0
  55. data/config/commands/Java.rb +45 -0
  56. data/config/commands/JavaDoc.rb +12 -0
  57. data/config/commands/JavaScript Prototype & Script.aculo.us.rb +51 -0
  58. data/config/commands/JavaScript YUI.rb +12 -0
  59. data/config/commands/JavaScript jQuery.rb +12 -0
  60. data/config/commands/JavaScript.rb +50 -0
  61. data/config/commands/LaTeX.rb +423 -0
  62. data/config/commands/Lisp.rb +20 -0
  63. data/config/commands/Logo.rb +10 -0
  64. data/config/commands/Logtalk.rb +34 -0
  65. data/config/commands/Lua.rb +29 -0
  66. data/config/commands/MEL.rb +20 -0
  67. data/config/commands/Mail.rb +73 -0
  68. data/config/commands/Make.rb +20 -0
  69. data/config/commands/Man Pages.rb +20 -0
  70. data/config/commands/Markdown.rb +194 -0
  71. data/config/commands/Math.rb +79 -0
  72. data/config/commands/Matlab.rb +188 -0
  73. data/config/commands/Maven.rb +162 -0
  74. data/config/commands/Mediawiki.rb +12 -0
  75. data/config/commands/Mercurial.rb +185 -0
  76. data/config/commands/MoinMoin.rb +74 -0
  77. data/config/commands/Movable Type.rb +68 -0
  78. data/config/commands/Nemerle.rb +29 -0
  79. data/config/commands/OCaml Experimental Completions.rb +22 -0
  80. data/config/commands/OCaml.rb +99 -0
  81. data/config/commands/Objective-C.rb +181 -0
  82. data/config/commands/Outlines.rb +54 -0
  83. data/config/commands/PHP Smarty.rb +10 -0
  84. data/config/commands/Pascal.rb +11 -0
  85. data/config/commands/Perforce.rb +102 -0
  86. data/config/commands/Perl.rb +78 -0
  87. data/config/commands/Processing.rb +11 -0
  88. data/config/commands/Prolog.rb +11 -0
  89. data/config/commands/Property List.rb +38 -0
  90. data/config/commands/Python Django.rb +11 -0
  91. data/config/commands/Python.rb +131 -0
  92. data/config/commands/R Console (R.app).rb +80 -0
  93. data/config/commands/R Console (Rdaemon).rb +414 -0
  94. data/config/commands/R.rb +337 -0
  95. data/config/commands/Ragel.rb +10 -0
  96. data/config/commands/Regular Expressions.rb +18 -0
  97. data/config/commands/Remind.rb +44 -0
  98. data/config/commands/Ruby RSpec.rb +40 -0
  99. data/config/commands/Ruby on Rails.rb +331 -0
  100. data/config/commands/Ruby.rb +220 -0
  101. data/config/commands/S5 Slide Show.rb +37 -0
  102. data/config/commands/SCons.rb +24 -0
  103. data/config/commands/SQL.rb +60 -0
  104. data/config/commands/SVK.rb +83 -0
  105. data/config/commands/SWeave.rb +63 -0
  106. data/config/commands/Scheme.rb +30 -0
  107. data/config/commands/Scilab.rb +28 -0
  108. data/config/commands/Setext.rb +20 -0
  109. data/config/commands/Shell Script.rb +59 -0
  110. data/config/commands/Slate.rb +9 -0
  111. data/config/commands/Source.rb +84 -0
  112. data/config/commands/Standard ML.rb +38 -0
  113. data/config/commands/Subversion.rb +181 -0
  114. data/config/commands/TODO.rb +32 -0
  115. data/config/commands/Tcl.rb +21 -0
  116. data/config/commands/TerminalMate.rb +30 -0
  117. data/config/commands/Text.rb +137 -0
  118. data/config/commands/TextMate.rb +100 -0
  119. data/config/commands/Textile.rb +58 -0
  120. data/config/commands/Thrift.rb +20 -0
  121. data/config/commands/Transmit.rb +34 -0
  122. data/config/commands/Txt2tags.rb +213 -0
  123. data/config/commands/Vectorscript.rb +19 -0
  124. data/config/commands/Widget Creator.rb +23 -0
  125. data/config/commands/XML.rb +29 -0
  126. data/config/commands/Xcode.rb +106 -0
  127. data/config/commands/YAML.rb +39 -0
  128. data/config/commands/YARD.rb +12 -0
  129. data/config/commands/iTerm.rb +26 -0
  130. data/config/commands/reStructuredText.rb +126 -0
  131. data/config/detect.rb +13 -1
  132. data/config/keymap/diakonos.rb +113 -115
  133. data/config/keymap/emacs.rb +6 -2
  134. data/config/keymap/nano.rb +104 -112
  135. data/config/keymap/vim.rb +329 -258
  136. data/config/plugin/autosave.rb +3 -6
  137. data/config/plugin/git.rb +18 -12
  138. data/config/plugin/soma.rb +1 -1
  139. data/config/preferences/Apache.rb +17 -17
  140. data/config/preferences/AppleScript.rb +5 -5
  141. data/config/preferences/Bundle Development.rb +10 -10
  142. data/config/preferences/C.rb +38 -30
  143. data/config/preferences/CoffeeScript.rb +28 -0
  144. data/config/preferences/ColdFusion.rb +6 -6
  145. data/config/preferences/Cucumber.rb +40 -0
  146. data/config/preferences/Diff.rb +4 -4
  147. data/config/preferences/Eiffel.rb +6 -6
  148. data/config/preferences/Erlang.rb +16 -16
  149. data/config/preferences/F-Script.rb +12 -12
  150. data/config/preferences/FXScript.rb +5 -5
  151. data/config/preferences/Fortran.rb +17 -17
  152. data/config/preferences/Go.rb +23 -0
  153. data/config/preferences/Groovy.rb +29 -0
  154. data/config/preferences/HTML.rb +44 -44
  155. data/config/preferences/Haskell.rb +14 -14
  156. data/config/preferences/Io.rb +11 -11
  157. data/config/preferences/Java.rb +8 -8
  158. data/config/preferences/LaTeX.rb +24 -24
  159. data/config/preferences/Logo.rb +6 -6
  160. data/config/preferences/Logtalk.rb +5 -5
  161. data/config/preferences/Markdown.rb +43 -0
  162. data/config/preferences/Maven.rb +42 -42
  163. data/config/preferences/Mediawiki.rb +8 -8
  164. data/config/preferences/Movable Type.rb +14 -14
  165. data/config/preferences/OCaml.rb +15 -15
  166. data/config/preferences/Objective-C.rb +5 -5
  167. data/config/preferences/PHP.rb +2564 -0
  168. data/config/preferences/Property List.rb +8 -8
  169. data/config/preferences/R.rb +5 -5
  170. data/config/preferences/Ruby.rb +24 -24
  171. data/config/preferences/Source.rb +13 -13
  172. data/config/preferences/Standard ML.rb +9 -9
  173. data/config/preferences/Tcl.rb +5 -5
  174. data/config/preferences/Text.rb +14 -14
  175. data/config/preferences/TextMate.rb +5 -5
  176. data/config/preferences/Textile.rb +8 -8
  177. data/config/preferences/YARD.rb +9 -0
  178. data/config/preferences/iTerm.rb +9 -9
  179. data/config/rc.rb +5 -2
  180. data/config/snippets/ASP vb.NET.rb +203 -54
  181. data/config/snippets/ASP.rb +51 -36
  182. data/config/snippets/ActionScript.rb +332 -205
  183. data/config/snippets/Active4D.rb +325 -256
  184. data/config/snippets/Ada.rb +106 -60
  185. data/config/snippets/Ant.rb +7 -5
  186. data/config/snippets/Apache.rb +24 -20
  187. data/config/snippets/AppleScript.rb +213 -82
  188. data/config/snippets/Blogging.rb +41 -18
  189. data/config/snippets/Bulletin Board.rb +56 -21
  190. data/config/snippets/Bundle Development.rb +108 -63
  191. data/config/snippets/C++ Qt.rb +72 -57
  192. data/config/snippets/C.rb +128 -100
  193. data/config/snippets/CMake.rb +42 -32
  194. data/config/snippets/CSS.rb +515 -115
  195. data/config/snippets/CoffeeScript.rb +85 -0
  196. data/config/snippets/ColdFusion.rb +2228 -1547
  197. data/config/snippets/Context Free.rb +35 -28
  198. data/config/snippets/Cucumber.rb +55 -0
  199. data/config/snippets/D.rb +164 -111
  200. data/config/snippets/DokuWiki.rb +103 -54
  201. data/config/snippets/Doxygen.rb +87 -40
  202. data/config/snippets/Eiffel.rb +121 -18
  203. data/config/snippets/Erlang.rb +109 -68
  204. data/config/snippets/F-Script.rb +30 -24
  205. data/config/snippets/FXScript.rb +364 -210
  206. data/config/snippets/Fortran.rb +462 -280
  207. data/config/snippets/GTDAlt.rb +10 -4
  208. data/config/snippets/Gettext.rb +10 -8
  209. data/config/snippets/Go.rb +52 -0
  210. data/config/snippets/Greasemonkey.rb +52 -42
  211. data/config/snippets/Gri.rb +12 -10
  212. data/config/snippets/Groovy Grails.rb +313 -0
  213. data/config/snippets/Groovy.rb +685 -0
  214. data/config/snippets/HTML.rb +325 -126
  215. data/config/snippets/Haskell.rb +32 -24
  216. data/config/snippets/Io.rb +53 -42
  217. data/config/snippets/Java.rb +204 -92
  218. data/config/snippets/JavaDoc.rb +105 -56
  219. data/config/snippets/JavaScript MooTools.rb +208 -13
  220. data/config/snippets/JavaScript Objective-J.rb +18 -15
  221. data/config/snippets/JavaScript Prototype & Script.aculo.us.rb +362 -107
  222. data/config/snippets/JavaScript YUI.rb +1245 -186
  223. data/config/snippets/JavaScript jQuery.rb +693 -375
  224. data/config/snippets/JavaScript.rb +71 -53
  225. data/config/snippets/LaTeX.rb +188 -0
  226. data/config/snippets/Lisp.rb +59 -40
  227. data/config/snippets/Logo.rb +12 -6
  228. data/config/snippets/Logtalk.rb +131 -60
  229. data/config/snippets/Lua.rb +43 -33
  230. data/config/snippets/MIPS Assembler.rb +7 -5
  231. data/config/snippets/Mail.rb +10 -1
  232. data/config/snippets/Markdown.rb +7 -0
  233. data/config/snippets/Matlab.rb +232 -178
  234. data/config/snippets/Maven.rb +6 -5
  235. data/config/snippets/Mediawiki.rb +43 -12
  236. data/config/snippets/MoinMoin.rb +50 -10
  237. data/config/snippets/Movable Type.rb +368 -53
  238. data/config/snippets/Nemerle.rb +127 -79
  239. data/config/snippets/OCaml Code Completion Misc.rb +1716 -72
  240. data/config/snippets/OCaml Code Completion Unix.rb +2128 -203
  241. data/config/snippets/OCaml.rb +107 -73
  242. data/config/snippets/ODCompletion.rb +169 -118
  243. data/config/snippets/Objective-C.rb +281 -193
  244. data/config/snippets/PHP Smarty.rb +149 -79
  245. data/config/snippets/PHP.rb +186 -0
  246. data/config/snippets/Pascal.rb +47 -33
  247. data/config/snippets/Perl HTML-Template.rb +33 -0
  248. data/config/snippets/Perl Mason.rb +50 -30
  249. data/config/snippets/Perl Template Toolkit.rb +25 -20
  250. data/config/snippets/Perl.rb +91 -72
  251. data/config/snippets/Processing.rb +55 -33
  252. data/config/snippets/Propel.rb +36 -30
  253. data/config/snippets/Property List.rb +57 -24
  254. data/config/snippets/Python Django Templates.rb +381 -95
  255. data/config/snippets/Python Django.rb +159 -132
  256. data/config/snippets/Python.rb +88 -0
  257. data/config/snippets/R Console (Rdaemon).rb +11 -9
  258. data/config/snippets/R.rb +96 -77
  259. data/config/snippets/Remind.rb +18 -15
  260. data/config/snippets/Ruby RSpec.rb +343 -238
  261. data/config/snippets/Ruby on Rails.rb +1116 -765
  262. data/config/snippets/Ruby.rb +770 -545
  263. data/config/snippets/S5 Slide Show.rb +32 -24
  264. data/config/snippets/SSH Config.rb +21 -17
  265. data/config/snippets/SWIG.rb +30 -18
  266. data/config/snippets/Scilab.rb +98 -79
  267. data/config/snippets/Setext.rb +10 -8
  268. data/config/snippets/Shell Script.rb +52 -42
  269. data/config/snippets/Slate.rb +62 -48
  270. data/config/snippets/Source.rb +24 -1
  271. data/config/snippets/Standard ML.rb +37 -27
  272. data/config/snippets/Tcl.rb +32 -26
  273. data/config/snippets/Text.rb +28 -15
  274. data/config/snippets/Textile.rb +130 -45
  275. data/config/snippets/Thrift.rb +22 -18
  276. data/config/snippets/Twiki.rb +158 -105
  277. data/config/snippets/Txt2tags.rb +166 -79
  278. data/config/snippets/Vectorscript.rb +47 -38
  279. data/config/snippets/Widget Creator.rb +5 -5
  280. data/config/snippets/XML.rb +30 -18
  281. data/config/snippets/YAML.rb +5 -4
  282. data/config/snippets/YARD.rb +93 -0
  283. data/config/snippets/reStructuredText.rb +25 -20
  284. data/config/syntax/ANTLR.rb +17 -15
  285. data/config/syntax/ASP vb.NET.rb +27 -24
  286. data/config/syntax/ASP.rb +21 -19
  287. data/config/syntax/ActionScript.rb +16 -16
  288. data/config/syntax/Active4D Config.rb +5 -5
  289. data/config/syntax/Active4D Library.rb +2 -2
  290. data/config/syntax/Active4D.rb +32 -30
  291. data/config/syntax/Ada.rb +13 -10
  292. data/config/syntax/Ant.rb +9 -7
  293. data/config/syntax/Apache.rb +22 -18
  294. data/config/syntax/AppleScript.rb +486 -192
  295. data/config/syntax/AsciiDoc.rb +21 -0
  296. data/config/syntax/BibTeX.rb +7 -7
  297. data/config/syntax/Blog - HTML.rb +7 -7
  298. data/config/syntax/Blog - Markdown.rb +6 -6
  299. data/config/syntax/Blog - Text.rb +2 -2
  300. data/config/syntax/Blog - Textile.rb +2 -2
  301. data/config/syntax/Bulletin Board.rb +33 -32
  302. data/config/syntax/C++ Qt.rb +7 -6
  303. data/config/syntax/C++.rb +31 -28
  304. data/config/syntax/C.rb +55 -51
  305. data/config/syntax/CMake Listfile.rb +12 -11
  306. data/config/syntax/CSS.rb +24 -23
  307. data/config/syntax/CSV.rb +3 -3
  308. data/config/syntax/CoffeeScript.rb +161 -0
  309. data/config/syntax/ColdFusion.rb +8 -8
  310. data/config/syntax/Context Free.rb +18 -16
  311. data/config/syntax/Cucumber Steps.rb +108 -0
  312. data/config/syntax/D.rb +70 -69
  313. data/config/syntax/Diff.rb +13 -10
  314. data/config/syntax/DokuWiki.rb +22 -18
  315. data/config/syntax/Doxygen.rb +1 -1
  316. data/config/syntax/Dylan.rb +8 -8
  317. data/config/syntax/Eiffel.rb +12 -12
  318. data/config/syntax/Erlang.rb +96 -89
  319. data/config/syntax/F-Script.rb +11 -9
  320. data/config/syntax/FXScript.rb +16 -14
  321. data/config/syntax/Fortran - Modern.rb +25 -24
  322. data/config/syntax/Fortran - Punchcard.rb +43 -40
  323. data/config/syntax/GTD.rb +1 -1
  324. data/config/syntax/GTDalt.rb +14 -11
  325. data/config/syntax/Gettext.rb +10 -9
  326. data/config/syntax/Gherkin.rb +65 -0
  327. data/config/syntax/Go.rb +256 -0
  328. data/config/syntax/Grails Server Page.rb +108 -0
  329. data/config/syntax/Graphviz (DOT).rb +6 -6
  330. data/config/syntax/Greasemonkey.rb +3 -3
  331. data/config/syntax/Gri.rb +12 -12
  332. data/config/syntax/Groovy.rb +502 -0
  333. data/config/syntax/HTML (ASP).rb +3 -3
  334. data/config/syntax/HTML (ASP.net).rb +31 -31
  335. data/config/syntax/HTML (Active4D).rb +19 -19
  336. data/config/syntax/HTML (Django).rb +6 -6
  337. data/config/syntax/HTML (Erlang).rb +4 -4
  338. data/config/syntax/HTML (Mason).rb +13 -13
  339. data/config/syntax/HTML (Rails).rb +5 -5
  340. data/config/syntax/HTML (Tcl).rb +3 -3
  341. data/config/syntax/HTML (Template Toolkit).rb +9 -9
  342. data/config/syntax/HTML.rb +27 -27
  343. data/config/syntax/Haskell.rb +31 -28
  344. data/config/syntax/Inform.rb +5 -5
  345. data/config/syntax/Ini.rb +4 -4
  346. data/config/syntax/Installer Distribution Script.rb +19 -18
  347. data/config/syntax/Io.rb +17 -15
  348. data/config/syntax/JSFL.rb +7 -6
  349. data/config/syntax/Java Properties.rb +3 -3
  350. data/config/syntax/Java Server Page (JSP).rb +5 -4
  351. data/config/syntax/Java.rb +40 -33
  352. data/config/syntax/JavaDoc.rb +24 -22
  353. data/config/syntax/JavaScript (Rails).rb +1 -1
  354. data/config/syntax/JavaScript.rb +41 -34
  355. data/config/syntax/Javascript YUI.rb +109 -101
  356. data/config/syntax/LaTeX Beamer.rb +3 -3
  357. data/config/syntax/LaTeX Log.rb +3 -3
  358. data/config/syntax/LaTeX Memoir.rb +7 -5
  359. data/config/syntax/LaTeX Rdaemon.rb +1 -1
  360. data/config/syntax/LaTeX.rb +52 -47
  361. data/config/syntax/Language Grammar.rb +58 -55
  362. data/config/syntax/Lex-Flex.rb +13 -13
  363. data/config/syntax/Lighttpd.rb +7 -7
  364. data/config/syntax/Lisp.rb +6 -5
  365. data/config/syntax/Literate Haskell.rb +2 -2
  366. data/config/syntax/Logo.rb +4 -4
  367. data/config/syntax/Logtalk.rb +64 -49
  368. data/config/syntax/Lua.rb +12 -12
  369. data/config/syntax/MATLAB.rb +71 -70
  370. data/config/syntax/MEL.rb +16 -15
  371. data/config/syntax/MIPS Assembler.rb +11 -11
  372. data/config/syntax/MacPorts Portfile.rb +16 -15
  373. data/config/syntax/Mail.rb +5 -4
  374. data/config/syntax/Makefile.rb +3 -3
  375. data/config/syntax/Man.rb +2 -2
  376. data/config/syntax/Markdown.rb +440 -0
  377. data/config/syntax/Maven POM.rb +17 -16
  378. data/config/syntax/Mediawiki.rb +46 -46
  379. data/config/syntax/Modula-3.rb +7 -6
  380. data/config/syntax/MoinMoin.rb +16 -16
  381. data/config/syntax/MooTools.rb +75 -65
  382. data/config/syntax/Movable Type (MT only).rb +18 -18
  383. data/config/syntax/Movable Type.rb +20 -20
  384. data/config/syntax/MultiMarkdown.rb +35 -0
  385. data/config/syntax/Nemerle.rb +12 -12
  386. data/config/syntax/OCaml.rb +79 -71
  387. data/config/syntax/OCamllex.rb +14 -14
  388. data/config/syntax/OCamlyacc.rb +14 -12
  389. data/config/syntax/Objective-C++.rb +2 -2
  390. data/config/syntax/Objective-C.rb +76 -70
  391. data/config/syntax/Objective-J.rb +30 -29
  392. data/config/syntax/Octave.rb +27 -27
  393. data/config/syntax/OpenGL.rb +4 -4
  394. data/config/syntax/PHP.rb +1154 -0
  395. data/config/syntax/Pascal.rb +8 -8
  396. data/config/syntax/Perl HTML-Template.rb +5 -5
  397. data/config/syntax/Perl.rb +80 -76
  398. data/config/syntax/Plain Text.rb +5 -5
  399. data/config/syntax/Postscript.rb +6 -6
  400. data/config/syntax/Processing.rb +20 -20
  401. data/config/syntax/Prolog.rb +2 -2
  402. data/config/syntax/Property List.rb +50 -47
  403. data/config/syntax/Prototype & Script.aculo.us (JavaScript) Bracketed.rb +15 -13
  404. data/config/syntax/Prototype & Script.aculo.us (JavaScript).rb +9 -8
  405. data/config/syntax/Python Django.rb +6 -6
  406. data/config/syntax/Python.rb +94 -87
  407. data/config/syntax/Quake Style .cfg.rb +4 -4
  408. data/config/syntax/R Console (Rdaemon) Plain.rb +2 -2
  409. data/config/syntax/R Console (Rdaemon).rb +2 -2
  410. data/config/syntax/R.rb +21 -20
  411. data/config/syntax/RSpec.rb +15 -15
  412. data/config/syntax/Ragel.rb +14 -13
  413. data/config/syntax/Rd (R Documentation).rb +4 -4
  414. data/config/syntax/Regular Expressions (Oniguruma).rb +11 -10
  415. data/config/syntax/Regular Expressions (Python).rb +9 -9
  416. data/config/syntax/Release Notes.rb +7 -6
  417. data/config/syntax/Remind.rb +19 -17
  418. data/config/syntax/Rez.rb +10 -9
  419. data/config/syntax/Ruby Haml.rb +11 -11
  420. data/config/syntax/Ruby on Rails.rb +26 -24
  421. data/config/syntax/Ruby.rb +73 -71
  422. data/config/syntax/S5 Slide Show.rb +9 -9
  423. data/config/syntax/SQL.rb +29 -27
  424. data/config/syntax/SSH Config.rb +4 -4
  425. data/config/syntax/SWIG.rb +12 -11
  426. data/config/syntax/SWeave.rb +8 -7
  427. data/config/syntax/Scheme.rb +56 -54
  428. data/config/syntax/Scilab.rb +7 -6
  429. data/config/syntax/Setext.rb +14 -13
  430. data/config/syntax/Shell Script (Bash).rb +42 -42
  431. data/config/syntax/Slate.rb +24 -19
  432. data/config/syntax/Smarty.rb +11 -10
  433. data/config/syntax/Standard ML - CM.rb +2 -2
  434. data/config/syntax/Standard ML.rb +26 -23
  435. data/config/syntax/Strings File.rb +6 -6
  436. data/config/syntax/TSV.rb +2 -2
  437. data/config/syntax/Tcl.rb +10 -9
  438. data/config/syntax/TeX Math.rb +7 -6
  439. data/config/syntax/TeX.rb +7 -7
  440. data/config/syntax/Textile.rb +33 -27
  441. data/config/syntax/Thrift.rb +37 -29
  442. data/config/syntax/Twiki.rb +19 -18
  443. data/config/syntax/Txt2tags.rb +26 -23
  444. data/config/syntax/Vectorscript.rb +9 -7
  445. data/config/syntax/XML strict.rb +6 -4
  446. data/config/syntax/XML.rb +55 -30
  447. data/config/syntax/XSL.rb +5 -5
  448. data/config/syntax/YAML.rb +14 -12
  449. data/config/syntax/camlp4.rb +5 -5
  450. data/config/syntax/iCalendar.rb +3 -3
  451. data/config/syntax/jQuery (JavaScript).rb +9 -9
  452. data/config/syntax/mod_perl.rb +6 -6
  453. data/config/syntax/qmake Project file.rb +16 -15
  454. data/config/syntax/reStructuredText.rb +23 -21
  455. data/config/syntax/svn-commit.tmp.rb +5 -5
  456. data/lib/ver.rb +169 -85
  457. data/lib/ver/action.rb +39 -30
  458. data/lib/ver/buffer.rb +962 -144
  459. data/lib/ver/buffer/frame.rb +23 -0
  460. data/lib/ver/buffer/invalid_trailing_whitespace.rb +17 -0
  461. data/lib/ver/buffer/markup_underline_link.rb +30 -0
  462. data/lib/ver/buffer/matching_brace.rb +22 -0
  463. data/lib/ver/buffer/term.rb +1 -1
  464. data/lib/ver/clipboard.rb +107 -0
  465. data/lib/ver/digraphs.rb +1373 -0
  466. data/lib/ver/entry.rb +54 -43
  467. data/lib/ver/event.rb +335 -0
  468. data/lib/ver/exception_view.rb +3 -1
  469. data/lib/ver/executor.rb +7 -7
  470. data/lib/ver/executor/buffer.rb +4 -4
  471. data/lib/ver/executor/encoding.rb +19 -0
  472. data/lib/ver/executor/entry.rb +9 -9
  473. data/lib/ver/executor/fuzzy_file_finder.rb +1 -1
  474. data/lib/ver/executor/label.rb +2 -0
  475. data/lib/ver/executor/method.rb +2 -3
  476. data/lib/ver/help/describe_key.rb +44 -44
  477. data/lib/ver/hover_completion.rb +11 -6
  478. data/lib/ver/keymap.rb +68 -39
  479. data/lib/ver/layout/paned.rb +56 -44
  480. data/lib/ver/layout/toplevel.rb +68 -0
  481. data/lib/ver/layout/vim.rb +919 -0
  482. data/lib/ver/major_mode.rb +49 -49
  483. data/lib/ver/methods.rb +22 -25
  484. data/lib/ver/methods/basic.rb +49 -20
  485. data/lib/ver/methods/bookmark.rb +33 -33
  486. data/lib/ver/methods/clipboard.rb +186 -49
  487. data/lib/ver/methods/completion.rb +5 -5
  488. data/lib/ver/methods/control.rb +47 -66
  489. data/lib/ver/methods/delete.rb +5 -122
  490. data/lib/ver/methods/help.rb +2 -2
  491. data/lib/ver/methods/insert.rb +101 -29
  492. data/lib/ver/methods/layout.rb +62 -64
  493. data/lib/ver/methods/macro.rb +45 -0
  494. data/lib/ver/methods/move.rb +63 -349
  495. data/lib/ver/methods/nano.rb +99 -71
  496. data/lib/ver/methods/open.rb +8 -7
  497. data/lib/ver/methods/preview.rb +34 -14
  498. data/lib/ver/methods/save.rb +194 -163
  499. data/lib/ver/methods/search.rb +169 -81
  500. data/lib/ver/methods/search_and_replace.rb +62 -49
  501. data/lib/ver/methods/selection.rb +26 -54
  502. data/lib/ver/methods/snippet.rb +79 -54
  503. data/lib/ver/methods/undo.rb +12 -16
  504. data/lib/ver/minibuffer.rb +283 -134
  505. data/lib/ver/minor_mode.rb +36 -47
  506. data/lib/ver/mode_resolving.rb +71 -0
  507. data/lib/ver/platform.rb +41 -0
  508. data/lib/ver/plist.rb +16 -4
  509. data/lib/ver/register.rb +86 -0
  510. data/lib/ver/status.rb +44 -6
  511. data/lib/ver/status/battery.rb +1 -1
  512. data/lib/ver/status/buffer_position.rb +2 -2
  513. data/lib/ver/status/diakonos_position.rb +3 -3
  514. data/lib/ver/status/encoding.rb +1 -1
  515. data/lib/ver/status/filename.rb +1 -1
  516. data/lib/ver/status/label.rb +20 -20
  517. data/lib/ver/status/mode.rb +1 -1
  518. data/lib/ver/status/nano_help.rb +3 -14
  519. data/lib/ver/status/nano_position.rb +6 -6
  520. data/lib/ver/status/percent.rb +2 -2
  521. data/lib/ver/status/position.rb +2 -2
  522. data/lib/ver/status/short_filename.rb +1 -1
  523. data/lib/ver/status/syntax.rb +1 -1
  524. data/lib/ver/struct.rb +28 -0
  525. data/lib/ver/syntax/processor.rb +2 -1
  526. data/lib/ver/text.rb +48 -520
  527. data/lib/ver/text/end.rb +14 -0
  528. data/lib/ver/text/index.rb +16 -101
  529. data/lib/ver/text/insert.rb +138 -0
  530. data/lib/ver/text/mark.rb +559 -0
  531. data/lib/ver/text/position.rb +240 -0
  532. data/lib/ver/text/range.rb +74 -0
  533. data/lib/ver/text/selection.rb +402 -0
  534. data/lib/ver/text/selection/block.rb +69 -0
  535. data/lib/ver/text/selection/char.rb +93 -0
  536. data/lib/ver/text/selection/line.rb +64 -0
  537. data/lib/ver/text/tag.rb +322 -0
  538. data/lib/ver/undo.rb +109 -34
  539. data/lib/ver/vendor/eval_completer.rb +184 -0
  540. data/lib/ver/vendor/json_store.rb +23 -0
  541. data/lib/ver/vendor/open3.rb +729 -0
  542. data/lib/ver/vendor/pathname.rb +73 -0
  543. data/lib/ver/vendor/textpow.rb +1 -1
  544. data/lib/ver/version.rb +1 -1
  545. data/lib/ver/widget_event.rb +9 -5
  546. data/lib/ver/widget_major_mode.rb +69 -23
  547. data/spec/helper.rb +124 -8
  548. data/spec/ver/action.rb +160 -46
  549. data/spec/ver/buffer.rb +23 -0
  550. data/spec/ver/clipboard.rb +92 -0
  551. data/spec/ver/keymap.rb +63 -61
  552. data/spec/ver/keymap/diakonos.rb +88 -0
  553. data/spec/ver/keymap/emacs.rb +65 -0
  554. data/spec/ver/keymap/general.rb +98 -0
  555. data/spec/ver/keymap/nano.rb +84 -0
  556. data/spec/ver/keymap/vim.rb +205 -0
  557. data/spec/ver/keymap/vim/changing_text.rb +489 -0
  558. data/spec/ver/keymap/vim/complex_changes.rb +53 -0
  559. data/spec/ver/keymap/vim/copying_and_moving_text.rb +258 -0
  560. data/spec/ver/keymap/vim/deleting_text.rb +188 -0
  561. data/spec/ver/keymap/vim/digraphs.rb +52 -0
  562. data/spec/ver/keymap/vim/external_commands.rb +21 -0
  563. data/spec/ver/keymap/vim/inserting_mode_keys.rb +115 -0
  564. data/spec/ver/keymap/vim/inserting_mode_special.rb +168 -0
  565. data/spec/ver/keymap/vim/inserting_text.rb +108 -0
  566. data/spec/ver/keymap/vim/left_right_motion.rb +120 -0
  567. data/spec/ver/keymap/vim/mark_motion.rb +73 -0
  568. data/spec/ver/keymap/vim/repeating_commands.rb +64 -0
  569. data/spec/ver/keymap/vim/text_object_motion.rb +137 -0
  570. data/spec/ver/keymap/vim/text_objects.rb +101 -0
  571. data/spec/ver/keymap/vim/undo_redo.rb +21 -0
  572. data/spec/ver/keymap/vim/up_down_motion.rb +94 -0
  573. data/spec/ver/keymap/vim/various_motion.rb +33 -0
  574. data/spec/ver/keysyms.rb +13 -0
  575. data/spec/ver/major_mode.rb +37 -37
  576. data/spec/ver/minor_mode.rb +21 -20
  577. data/spec/ver/plugin/smart_autoindent.rb +2 -2
  578. data/spec/ver/text/index.rb +122 -0
  579. data/spec/ver/text/insert.rb +299 -0
  580. data/spec/ver/text/mark.rb +94 -0
  581. data/spec/ver/text/range.rb +71 -0
  582. data/spec/ver/text/selection.rb +315 -0
  583. data/spec/ver/text/tag.rb +93 -0
  584. data/spec/ver/undo.rb +133 -0
  585. data/spec/ver/undo/record_sanitize.rb +85 -0
  586. data/spec/ver/vendor/eval_completer.rb +91 -0
  587. data/spec/ver/widget_major_mode.rb +4 -3
  588. data/ver.gemspec +8 -8
  589. metadata +234 -72
  590. data/.todo +0 -102
  591. data/ROADMAP.textile +0 -187
  592. data/config/snippets/ANTLR.rb +0 -3
  593. data/config/snippets/Bison.rb +0 -3
  594. data/config/snippets/CTags.rb +0 -3
  595. data/config/snippets/CVS.rb +0 -3
  596. data/config/snippets/Darcs.rb +0 -3
  597. data/config/snippets/Diff.rb +0 -3
  598. data/config/snippets/Dylan.rb +0 -3
  599. data/config/snippets/Experimental Wiki.rb +0 -3
  600. data/config/snippets/Experimental.rb +0 -3
  601. data/config/snippets/FileMerge.rb +0 -3
  602. data/config/snippets/GTD2.rb +0 -3
  603. data/config/snippets/GetBundle.rb +0 -3
  604. data/config/snippets/Graphviz.rb +0 -3
  605. data/config/snippets/Hotkey.rb +0 -3
  606. data/config/snippets/Hyperlink Helper.rb +0 -3
  607. data/config/snippets/ImageBrowser.rb +0 -3
  608. data/config/snippets/Inform.rb +0 -3
  609. data/config/snippets/Ini.rb +0 -3
  610. data/config/snippets/Installer.rb +0 -3
  611. data/config/snippets/JSFL.rb +0 -3
  612. data/config/snippets/JSON.rb +0 -3
  613. data/config/snippets/Lex-Flex.rb +0 -3
  614. data/config/snippets/Lighttpd.rb +0 -3
  615. data/config/snippets/MEL.rb +0 -3
  616. data/config/snippets/MacPorts.rb +0 -3
  617. data/config/snippets/Make.rb +0 -3
  618. data/config/snippets/Man Pages.rb +0 -3
  619. data/config/snippets/Math.rb +0 -3
  620. data/config/snippets/Mercurial.rb +0 -3
  621. data/config/snippets/Modula.rb +0 -3
  622. data/config/snippets/Navigation.rb +0 -3
  623. data/config/snippets/OCaml Experimental Completions.rb +0 -3
  624. data/config/snippets/OpenGL.rb +0 -3
  625. data/config/snippets/Outlines.rb +0 -3
  626. data/config/snippets/Perforce.rb +0 -3
  627. data/config/snippets/Perl HTML::Template.rb +0 -27
  628. data/config/snippets/Postscript.rb +0 -3
  629. data/config/snippets/Prolog.rb +0 -3
  630. data/config/snippets/Quake.rb +0 -3
  631. data/config/snippets/R Console (R.app).rb +0 -3
  632. data/config/snippets/Ragel.rb +0 -3
  633. data/config/snippets/Regular Expressions.rb +0 -3
  634. data/config/snippets/Rez.rb +0 -3
  635. data/config/snippets/Ruby Haml.rb +0 -3
  636. data/config/snippets/SCons.rb +0 -3
  637. data/config/snippets/SQL.rb +0 -3
  638. data/config/snippets/SVK.rb +0 -3
  639. data/config/snippets/SWeave.rb +0 -3
  640. data/config/snippets/Scheme.rb +0 -3
  641. data/config/snippets/Subversion.rb +0 -3
  642. data/config/snippets/TODO.rb +0 -3
  643. data/config/snippets/Tabular.rb +0 -3
  644. data/config/snippets/TerminalMate.rb +0 -3
  645. data/config/snippets/TextMate.rb +0 -3
  646. data/config/snippets/Transmit.rb +0 -3
  647. data/config/snippets/Xcode.rb +0 -3
  648. data/config/snippets/iCalendar.rb +0 -3
  649. data/config/snippets/iTerm.rb +0 -3
  650. data/lib/ver/keysyms.rb +0 -104
  651. data/spec/ver/methods/move.rb +0 -150
@@ -0,0 +1,82 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ bundleUUID: "4675A940-6227-11D9-BFB1-000D93589AF6",
5
+ command:
6
+ "#!/usr/bin/env ruby\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/exit_codes\"\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/escape\"\n\nif ENV['DIALOG'] =~ /2$/\n require \"\#{ENV['TM_BUNDLE_SUPPORT']}/c_completion2\"\nelse\n require \"\#{ENV['TM_BUNDLE_SUPPORT']}/c_completion\"\nend\n\nres = CppCompletion.new.print\nprint res",
7
+ fallbackInput: "line",
8
+ input: "none",
9
+ keyEquivalent: "~",
10
+ name: "C C++ Library Completions",
11
+ output: "insertAsSnippet",
12
+ scope: "source.c++",
13
+ uuid: "093DA4F2-D97F-4309-B869-6970C090A539"},
14
+ {beforeRunningCommand: "nop",
15
+ bundleUUID: "4675A940-6227-11D9-BFB1-000D93589AF6",
16
+ command:
17
+ "#!/usr/bin/env ruby\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/exit_codes\"\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/escape\"\n\nif ENV['DIALOG'] =~ /2$/\n require \"\#{ENV['TM_BUNDLE_SUPPORT']}/c_completion2\"\nelse\n require \"\#{ENV['TM_BUNDLE_SUPPORT']}/c_completion\"\nend\n\nres = CCompletion.new.print\nprint res",
18
+ fallbackInput: "line",
19
+ input: "none",
20
+ keyEquivalent: "~",
21
+ name: "C Library Completions",
22
+ output: "insertAsSnippet",
23
+ scope: "source.c",
24
+ uuid: "45FFA4DA-C84A-4D1F-862B-F249C24941EF"},
25
+ {beforeRunningCommand: "nop",
26
+ command:
27
+ "#!/usr/bin/env ruby\n#\n# Compile the active file to an executable.\n# Executable name is prefixed with \"Test\".\n\nrequire 'English'\n\nFilePath\t\t= ENV['TM_FILEPATH']\nFileDir\t\t= ENV['TM_DIRECTORY']\nFileBaseName\t= File.basename(FilePath)\nFileExtension\t= File.extname(FilePath)\nFileNoExtension = FileBaseName.sub(/\#{FileExtension}$/, \"\")\n\nDir.chdir(ENV['TM_DIRECTORY'])\n\n# have to use g++ to bring in C++ runtime libraries\ncc = case FileExtension\nwhen /\\.c(pp?|xx|\\+\\+)/,'.C','.ii'\n\t'g++'\nelse\n\t'gcc'\nend\n\nputs %x{ \"\#{cc}\" -g -Wmost -Os -o \"Test\#{FileNoExtension}\" \"$TM_FILEPATH\"}\n\nputs \"Successfully created Test\#{FileNoExtension}\" unless $CHILD_STATUS != 0\n",
28
+ input: "none",
29
+ name: "Compile Single File to Tool",
30
+ output: "showAsTooltip",
31
+ scope: "source.c, source.c++",
32
+ uuid: "FF165AAB-1582-4DA8-B0D1-13EBD30B24FD"},
33
+ {beforeRunningCommand: "nop",
34
+ bundleUUID: "4675A940-6227-11D9-BFB1-000D93589AF6",
35
+ command:
36
+ "#!/usr/bin/env ruby\nline = STDIN.read\n$tab = (ENV['TM_SOFT_TABS'] == \"NO\" ? \"\\t\" : \" \"*ENV['TM_TAB_SIZE'].to_i )\ndef join_code s\n # transform // comments to /* */ comments while leaving strings intact\n s.gsub!(/((['\"])(?:\\\\.|.)*?\\2)|\\/\\*.*?\\*\\/|\\/\\/([^\\n\\r]*)/m) do |line| \n if $3\n '/*' + $3.gsub(/\\*\\//, '') + '*/'\n else\n line\n end\n end\n print s.split(\"\\n\").map {|line| line.strip}.join(\" \")\nend\n\ndef print_line(line, indent, for_ticker)\n s = \"\"\n s = \"\\n\" if for_ticker == 0\n s + $tab*indent + line # the space should be replaced with soft or hard tab\nend\n\ndef split_code s\n res = []\n indent = 0\n for_ticker = 1\n # this regexp should not have a capture depth deeper than 1\n # yes that does rule out backrefs :(\n s.split(/([\\{\\}\\;]|\"(?:\\\\.|.)*?\"|'(?:\\\\.|.)*?'|\\/\\*.*?\\*\\/|\\/\\/[^\\n\\r]*)/).map do |l|\n l = l.strip\n case l\n when /^for\\s*\\(/\n res << print_line(l, indent, for_ticker)\n for_ticker = 5\n when \"{\"\n s = print_line(l, indent, for_ticker)\n\t for_ticker -= 1 unless for_ticker == 0\n indent += 1\n\t s += print_line(\"\", indent, for_ticker)\n res << s\n when \"}\"\n indent -= 1\n res << print_line(l, indent, for_ticker)\n res << print_line(\"\", indent, for_ticker)\n when \";\"\n res << l\n if for_ticker == 0\n res << print_line(\"\", indent, for_ticker)\n else\n res << \" \"\n end\n when /^\\s*$/\n\t for_ticker += 1 # if empty string maintain the status-quo\n else\n res << l\n end\n for_ticker -= 1 unless for_ticker == 0\n end\n\nrequire \"enumerator\"\nout = []\nres.each_cons(2) do |a,b|\n # remove empty lines inserted when ; is followed by { or }\n\tout << a unless a.match(/^\\n\\s*$/) && b.match(/^\\n\\s*(\\}|\\{)\\s*$/)\nend\nprint out.join\nend\n\nif line.count(\"\\n\") > 1\n\tjoin_code(line)\nelse\n\tsplit_code(line)\nend\n\n#k = \"- (id)showSomeWindow \n# {\n# for(int i =0;i<a;i++)\n# {\n# \\\" boras /* */ //\\\"\n# // hello /* */ \n# if(a)\n# [ window makeKeyAndOrderFront:self];\n# }\n# }\"\n#join_code(k)\n#l = \"- (id)showSomeWindow { for(int i =0;i<a;i++) { \\\" boras /* */ //\\\" /* hello /* */ if(a) [ window makeKeyAndOrderFront:self]; } }\"\n#split_code(l)",
37
+ fallbackInput: "scope",
38
+ input: "selection",
39
+ keyEquivalent: "^{",
40
+ name: "Fold/Unfold Code",
41
+ output: "replaceSelectedText",
42
+ scope: "meta.block.c",
43
+ uuid: "3D221F96-F4CC-432D-9A04-F9F4DF3E0F55"},
44
+ {beforeRunningCommand: "nop",
45
+ command:
46
+ "#!/usr/bin/env ruby -wKU\n\nline = STDIN.read\n\nif line =~ /\\((.*)\\)(\\s?)/ # extract parameters\n\tline, ws = $1, $2\n\tline.gsub!(/<.*?>/, '') # remove template args\n\tline.gsub!(/\\(.*?\\)/, '') # remove (…), e.g. ‘type const& var = type()’\n\tline = line.split(',').map { |e| e.gsub(/.*?(\\w+)(\\s+=.*)?$/, '\\1(\\1)') }.join(', ')\n\tprint ' ' if ws.empty?\n\tprint ': ' + line\nend\n",
47
+ fallbackInput: "line",
48
+ input: "selection",
49
+ name: "Insert Call to Constructors",
50
+ output: "afterSelectedText",
51
+ scope: "source.c++, source.objc++",
52
+ tabTrigger: ":",
53
+ uuid: "1B7326BB-6A85-4ED2-A0D7-51619763D98F"},
54
+ {beforeRunningCommand: "nop",
55
+ command:
56
+ "#!/usr/bin/env ruby -wKU\n\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/textmate.rb'\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb'\n\nUSR_HEAD = Regexp.escape \"#include \\\"...\\\" search starts here:\\n\"\nSYS_HEAD = Regexp.escape \"#include <...> search starts here:\\n\"\nFOOTER = Regexp.escape 'End of search list.'\n\nCOMPILER = {\n 'source.c' => 'gcc 2>&1 >/dev/null -E -v -x c /dev/null',\n 'source.c++' => 'g++ 2>&1 >/dev/null -E -v -x c++ /dev/null',\n 'source.objc' => 'gcc 2>&1 >/dev/null -E -v -x objective-c /dev/null',\n 'source.objc++' => 'g++ 2>&1 >/dev/null -E -v -x objective-c++ /dev/null',\n}\n\ndef compiler_search_path(domain = :system)\n scope = 'source.c'\n scope = $& if ENV['TM_SCOPE'] =~ /source.(obj)?c(\\+\\+)?/\n\n res = IO.popen(COMPILER[scope]) { |io| io.read }\n if res =~ /\#{USR_HEAD}(.*)\#{SYS_HEAD}(.*)\#{FOOTER}/m\n case domain\n when :system then $2\n when :user then $1 + \" .\\n\"\n when :all then $1 + \" .\\n\" + $2\n end.scan(/ (\\S*)(?: \\(framework directory\\)$)?/).flatten\n else\n abort \"Failed to parse compiler output.\\nCommand: \" + COMPILER[scope]\n end\nend\n\ndef user_search_path(domain = :system)\n usr = ENV['TM_USR_HEADER_PATH'].to_s\n sys = ENV['TM_SYS_HEADER_PATH'].to_s\n\n res = case domain\n when :system then sys\n when :user then usr\n when :all then \"\#{usr}:\#{sys}\"\n end.split(':')\n res.delete('')\n\n res.empty? ? nil : res\nend\n\ndef header\n if ENV.has_key? 'TM_SELECTED_TEXT'\n [:all, ENV['TM_SELECTED_TEXT']]\n elsif ENV['TM_CURRENT_LINE'] =~ /#\\s*(?:include|import)\\s*([<\"])(.*?)[\">]/;\n [$1 == '<' ? :system : :user, $2]\n else\n defaultText = %x{ __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 /usr/bin/pbpaste -pboard find }\n header = TextMate::UI.request_string :title => \"Quick Open\", :default => defaultText, :prompt => \"Which header file do you wish to open?\"\n [:all, header]\n end\nend\n\ndef find_in_dirs(file, dirs)\n framework = file.sub(/(.*)\\/(.*\\.h)/, '\\1.framework/Headers/\\2')\n base = ENV['TM_DIRECTORY'] || Dir.getwd\n dirs.each do |dir|\n dir = \"\#{base}/\#{dir}\" unless dir[0..0] == \"/\"\n return \"\#{dir}/\#{file}\" if File.exists? \"\#{dir}/\#{file}\"\n return \"\#{dir}/\#{framework}\" if File.exists? \"\#{dir}/\#{framework}\"\n end\n nil\nend\n\ndef find_recursively(header)\n hdr_match = /\\b\#{Regexp.escape(header.sub(/(\\.h)?$/, '.h'))}$/i\n matches = Dir[\"/System/Library/Frameworks/*.framework/{Frameworks/*.framework/,}Headers/*.h\"].find_all { |e| e =~ hdr_match }\n\n if matches.size > 1\n menu = matches.map do |e|\n header_name = $& if e =~ /[^\\/]+$/\n framework_suffix = e.scan(/\\/([^\\/]+?).framework/).flatten.join(' → ')\n { 'path' => e, 'title' => \"\#{header_name} — \#{framework_suffix}\" }\n end\n if res = TextMate::UI.menu(menu)\n res['path']\n else\n nil\n end\n else\n matches.first\n end\nend\n\ndomain, file = header()\nabort if file.nil?\n\ndirs = user_search_path(domain) || compiler_search_path(domain)\nif path = find_in_dirs(file, dirs)\n TextMate.go_to :file => path\nelsif domain == :all && path = find_recursively(file)\n TextMate.go_to :file => path\nelse\n abort \"Unable to find ‘\#{file}’\\nLocations searched:\\n\" + dirs.map { |dir| \" \#{dir}\" }.join(\"\\n\")\nend\n",
57
+ input: "none",
58
+ keyEquivalent: "@D",
59
+ name: "Quick Open",
60
+ output: "showAsTooltip",
61
+ scope: "source.c, source.objc, source.c++, source.objc++",
62
+ uuid: "FF0E22D6-7D78-11D9-B4DE-000A95A89C98"},
63
+ {autoScrollOutput: true,
64
+ beforeRunningCommand: "nop",
65
+ command:
66
+ "#!/usr/bin/env ruby\n\nrequire ENV[\"TM_SUPPORT_PATH\"] + \"/lib/tm/executor\"\nrequire ENV[\"TM_SUPPORT_PATH\"] + \"/lib/tm/save_current_document\"\n\nmode = ENV[\"TM_SCOPE\"].slice(/.*?\\bsource\\.((?:obj)?c(\\+\\+)?)/, 1)\n\n\ncase mode\nwhen \"c\"\n g = \"GCC\"\n env = \"C\"\n ext = \"c\"\n lang = \"c\"\nwhen \"c++\"\n g = \"GXX\"\n env = \"CXX\"\n ext = \"cc\"\n lang = \"c++\"\nwhen \"objc\"\n g = \"GCC\"\n env = \"OBJC\"\n ext = \"m\"\n lang = \"objective-c\"\nwhen \"objc++\"\n g = \"GXX\"\n env = \"OBJCXX\"\n ext = \"mm\"\n lang = \"objective-c++\"\nend\n\nTextMate.save_current_document(ext)\nTextMate::Executor.make_project_master_current_document\n\nflags = ENV[\"TM_\#{env}_FLAGS\"] || \"-Wall -include stdio.h \#{\"-include iostream\" unless mode[/c\\+\\+$/].nil?} \#{\"-framework Cocoa\" unless mode[/^obj/].nil?}\"\nargs = [ENV[\"TM_\#{g}\"] || g.downcase.gsub(\"x\", \"+\"), flags + \" -x \#{lang}\", ENV[\"TM_FILEPATH\"]] \n\nTextMate::Executor.run(args, :version_args => [\"--version\"], :version_regex => /\\A([^\\n]*) \\(GCC\\).*/m)\n",
67
+ input: "document",
68
+ keyEquivalent: "@r",
69
+ name: "Run",
70
+ output: "showAsHTML",
71
+ scope: "source.c, source.c++, source.objc, source.objc++",
72
+ uuid: "E823A373-FFD6-42F1-998F-7571A3553847"},
73
+ {beforeRunningCommand: "nop",
74
+ command:
75
+ "#!/usr/bin/env ruby\n\nprint case str = STDIN.read\n when /\\A\"(.*)\"\\z/m then \"<\" + $1 + \">\"\n when /\\A<(.*)>\\z/m then '\"' + $1 + '\"'\n else str\nend\n",
76
+ fallbackInput: "scope",
77
+ input: "selection",
78
+ keyEquivalent: "^\"",
79
+ name: "Toggle System/Local Include",
80
+ output: "replaceSelectedText",
81
+ scope: "string.quoted.double.include.c, string.quoted.other.lt-gt.include.c",
82
+ uuid: "E8D80809-0CDE-4E57-AC2A-8C22DFF353EE"}]
@@ -0,0 +1,32 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\n\nCOMMAND=`cat | tr -d ' \\t' | grep -m1 -o '^\\w\\+' | tr 'a-z' 'A-Z'`\n\nhtml_header \"Documentation for $COMMAND\"\n\"${TM_CMAKE:-cmake}\" --help-command \"$COMMAND\" | pre\nhtml_footer\n",
6
+ fallbackInput: "line",
7
+ input: "selection",
8
+ keyEquivalent: "^h",
9
+ name: "Documentation For Command",
10
+ output: "showAsHTML",
11
+ scope: "source.cmake meta.function-call, source.cmake",
12
+ uuid: "6AA1ED0A-6E0F-48EC-965C-D57AD98A100B"},
13
+ {beforeRunningCommand: "nop",
14
+ command:
15
+ "#!/usr/bin/env ruby\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/textmate'\n\nabort \"Unsaved file\" unless ENV['TM_FILEPATH']\n\npath = File.dirname(File.dirname(ENV['TM_FILEPATH'])) + \"/CMakeLists.txt\"\nabort \"No parent listfile\" unless File.exist?(path)\nTextMate.go_to(:file => path)\n\n# subdir = nil\n# \n# if line =~ /ADD_SUBDIRECTORY\\s*\\((.+?)\\)/i\n# subdir = $1\n# else\n# subdirs = Dir[dir + \"/*/CMakeLists.txt\"].map { |p| File.basename(File.dirname(p)) }.sort\n# abort \"No listfile found in subdirectories\" if subdirs.empty?\n# choice = TextMate::UI.menu(subdirs)\n# abort \"Cancelled\" unless choice\n# subdir = subdirs[choice]\n# end\n# \n# if subdir\n# file = subdir + \"/CMakeLists.txt\"\n# path = File.join(dir, file)\n# abort \"The file at \#{file} doesn't exist\" unless File.exist?(path)\n# TextMate.go_to(:file => path)\n# end\n",
16
+ fallbackInput: "line",
17
+ input: "none",
18
+ keyEquivalent: "~@",
19
+ name: "Move to Parent Listfile",
20
+ output: "showAsTooltip",
21
+ scope: "source.cmake",
22
+ uuid: "48A1D967-E8CF-4C16-A58F-60471E9469E3"},
23
+ {beforeRunningCommand: "nop",
24
+ command:
25
+ "#!/usr/bin/env ruby\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/textmate'\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/ui'\n\nabort \"Unsaved file\" unless ENV['TM_FILEPATH']\n\nline = STDIN.read\ndir = File.dirname(ENV['TM_FILEPATH'])\nsubdir = nil\n\nif line =~ /ADD_SUBDIRECTORY\\s*\\((.+?)\\)/i\n subdir = $1\nelse\n subdirs = Dir[dir + \"/*/CMakeLists.txt\"].map { |p| File.basename(File.dirname(p)) }.sort\n abort \"No listfile found in subdirectories\" if subdirs.empty?\n choice = TextMate::UI.menu(subdirs)\n abort \"Cancelled\" unless choice\n subdir = subdirs[choice]\nend\n\nif subdir\n file = subdir + \"/CMakeLists.txt\"\n path = File.join(dir, file)\n abort \"The file at \#{file} doesn't exist\" unless File.exist?(path)\n TextMate.go_to(:file => path)\nend\n",
26
+ fallbackInput: "line",
27
+ input: "selection",
28
+ keyEquivalent: "~@",
29
+ name: "Move to Subdirectory Listfile",
30
+ output: "showAsTooltip",
31
+ scope: "source.cmake",
32
+ uuid: "6F326FB4-8DC0-49BE-B74C-7B49CFA5283F"}]
@@ -0,0 +1,76 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ bundleUUID: "467B298F-6227-11D9-BFB1-000D93589AF6",
5
+ command:
6
+ "#!/usr/bin/env ruby\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/codecompletion\"\npreference = 'Completions'\nchoices = []\n\nparsed_choices = TextmateCompletionsParser.new(nil, :scope => :css).to_ary\nchoices += parsed_choices if parsed_choices\n\nchoices += ['--']\n\nplist_choices = TextmateCompletionsPlist.new( \"\#{ENV['TM_BUNDLE_PATH']}/Preferences/\#{preference}.tmPreferences\" ).to_ary\nchoices += plist_choices if plist_choices\n\nprint TextmateCodeCompletion.new(choices,STDIN.read, :scope => :css).to_snippet\n",
7
+ fallbackInput: "line",
8
+ input: "selection",
9
+ keyEquivalent: "~",
10
+ name: "CodeCompletion CSS",
11
+ output: "insertAsSnippet",
12
+ scope: "source.css -meta.property-list",
13
+ uuid: "E6FB4209-818E-40F5-9AFF-96E204F52A11"},
14
+ {beforeRunningCommand: "nop",
15
+ bundleUUID: "467B298F-6227-11D9-BFB1-000D93589AF6",
16
+ command:
17
+ "#!/usr/bin/env ruby\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/codecompletion\"\nTextmateCodeCompletion.plist('Property Completions')\n",
18
+ fallbackInput: "line",
19
+ input: "selection",
20
+ keyEquivalent: "~",
21
+ name: "CodeCompletion CSS Properties",
22
+ output: "insertAsSnippet",
23
+ scope:
24
+ "source.css meta.property-list -meta.property-value, source.css meta.property-value punctuation.separator.key-value",
25
+ uuid: "42E26C97-72AB-4953-807F-645AF7EDF59F"},
26
+ {beforeRunningCommand: "nop",
27
+ bundleUUID: "467B298F-6227-11D9-BFB1-000D93589AF6",
28
+ command:
29
+ "#!/usr/bin/env ruby\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/codecompletion\"\npreference = 'Property Value Completions'\nchoices = []\n\nparsed_choices = TextmateCompletionsParser.new(nil, :scope => :css_values).to_ary\nchoices += parsed_choices if parsed_choices\n\nchoices += ['--']\n\nplist_choices = TextmateCompletionsPlist.new( \"\#{ENV['TM_BUNDLE_PATH']}/Preferences/\#{preference}.tmPreferences\" ).to_ary\nchoices += plist_choices if plist_choices\n\nprint TextmateCodeCompletion.new(choices,STDIN.read).to_snippet\n",
30
+ fallbackInput: "line",
31
+ input: "selection",
32
+ keyEquivalent: "~",
33
+ name: "CodeCompletion CSS Property Values",
34
+ output: "insertAsSnippet",
35
+ scope: "source.css meta.property-value",
36
+ uuid: "35DFB6D6-E48B-4907-9030-019904DA0C5B"},
37
+ {beforeRunningCommand: "nop",
38
+ command:
39
+ "#!/usr/bin/env ruby\n#\n# Lookup current word as a CSS property on w3c.org\n#\n# The mapping below was generated using:\n# echo '$props = {'; curl -s http://www.w3.org/TR/CSS2/propidx.html|egrep \"(^|<tr><td>)<a href=\\\".*\\\" class=\\\"noxref\\\"><span class=\\\".*\\\">'.*'</span></a>\"|perl -pe \"s|(?:<tr><td>)?<a href=\\\"(.*)\\\" class=\\\"noxref\\\"><span class=\\\".*\\\">'(.*)'</span></a>|\\t\\\"\\$2\\\"\\t=> \\\"\\$1\\\",|\"; echo '}'\n\n$props = {\n\t\"azimuth\"\t=> \"aural.html#propdef-azimuth\",\n\t\"background\"\t=> \"colors.html#propdef-background\",\n\t\"background-attachment\"\t=> \"colors.html#propdef-background-attachment\",\n\t\"background-color\"\t=> \"colors.html#propdef-background-color\",\n\t\"background-image\"\t=> \"colors.html#propdef-background-image\",\n\t\"background-position\"\t=> \"colors.html#propdef-background-position\",\n\t\"background-repeat\"\t=> \"colors.html#propdef-background-repeat\",\n\t\"border\"\t=> \"box.html#propdef-border\",\n\t\"border-collapse\"\t=> \"tables.html#propdef-border-collapse\",\n\t\"border-color\"\t=> \"box.html#propdef-border-color\",\n\t\"border-spacing\"\t=> \"tables.html#propdef-border-spacing\",\n\t\"border-style\"\t=> \"box.html#propdef-border-style\",\n\t\"border-top\"\t=> \"box.html#propdef-border-top\",\n\t\"border-right\"\t=> \"box.html#propdef-border-right\",\n\t\"border-bottom\"\t=> \"box.html#propdef-border-bottom\",\n\t\"border-left\"\t=> \"box.html#propdef-border-left\",\n\t\"border-top-color\"\t=> \"box.html#propdef-border-top-color\",\n\t\"border-right-color\"\t=> \"box.html#propdef-border-right-color\",\n\t\"border-bottom-color\"\t=> \"box.html#propdef-border-bottom-color\",\n\t\"border-left-color\"\t=> \"box.html#propdef-border-left-color\",\n\t\"border-top-style\"\t=> \"box.html#propdef-border-top-style\",\n\t\"border-right-style\"\t=> \"box.html#propdef-border-right-style\",\n\t\"border-bottom-style\"\t=> \"box.html#propdef-border-bottom-style\",\n\t\"border-left-style\"\t=> \"box.html#propdef-border-left-style\",\n\t\"border-top-width\"\t=> \"box.html#propdef-border-top-width\",\n\t\"border-right-width\"\t=> \"box.html#propdef-border-right-width\",\n\t\"border-bottom-width\"\t=> \"box.html#propdef-border-bottom-width\",\n\t\"border-left-width\"\t=> \"box.html#propdef-border-left-width\",\n\t\"border-width\"\t=> \"box.html#propdef-border-width\",\n\t\"bottom\"\t=> \"visuren.html#propdef-bottom\",\n\t\"caption-side\"\t=> \"tables.html#propdef-caption-side\",\n\t\"clear\"\t=> \"visuren.html#propdef-clear\",\n\t\"clip\"\t=> \"visufx.html#propdef-clip\",\n\t\"color\"\t=> \"colors.html#propdef-color\",\n\t\"content\"\t=> \"generate.html#propdef-content\",\n\t\"counter-increment\"\t=> \"generate.html#propdef-counter-increment\",\n\t\"counter-reset\"\t=> \"generate.html#propdef-counter-reset\",\n\t\"cue\"\t=> \"aural.html#propdef-cue\",\n\t\"cue-after\"\t=> \"aural.html#propdef-cue-after\",\n\t\"cue-before\"\t=> \"aural.html#propdef-cue-before\",\n\t\"cursor\"\t=> \"ui.html#propdef-cursor\",\n\t\"direction\"\t=> \"visuren.html#propdef-direction\",\n\t\"display\"\t=> \"visuren.html#propdef-display\",\n\t\"elevation\"\t=> \"aural.html#propdef-elevation\",\n\t\"empty-cells\"\t=> \"tables.html#propdef-empty-cells\",\n\t\"float\"\t=> \"visuren.html#propdef-float\",\n\t\"font\"\t=> \"fonts.html#propdef-font\",\n\t\"font-family\"\t=> \"fonts.html#propdef-font-family\",\n\t\"font-size\"\t=> \"fonts.html#propdef-font-size\",\n\t\"font-size-adjust\"\t=> \"fonts.html#propdef-font-size-adjust\",\n\t\"font-stretch\"\t=> \"fonts.html#propdef-font-stretch\",\n\t\"font-style\"\t=> \"fonts.html#propdef-font-style\",\n\t\"font-variant\"\t=> \"fonts.html#propdef-font-variant\",\n\t\"font-weight\"\t=> \"fonts.html#propdef-font-weight\",\n\t\"height\"\t=> \"visudet.html#propdef-height\",\n\t\"left\"\t=> \"visuren.html#propdef-left\",\n\t\"letter-spacing\"\t=> \"text.html#propdef-letter-spacing\",\n\t\"line-height\"\t=> \"visudet.html#propdef-line-height\",\n\t\"list-style\"\t=> \"generate.html#propdef-list-style\",\n\t\"list-style-image\"\t=> \"generate.html#propdef-list-style-image\",\n\t\"list-style-position\"\t=> \"generate.html#propdef-list-style-position\",\n\t\"list-style-type\"\t=> \"generate.html#propdef-list-style-type\",\n\t\"margin\"\t=> \"box.html#propdef-margin\",\n\t\"margin-top\"\t=> \"box.html#propdef-margin-top\",\n\t\"margin-right\"\t=> \"box.html#propdef-margin-right\",\n\t\"margin-bottom\"\t=> \"box.html#propdef-margin-bottom\",\n\t\"margin-left\"\t=> \"box.html#propdef-margin-left\",\n\t\"marker-offset\"\t=> \"generate.html#propdef-marker-offset\",\n\t\"marks\"\t=> \"page.html#propdef-marks\",\n\t\"max-height\"\t=> \"visudet.html#propdef-max-height\",\n\t\"max-width\"\t=> \"visudet.html#propdef-max-width\",\n\t\"min-height\"\t=> \"visudet.html#propdef-min-height\",\n\t\"min-width\"\t=> \"visudet.html#propdef-min-width\",\n\t\"orphans\"\t=> \"page.html#propdef-orphans\",\n\t\"outline\"\t=> \"ui.html#propdef-outline\",\n\t\"outline-color\"\t=> \"ui.html#propdef-outline-color\",\n\t\"outline-style\"\t=> \"ui.html#propdef-outline-style\",\n\t\"outline-width\"\t=> \"ui.html#propdef-outline-width\",\n\t\"overflow\"\t=> \"visufx.html#propdef-overflow\",\n\t\"padding\"\t=> \"box.html#propdef-padding\",\n\t\"padding-top\"\t=> \"box.html#propdef-padding-top\",\n\t\"padding-right\"\t=> \"box.html#propdef-padding-right\",\n\t\"padding-bottom\"\t=> \"box.html#propdef-padding-bottom\",\n\t\"padding-left\"\t=> \"box.html#propdef-padding-left\",\n\t\"page\"\t=> \"page.html#propdef-page\",\n\t\"page-break-after\"\t=> \"page.html#propdef-page-break-after\",\n\t\"page-break-before\"\t=> \"page.html#propdef-page-break-before\",\n\t\"page-break-inside\"\t=> \"page.html#propdef-page-break-inside\",\n\t\"pause\"\t=> \"aural.html#propdef-pause\",\n\t\"pause-after\"\t=> \"aural.html#propdef-pause-after\",\n\t\"pause-before\"\t=> \"aural.html#propdef-pause-before\",\n\t\"pitch\"\t=> \"aural.html#propdef-pitch\",\n\t\"pitch-range\"\t=> \"aural.html#propdef-pitch-range\",\n\t\"play-during\"\t=> \"aural.html#propdef-play-during\",\n\t\"position\"\t=> \"visuren.html#propdef-position\",\n\t\"quotes\"\t=> \"generate.html#propdef-quotes\",\n\t\"richness\"\t=> \"aural.html#propdef-richness\",\n\t\"right\"\t=> \"visuren.html#propdef-right\",\n\t\"size\"\t=> \"page.html#propdef-size\",\n\t\"speak\"\t=> \"aural.html#propdef-speak\",\n\t\"speak-header\"\t=> \"tables.html#propdef-speak-header\",\n\t\"speak-numeral\"\t=> \"aural.html#propdef-speak-numeral\",\n\t\"speak-punctuation\"\t=> \"aural.html#propdef-speak-punctuation\",\n\t\"speech-rate\"\t=> \"aural.html#propdef-speech-rate\",\n\t\"stress\"\t=> \"aural.html#propdef-stress\",\n\t\"table-layout\"\t=> \"tables.html#propdef-table-layout\",\n\t\"text-align\"\t=> \"text.html#propdef-text-align\",\n\t\"text-decoration\"\t=> \"text.html#propdef-text-decoration\",\n\t\"text-indent\"\t=> \"text.html#propdef-text-indent\",\n\t\"text-shadow\"\t=> \"text.html#propdef-text-shadow\",\n\t\"text-transform\"\t=> \"text.html#propdef-text-transform\",\n\t\"top\"\t=> \"visuren.html#propdef-top\",\n\t\"unicode-bidi\"\t=> \"visuren.html#propdef-unicode-bidi\",\n\t\"vertical-align\"\t=> \"visudet.html#propdef-vertical-align\",\n\t\"visibility\"\t=> \"visufx.html#propdef-visibility\",\n\t\"voice-family\"\t=> \"aural.html#propdef-voice-family\",\n\t\"volume\"\t=> \"aural.html#propdef-volume\",\n\t\"white-space\"\t=> \"text.html#propdef-white-space\",\n\t\"widows\"\t=> \"page.html#propdef-widows\",\n\t\"width\"\t=> \"visudet.html#propdef-width\",\n\t\"word-spacing\"\t=> \"text.html#propdef-word-spacing\",\n\t\"z-index\"\t=> \"visuren.html#propdef-z-index\",\n}\n\ncur_line = ENV['TM_CURRENT_LINE']\ncur_word = ENV['TM_CURRENT_WORD']\n\n# since dash (‘-’) is not a word character, extend current word to neighboring word and dash characters\n$prop_name = /[-\\w]*\#{Regexp.escape cur_word}[-\\w]*/.match(cur_line)[0]\n\ndef request_prop_name\n s = `\\\"\#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog.app/Contents/MacOS/CocoaDialog\\\" inputbox --float --title 'Documentation for Property' --informative-text 'What property would you like to lookup?' --text '\#{$prop_name}' --button1 'Lookup' --button2 'Cancel' --button3 'Show All Properties'`\n case (a = s.split(\"\\n\"))[0].to_i\n when 1 then $props[a[1].to_s] || \"propidx.html\"\n when 2 then abort \"<script>window.close()</script>\"\n when 3 then \"propidx.html\"\n end\nend\n\nprop_url = $props[$prop_name] || request_prop_name\nurl = \"http://www.w3.org/TR/CSS2/\" + prop_url\nputs \"<meta http-equiv='Refresh' content='0;URL=\#{url}'>\"\n",
40
+ input: "none",
41
+ keyEquivalent: "^h",
42
+ name: "Documentation for Property",
43
+ output: "showAsHTML",
44
+ scope: "source.css",
45
+ uuid: "50AA6E95-A754-4EBC-9C2A-68418C70D689"},
46
+ {beforeRunningCommand: "nop",
47
+ command:
48
+ "#!/usr/bin/env ruby\n\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/ui\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/exit_codes\"\ncolour = STDIN.read\n\n# http://www.w3schools.com/css/css_colornames.asp\nCOLOURS = {\n 'aliceblue' => 'F0F8FF',\n 'antiquewhite' => 'FAEBD7',\n 'aqua' => '00FFFF',\n 'aquamarine' => '7FFFD4',\n 'azure' => 'F0FFFF',\n 'beige' => 'F5F5DC',\n 'bisque' => 'FFE4C4',\n 'black' => '000000',\n 'blanchedalmond' => 'FFEBCD',\n 'blue' => '0000FF',\n 'blueviolet' => '8A2BE2',\n 'brown' => 'A52A2A',\n 'burlywood' => 'DEB887',\n 'cadetblue' => '5F9EA0',\n 'chartreuse' => '7FFF00',\n 'chocolate' => 'D2691E',\n 'coral' => 'FF7F50',\n 'cornflowerblue' => '6495ED',\n 'cornsilk' => 'FFF8DC',\n 'crimson' => 'DC143C',\n 'cyan' => '00FFFF',\n 'darkblue' => '00008B',\n 'darkcyan' => '008B8B',\n 'darkgoldenrod' => 'B8860B',\n 'darkgray' => 'A9A9A9',\n 'darkgrey' => 'A9A9A9',\n 'darkgreen' => '006400',\n 'darkkhaki' => 'BDB76B',\n 'darkmagenta' => '8B008B',\n 'darkolivegreen' => '556B2F',\n 'darkorange' => 'FF8C00',\n 'darkorchid' => '9932CC',\n 'darkred' => '8B0000',\n 'darksalmon' => 'E9967A',\n 'darkseagreen' => '8FBC8F',\n 'darkslateblue' => '483D8B',\n 'darkslategray' => '2F4F4F',\n 'darkslategrey' => '2F4F4F',\n 'darkturquoise' => '00CED1',\n 'darkviolet' => '9400D3',\n 'deeppink' => 'FF1493',\n 'deepskyblue' => '00BFFF',\n 'dimgray' => '696969',\n 'dimgrey' => '696969',\n 'dodgerblue' => '1E90FF',\n 'firebrick' => 'B22222',\n 'floralwhite' => 'FFFAF0',\n 'forestgreen' => '228B22',\n 'fuchsia' => 'FF00FF',\n 'gainsboro' => 'DCDCDC',\n 'ghostwhite' => 'F8F8FF',\n 'gold' => 'FFD700',\n 'goldenrod' => 'DAA520',\n 'gray' => '808080',\n 'grey' => '808080',\n 'green' => '008000',\n 'greenyellow' => 'ADFF2F',\n 'honeydew' => 'F0FFF0',\n 'hotpink' => 'FF69B4',\n 'indianred' => 'CD5C5C',\n 'indigo' => '4B0082',\n 'ivory' => 'FFFFF0',\n 'khaki' => 'F0E68C',\n 'lavender' => 'E6E6FA',\n 'lavenderblush' => 'FFF0F5',\n 'lawngreen' => '7CFC00',\n 'lemonchiffon' => 'FFFACD',\n 'lightblue' => 'ADD8E6',\n 'lightcoral' => 'F08080',\n 'lightcyan' => 'E0FFFF',\n 'lightgoldenrodyellow' => 'FAFAD2',\n 'lightgray' => 'D3D3D3',\n 'lightgrey' => 'D3D3D3',\n 'lightgreen' => '90EE90',\n 'lightpink' => 'FFB6C1',\n 'lightsalmon' => 'FFA07A',\n 'lightseagreen' => '20B2AA',\n 'lightskyblue' => '87CEFA',\n 'lightslategray' => '778899',\n 'lightslategrey' => '778899',\n 'lightsteelblue' => 'B0C4DE',\n 'lightyellow' => 'FFFFE0',\n 'lime' => '00FF00',\n 'limegreen' => '32CD32',\n 'linen' => 'FAF0E6',\n 'magenta' => 'FF00FF',\n 'maroon' => '800000',\n 'mediumaquamarine' => '66CDAA',\n 'mediumblue' => '0000CD',\n 'mediumorchid' => 'BA55D3',\n 'mediumpurple' => '9370D8',\n 'mediumseagreen' => '3CB371',\n 'mediumslateblue' => '7B68EE',\n 'mediumspringgreen' => '00FA9A',\n 'mediumturquoise' => '48D1CC',\n 'mediumvioletred' => 'C71585',\n 'midnightblue' => '191970',\n 'mintcream' => 'F5FFFA',\n 'mistyrose' => 'FFE4E1',\n 'moccasin' => 'FFE4B5',\n 'navajowhite' => 'FFDEAD',\n 'navy' => '000080',\n 'oldlace' => 'FDF5E6',\n 'olive' => '808000',\n 'olivedrab' => '6B8E23',\n 'orange' => 'FFA500',\n 'orangered' => 'FF4500',\n 'orchid' => 'DA70D6',\n 'palegoldenrod' => 'EEE8AA',\n 'palegreen' => '98FB98',\n 'paleturquoise' => 'AFEEEE',\n 'palevioletred' => 'D87093',\n 'papayawhip' => 'FFEFD5',\n 'peachpuff' => 'FFDAB9',\n 'peru' => 'CD853F',\n 'pink' => 'FFC0CB',\n 'plum' => 'DDA0DD',\n 'powderblue' => 'B0E0E6',\n 'purple' => '800080',\n 'red' => 'FF0000',\n 'rosybrown' => 'BC8F8F',\n 'royalblue' => '4169E1',\n 'saddlebrown' => '8B4513',\n 'salmon' => 'FA8072',\n 'sandybrown' => 'F4A460',\n 'seagreen' => '2E8B57',\n 'seashell' => 'FFF5EE',\n 'sienna' => 'A0522D',\n 'silver' => 'C0C0C0',\n 'skyblue' => '87CEEB',\n 'slateblue' => '6A5ACD',\n 'slategray' => '708090',\n 'slategrey' => '708090',\n 'snow' => 'FFFAFA',\n 'springgreen' => '00FF7F',\n 'steelblue' => '4682B4',\n 'tan' => 'D2B48C',\n 'teal' => '008080',\n 'thistle' => 'D8BFD8',\n 'tomato' => 'FF6347',\n 'turquoise' => '40E0D0',\n 'violet' => 'EE82EE',\n 'wheat' => 'F5DEB3',\n 'white' => 'FFFFFF',\n 'whitesmoke' => 'F5F5F5',\n 'yellow' => 'FFFF00',\n 'yellowgreen' => '9ACD32',\n}\n\nif colour.length > 0 and colour[0] != ?#\n colour.downcase!\n # Convert named colours to their hex values\n colour = '#' + COLOURS[colour] if COLOURS.has_key? colour\nend\n\nif res = TextMate::UI.request_color(colour)\n print res\nelse\n TextMate.exit_discard\nend\n",
49
+ fallbackInput: "word",
50
+ input: "selection",
51
+ keyEquivalent: "@C",
52
+ name: "Insert Color…",
53
+ output: "replaceSelectedText",
54
+ scope: "source.css, meta.tag string.quoted -source",
55
+ uuid: "CC30D708-6E49-11D9-B411-000D93589AF6"},
56
+ {beforeRunningCommand: "nop",
57
+ command:
58
+ "#!/usr/bin/env ruby\n\nLIPSUM = \"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\"\n\ndef tag_preview(selector_list)\n\thtml = 'TEXT_INSERT'\n\tselectors = selector_list.split(/\\s+/)\n\tlast_tag = ''\n\ttext_insert = \"Generated preview for CSS selector \#{selector_list}.\"\n\n\tstar_class = ''\n\tstar_id = ''\n\thtml_class = ''\n\thtml_id = ''\n\tbody_class = ''\n\tbody_id = ''\n\n\tselectors.reverse.each do | selector |\n\t\tsinglet = false\n\t\ttag = selector.clone\n\t\tif (tag =~ /#(.+)/)\n\t\t\tid = (tag.scan(/#(.+)/))[0][0]\n\t\t\tid.gsub!(/\\..+/, '')\n\t\telse\n\t\t\tid = nil\n\t\tend\n\t\tif (tag =~ /\\.(.+)/)\n\t\t\tcls = (tag.scan(/\\.(.+)/))[0][0]\n\t\t\tcls.gsub!(/\\./, ' ')\n\t\t\tcls.gsub!(/\\#.+/, '')\n\t\telse\n\t\t\tcls = nil\n\t\tend\n\n\t\ttag.downcase!\n\t\ttag.sub!(/#(.+)/, '');\n\t\ttag.sub!(/\\.(.+)/, '');\n\t\ttag.sub!(/:.+/, '')\n\n\t\tcase tag\n\t\twhen '*'\n\t\t\tstar_class = \" \#{cls}\" if cls\n\t\t\tstar_id = \" id=\\\"\#{id}\\\"\" if id\n\t\t\tcls = nil\n\t\t\tid = nil\n\t\t\ttag = 'div'\n\t\twhen 'body'\n\t\t\tbody_class = \" \#{cls}\" if cls\n\t\t\tbody_id = \" id=\\\"\#{id}\\\"\" if id\n\t\t\tcls = nil\n\t\t\tid = nil\n\t\t\ttag = 'div'\n\t\twhen 'html'\n\t\t\thtml_class = \" \#{cls}\" if cls\n\t\t\thtml_id = \" id=\\\"\#{id}\\\"\" if id\n\t\t\tcls = nil\n\t\t\tid = nil\n\t\t\ttag = 'div'\n\t\tend\n\n\t\tnext if tag == '+'\n\n\t\tif selector =~ /^[#.]/\n\t\t\tcase last_tag\n\t\t\twhen 'li'\n\t\t\t\ttag = 'ul'\n\t\t\twhen 'td'\n\t\t\t\ttag = 'tr'\n\t\t\twhen 'tr'\n\t\t\t\ttag = 'table'\n\t\t\twhen /^h\\d/\n\t\t\t\ttag = 'div'\n\t\t\telse\n\t\t\t\ttag = 'span'\n\t\t\tend\n\t\tend\n\n\t\tif (tag =~ /\\[(.+?)\\]/)\n\t\t\ttag_attr = (tag.scan(/\\[(.+?)\\]/))[0][0]\n\t\t\ttag.gsub!(/\\[.+?\\]/, '')\n\t\telse\n\t\t\ttag_attr = nil\n\t\tend\n\t\tpart = \"<\" + tag\n\t\tpart += \" \#{tag_attr}\" if tag_attr\n\t\tpart += \" id=\\\"\#{id}\\\"\" if id\n\t\tpart += \" class=\\\"\#{cls}\\\"\" if cls\n\n\t\t# defaults for img tag\n\t\tcase tag\n\t\twhen 'img'\n\t\t\tpart += \" src=\\\"http://www.google.com/intl/en/images/logo.gif\\\"\"\n\t\t\tpart += \" alt=\\\"Preview of \#{selector_list}\\\"\"\n\t\t\tsinglet = true\n\t\twhen 'a'\n\t\t\tpart += \" href=\\\"\\#\\\"\"\n\t\twhen 'input'\n\t\t\topen_tag = part.clone\n\t\t\tpart += \" type=\\\"radio\\\" /> Radio\"\n\t\t\tpart += \"\#{open_tag} type=\\\"checkbox\\\" /> Checkbox<br />\"\n\t\t\tpart += \"\#{open_tag} type=\\\"text\\\" value=\\\"Text Field\\\" />\"\n\t\t\tpart += \"\#{open_tag} type=\\\"button\\\" value=\\\"Button\\\"\"\n\t\t\tsinglet = true\n\t\twhen 'select'\n\t\t\tpart += \"><option>Option 1</option><option>Option 2</option\"\n\t\t\thtml = ''\n\t\tend\n\n\t\tif (singlet)\n\t\t\tpart += \" />\"\n\t\telse\n\t\t\tpart += \">\"\n\t\t\tpart += html\n\t\t\tpart += \"</\" + tag + \">\"\n\t\tend\n\n\t\tcase tag\n\t\twhen /^h\\d/\n\t\t\ttext_insert = tag.sub(/^h(\\d+)/, \"Heading \\\\1\")\n\t\twhen 'p'\n\t\t\ttext_insert = LIPSUM\n\t\twhen 'object', 'img', 'input'\n\t\t\ttext_insert = \"\"\n\t\tend\n\n\t\thtml = part\n\t\tlast_tag = tag\n\tend\n\n\tif (last_tag)\n\t\tcase last_tag\n\t\twhen 'em', 'strong', 'b', 'i'\n\t\t\thtml = \"<p>\#{html}</p>\"\n\t\twhen 'li'\n\t\t\thtml = \"<ul>\#{html}</ul>\"\n\t\twhen 'td'\n\t\t\thtml = \"<table><tr>\#{html}</tr></table>\"\n\t\twhen 'tr'\n\t\t\thtml = \"<table>\#{html}</table>\"\n\t\twhen 'input', 'textarea', 'select'\n\t\t\thtml = \"<form method=\\\"get\\\">\#{html}</form>\"\n\t\tend\n\tend\n\n\thtml = \"<div>\#{html}</div>\"\n\thtml.sub!(/TEXT_INSERT/, text_insert)\n\n\treturn <<EOT\n<div class=\"__wrap_wrap\"><div class=\"__star_wrap\#{star_class}\"\#{star_id}><div class=\"__html_wrap\#{html_class}\"\#{html_id}><div class=\"__body_wrap\#{body_class}\"\#{body_id}>\#{html}</div></div></div></div>\nEOT\nend\n\ndef preview_css(str)\n\torig_css = str.clone\n\torig_css.gsub!(/<entity\\.name\\.tag\\.wildcard\\.css>\\*<\\/entity\\.name\\.tag\\.wildcard\\.css>/, '.__star_wrap')\n\torig_css.gsub!(/<entity\\.name\\.tag\\.css>body<\\/entity\\.name\\.tag\\.css>/, '.__body_wrap')\n\torig_css.gsub!(/<entity\\.name\\.tag\\.css>html<\\/entity\\.name\\.tag\\.css>/, '.__html_wrap')\n\n\torig_css.gsub!(/<.+?>/, '')\n\torig_css.gsub!(/&lt;\\/?style\\b.*?&gt;/m, '')\n\torig_css.strip!\n\n\t#meta.selector.css -> wraps the selector\n\t#meta.property-list.css -> wraps the properties\n\trules = str.scan(/<meta\\.selector\\.css>\\s*(.+?)\\s*<\\/meta\\.selector\\.css>.*?<meta\\.property-list\\.css>(.+?)<\\/meta\\.property-list\\.css>/m)\n\n\thtml = ''\n\tcss = ''\n\trule_num = 0\n\n\trules.each do | rule |\n\t\tselector = rule[0].gsub(/<.+?>/, '')\n\t\tstyles = rule[1].gsub(/<.+?>/, '')\n\t\tstyles.gsub!(/^\\s*\\{\\n*/m, '')\n\t\tstyles.gsub!(/\\s*\\}\\s*$/m, '')\n\t\tstyles.gsub!(/\\t/, ' ' * ENV['TM_TAB_SIZE'].to_i)\n\t\tselectors = selector.split(/\\s*,\\s*/m)\n\t\tselectors.each do | single_selector |\n\t\t\trule_num += 1\n\t\t\thtml += \"<div class=\\\"__rule_clear\\\"></div>\\n\\n\" if html != ''\n\t\t\thtml += \"<div class=\\\"__rule_selector\\\">\#{single_selector} <a class=\\\"__view_link\\\" href=\\\"javascript:viewCSS('__rule\#{rule_num}')\\\" title=\\\"Click to toggle CSS view\\\">CSS</a><div class=\\\"__rule\\\" id=\\\"__rule\#{rule_num}\\\" style=\\\"display: none\\\">\#{styles}</div></div>\\n\\n\"\n\t\t\thtml += tag_preview(single_selector) + \"\\n\\n\"\n\t\tend\n\tend\n\n\tfilename = ENV['TM_FILENAME'] || 'untitled'\n\tbase = ''\n\tbase = \"<base href=\\\"file://\#{ENV['TM_FILEPATH']}\\\" />\" if ENV['TM_FILEPATH']\n\n\treturn <<EOT\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n\t<head>\n\t\t\#{base}\n\t\t<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\n\t\t<meta http-equiv=\"Content-Language\" content=\"en-us\" />\n\t\t<title>CSS Preview for \#{filename}</title>\n\t\t<style type=\"text/css\">\n\#{orig_css}\n.__wrap_wrap {\n\tposition: relative;\n\tmargin-top: 5px;\n\tmargin-bottom: 20px;\n\tborder-top: 1px solid #ccc;\n}\n.__rule_selector {\n\tfont-family: Times;\n\tfont-size: 16px;\n\tborder-top: 1px solid #ccc;\n}\n.__rule {\n\twhite-space: pre;\n\tword-wrap: break-word;\n\tfont-family: Monaco;\n\tfont-size: 11px;\n}\n.__view_link {\n\tfont-family: Monaco;\n\tfont-size: 11px;\n}\n.__rule_clear:after {\n\tcontent: \".\"; \n\tdisplay: block; \n\theight: 0; \n\tclear: both; \n\tvisibility: hidden;\n}\n\t\t</style>\n\t\t<script type=\"text/javascript\">\n\t\tfunction viewCSS(rule_id) {\n\t\t\tvar el = document.getElementById(rule_id);\n\t\t\tif (el) {\n\t\t\t\tif (el.style.display == 'none')\n\t\t\t\t\tel.style.display = 'block';\n\t\t\t\telse\n\t\t\t\t\tel.style.display = 'none';\n\t\t\t}\n\t\t}\n\t\t</script>\n\t</head>\n\t\n\t<body>\n\#{html}\n\t</body>\n</html>\nEOT\nend\n\nprint preview_css(STDIN.read)\n",
59
+ fallbackInput: "scope",
60
+ input: "selection",
61
+ inputFormat: "xml",
62
+ keyEquivalent: "^~@p",
63
+ name: "Preview",
64
+ output: "showAsHTML",
65
+ scope: "source.css - text.html",
66
+ uuid: "05554FE0-4A70-4F3E-81C5-72855D7EB428"},
67
+ {beforeRunningCommand: "nop",
68
+ command:
69
+ "#!/usr/bin/env ruby\n\nprint '<html><head><meta http-equiv=\"Refresh\" content=\"0; URL='\nprint 'http://jigsaw.w3.org/css-validator/validator?warning=1&profile=none&usermedium=all&text='\n\nscope = STDIN.read\n\nscope.gsub!(/<\\/?style.*?>/, '')\n\n((scope != nil && scope.size > 0) ? scope : $< ).each_byte do |b|\n\n if b == 32\n print '+'\n elsif b.chr =~ /\\w/\n print b.chr\n else\n printf '%%%02x', b\n end\nend\n\nputs '#errors\"></head><body></body></html>'",
70
+ fallbackInput: "scope",
71
+ input: "selection",
72
+ keyEquivalent: "^V",
73
+ name: "Validate CSS",
74
+ output: "showAsHTML",
75
+ scope: "source.css",
76
+ uuid: "45E5E5A1-84CC-11D9-970D-0011242E4184"}]
@@ -0,0 +1,29 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "# just to remind you of some useful environment variables\n# see Help / Environment Variables for the full list\n#echo File: \"$TM_FILEPATH\"\n#echo Word: \"$TM_CURRENT_WORD\"\n#echo Selection: \"$TM_SELECTED_TEXT\"\n\nexec \"$TM_BUNDLE_SUPPORT/bin/tmctags\"\n",
6
+ input: "none",
7
+ keyEquivalent: "^]",
8
+ name: "Find Tags",
9
+ output: "showAsHTML",
10
+ scope: "source",
11
+ uuid: "4E4A0404-8560-483A-B975-E53F6A6B7E25"},
12
+ {beforeRunningCommand: "nop",
13
+ bundleUUID: "0D39D7BD-CD02-48EF-BB9C-2210BFFC5AD7",
14
+ command:
15
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"CTags Help\" \"CTags\"\nMarkdown.pl <<'EOF'|SmartyPants.pl\n\nCTags.tmbundle\n---------------\n\nThe CTags bundle allows you to quickly look up function definitions, variables etc. It uses the [Exuberant CTags][1] program freely available under the terms of the [GNU General Public License][2] to generate a list of definitions, and presents any match for the current word when invoked.\n\nUsage\n-----\n\nWith the cursor over a word for which you want to see the definition, select *CTags/Find Tags* or press the assigned shortcut. A window will show up listing all locations where the term was defined, as well as your current location so you can easily find your way back. If only one location is found, TextMate will jump there (this behavior can be changed with the *TmCtagsAutoJump* environment variable, see below).\n\nIf you modify the source code, the definition list will become out of sync with your code. Invoke *CTags/Update Tags* to update it.\n\n**Note:** The definitions are stored in a file named *tmtags* in your project root directory. It is safe to delete this file when no longer needed. The bundle will recreate it on the fly whenever needed.\n\nTo exclude certain files or directories (eg source control files), add the appropiate options to the `.ctags` file in your home directory. An example:\n\n\t--exclude=*~\n\t--exclude=\\._*\n\t--exclude=*\\.bak\n\t--exclude=\\.svn\n\t--exclude=_darcs\n\nPlease see the ctags man page or the [Exuberant CTags][1] documentation for more info.\n\n\nConfiguration\n-------------\n\nThe CTags bundle can be configured by adding environment variables, either to a project to only change the behavior within a project, or globally (TextMate/Preferences/Advanced/Shell Variables). The following variables are honored:\n\n* TmCtagsAutoJump\n\nSet this variable to 0 to avoid TextMate jumping when a unique definition is found. Default value: *1*.\n\n* TmCtagsTagFileName\n\nThe file name used to store tags in. Default is *tmtags*.\n\n* TM\\_TAGS\\_FILE\n\nFor backward-compatibility with the *Lookup Definition (ctags)* command from the Source bundle. Only makes sense inside a project. If set must contain the full path and filename for the tags file ctags will use. The path also is the root from which ctags does its work (although additional directories can be added).\n\n* TmCtagsFlags\n\nAny additional flags or options the ctags program should honor.\n\n* TmCtagsTimeout\n\nThe timeout in seconds after which ctags is considered hanging (there are some bugs in ctags) and it is killed. Default is 30 seconds. For really large projects that may need to be increased.\n\n* TmCtagsSoundDir\n\nDirectory in which sound files are expected. Default is *'/System/Library/Sounds'*.\n\n* TmCtagsOkSingleSound\n\nThe name for the sound file played when a unique definition is found. If the extension is *.aiff* it can be omitted. Set to empty string for no sound. Default is an empty string.\n\n* TmCtagsOkMultiSound\n\nThe name for the sound file played when multiple definitions are found. If the extension is *.aiff* it can be omitted. Set to empty string for no sound. Default is *Frog*.\n\n* TmCtagsErrorSound\n\nThe name for the sound file played when no definitions are found. If the extension is *.aiff* it can be omitted. Set to empty string for no sound. Default is *Sosumi*.\n\n* TM\\_CTAGS\\_ADDITIONAL\\_DIRECTORIES\n\nAdditional directories for CTags to process for tags. Directories should be seperated by the colon character (\":\").\n\nCredits\n-------\n\nThis bundle is maintained by [Gerd Knops][3].\n\nFeedback is welcome: gerti-ctagstmb@bitart.com\n\n[1]: http://ctags.sourceforge.net/\n[2]: http://www.gnu.org/copyleft/gpl.html\n[3]: http://gerd.knops.com/\n\nEOF\nhtml_footer",
16
+ input: "none",
17
+ name: "Help",
18
+ output: "showAsHTML",
19
+ scope: "source",
20
+ uuid: "CF06E855-A45F-4AC0-A5F3-D9A99B2D7059"},
21
+ {beforeRunningCommand: "nop",
22
+ command:
23
+ "# just to remind you of some useful environment variables\n# see Help / Environment Variables for the full list\n#echo File: \"$TM_FILEPATH\"\n#echo Word: \"$TM_CURRENT_WORD\"\n#echo Selection: \"$TM_SELECTED_TEXT\"\n\nexec \"$TM_BUNDLE_SUPPORT/bin/tmctags\" update\n",
24
+ input: "none",
25
+ keyEquivalent: "^~]",
26
+ name: "Update Tags",
27
+ output: "showAsTooltip",
28
+ scope: "source",
29
+ uuid: "F82D2DF8-6914-4EEC-BA46-F1E4B1716108"}]
@@ -0,0 +1,114 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" -r \"$TM_SUPPORT_PATH/lib/shelltokenize.rb\" <<END\n cvs = ENV['TM_CVS'] || \"cvs\"\n TextMate.selected_paths_array.each do |path|\n puts %x{cd \"\#{File.dirname path}\" && \#{cvs} add \"\#{File.basename path}\"}\n end\nEND",
6
+ input: "none",
7
+ keyEquivalent: "^Z",
8
+ name: "Add to Repository",
9
+ output: "showAsTooltip",
10
+ uuid: "ADCD4FCD-D39D-41B3-88D0-84C5BE115535"},
11
+ {beforeRunningCommand: "nop",
12
+ command:
13
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\ncd \"$TM_DIRECTORY\" &&\n\"$TM_CVS\" annotate \"$TM_FILENAME\"",
14
+ input: "none",
15
+ keyEquivalent: "^Z",
16
+ name: "Annotate",
17
+ output: "openAsNewDocument",
18
+ uuid: "338A3670-DA8E-4036-87E0-DF2E212254C8"},
19
+ {beforeRunningCommand: "nop",
20
+ command:
21
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'versioned_file'\nrequire 'diff'\n\nfile = CVS::VersionedFile.new(ENV['TM_FILEPATH'])\nannotation = file.cvs(:annotate)\ndiff = CVS::Diff.new(file.diff(:head))\n\nn = diff.source_line(ENV['TM_LINE_NUMBER'].to_i-1)\ncase n\nwhen Symbol then puts \"\#{n} locally\"\nelse puts annotation.split(/\\n/)[n]\nend\n\nEND\n",
22
+ input: "none",
23
+ keyEquivalent: "^Z",
24
+ name: "Annotate Line",
25
+ output: "showAsTooltip",
26
+ uuid: "76E34DE2-1DCB-47B8-BA2F-4F3341A3AB9C"},
27
+ {beforeRunningCommand: "nop",
28
+ command:
29
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\ncd \"$TM_DIRECTORY\"\nrevs=$(\"$TM_CVS\" log \"$TM_FILENAME\"|grep '^revision' \\\n\t2> >(CocoaDialog progressbar --indeterminate \\\n\t\t--title \"Check out Revision…\" \\\n\t\t--text \"Retrieving List of Revisions…\" \\\n\t))\n\nrevs=$(echo $revs|sed 's/revision //g')\n\nrevs=`osascript<<END\n\tset AppleScript's text item delimiters to {\" \"}\n\ttell app \"SystemUIServer\"\n\t\tactivate\n\t\tset ourList to (every text item of \"$revs\")\n\t\tif the count of items in ourList is 0 then\n\t\t\tdisplay dialog \"No older revisions of file '$(basename \"$TM_FILEPATH\")' found\" buttons (\"OK\")\n\t\t\tset the result to false\n\t\telse\n\t\t\tchoose from list ourList with prompt \"Check out an older revision of '$(basename \"$TM_FILEPATH\")':\"\n\t\tend if\n\tend tell\nEND`\n\n# exit if user canceled\nif [[ $revs = \"false\" ]]; then\n\texit_discard\nfi\n\nexport REVS=\"$revs\"\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'versioned_file'\n\nprint CVS::VersionedFile.version(ENV['TM_FILEPATH'], ENV['REVS'])\nEND",
30
+ input: "none",
31
+ keyEquivalent: "^Z",
32
+ name: "Check out Revision...",
33
+ output: "replaceDocument",
34
+ uuid: "2C5DB599-04DC-40CC-BBE8-0A73620BC42A"},
35
+ {beforeRunningCommand: "nop",
36
+ command:
37
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nexport TM_CVS\nexport CommitWindow=\"$TM_SUPPORT_PATH/bin/CommitWindow.app/Contents/MacOS/CommitWindow\"\n\ncd \"${TM_PROJECT_DIRECTORY:-$TM_DIRECTORY}\"\n\"${TM_RUBY:-ruby}\" -- \"${TM_BUNDLE_SUPPORT}/cvs_commit.rb\"",
38
+ input: "none",
39
+ keyEquivalent: "^Z",
40
+ name: "Commit...",
41
+ output: "showAsHTML",
42
+ uuid: "BE6728A5-AFC4-4D98-9EC7-C2E951483B71"},
43
+ {beforeRunningCommand: "nop",
44
+ command:
45
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'cvs_diff'\n\nCVS::diff_active_file(:head, \"Diff With Newest\")\nEND\n",
46
+ input: "none",
47
+ keyEquivalent: "^Z",
48
+ name: "Diff With Newest (HEAD)",
49
+ output: "openAsNewDocument",
50
+ uuid: "22FC4CAB-4664-4CFC-BC8E-C2294616E464"},
51
+ {beforeRunningCommand: "nop",
52
+ command:
53
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'cvs_diff'\n\nCVS::diff_active_file(:prev, \"Diff With Previous Revision\")\nEND\n",
54
+ input: "none",
55
+ keyEquivalent: "^Z",
56
+ name: "Diff With Previous Revision (PREV)",
57
+ output: "openAsNewDocument",
58
+ uuid: "E29C9E3B-B7FB-4ED1-94C3-2F702CD090B5"},
59
+ {beforeRunningCommand: "nop",
60
+ command:
61
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\ncd \"$TM_DIRECTORY\"\nrevs=$(\"$TM_CVS\" log \"$TM_FILENAME\"|grep '^revision' \\\n\t2> >(CocoaDialog progressbar --indeterminate \\\n\t\t--title \"Diff Revision…\" \\\n\t\t--text \"Retrieving List of Revisions…\" \\\n\t))\n\nrevs=$(echo $revs|sed 's/revision //g')\n\nrevs=`osascript<<END\n\tset AppleScript's text item delimiters to {\" \"}\n\ttell app \"SystemUIServer\"\n\t\tactivate\n\t\tset ourList to (every text item of \"$revs\")\n\t\tif the count of items in ourList is 0 then\n\t\t\tdisplay dialog \"No older revisions of file '$(basename \"$TM_FILEPATH\")' found\" buttons (\"OK\")\n\t\t\tset the result to false\n\t\telse\n\t\t\tchoose from list ourList with prompt \"Diff '$(basename \"$TM_FILEPATH\")' with older revision:\"\n\t\tend if\n\tend tell\nEND`\n\n# exit if user canceled\nif [[ $revs = \"false\" ]]; then\n\tosascript -e 'tell app \"TextMate\" to activate' &>/dev/null &\texit_discard\nfi\n\nexport REVS=\"$revs\"\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'cvs_diff'\n\nCVS::diff_active_file(ENV['REVS'], \"Diff With Revision...\")\nEND",
62
+ input: "none",
63
+ keyEquivalent: "^Z",
64
+ name: "Diff With Revision...",
65
+ output: "openAsNewDocument",
66
+ uuid: "6416A49F-8B3E-47EE-81B4-F2F7F19C6B41"},
67
+ {beforeRunningCommand: "nop",
68
+ command:
69
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'cvs_diff'\n\nCVS::diff_active_file(:base, \"Diff With Working Copy\")\nEND\n",
70
+ input: "none",
71
+ keyEquivalent: "^Z",
72
+ name: "Diff With Working Copy (BASE)",
73
+ output: "openAsNewDocument",
74
+ uuid: "00C541DE-9A5C-4C59-A075-E754BAEB25C2"},
75
+ {beforeRunningCommand: "nop",
76
+ command:
77
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\ncd \"$TM_DIRECTORY\" &&\n\"$TM_CVS\" log \"$TM_FILENAME\"",
78
+ input: "none",
79
+ keyEquivalent: "^Z",
80
+ name: "Log",
81
+ output: "openAsNewDocument",
82
+ uuid: "9EA691A5-A166-4D8F-955F-270490F02827"},
83
+ {beforeRunningCommand: "nop",
84
+ command:
85
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'versioned_file'\n\ntag=`CocoaDialog inputbox --title Merge --informative-text 'Which tag?' --button1 Update --button2 'Cancel'`\n\naccept, tag = *tag.to_a.map {|l| l.chomp}\n\nexit unless accept =~ /1/\n\nfile = CVS::VersionedFile.new(ENV['TM_FILEPATH'])\nfile.update(:tag => tag, :sticky => false)\n\nputs \"Merged \#{file.basename} from \#{tag}.\"\n\nEND\n",
86
+ input: "none",
87
+ keyEquivalent: "^Z",
88
+ name: "Merge from tag...",
89
+ output: "discard",
90
+ uuid: "473C6519-F164-4496-A699-F9DE2CAB56DD"},
91
+ {beforeRunningCommand: "nop",
92
+ command:
93
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'versioned_file'\n\nfile = CVS::VersionedFile.new(ENV['TM_FILEPATH'])\nfile.update(:reset_tags => true)\n\nputs \"All sticky tags reset\"\n\nEND\n",
94
+ input: "none",
95
+ keyEquivalent: "^Z",
96
+ name: "Reset sticky tags",
97
+ output: "showAsTooltip",
98
+ uuid: "1FE7E10E-70B4-44D7-924D-879C54F19289"},
99
+ {beforeRunningCommand: "nop",
100
+ command:
101
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nrm \"$TM_FILEPATH\" &&\ncd \"$TM_DIRECTORY\" &&\n\"$TM_CVS\" update \"$TM_FILENAME\"\n\n# force TM to refresh the current file..\nosascript &>/dev/null \\\n -e 'tell application \"Dock\" to activate' \\\n -e 'tell application \"TextMate\" to activate' &\n",
102
+ input: "none",
103
+ keyEquivalent: "^Z",
104
+ name: "Revert",
105
+ output: "showAsTooltip",
106
+ uuid: "20865252-80D2-4CA4-9834-391D09210C4F"},
107
+ {beforeRunningCommand: "nop",
108
+ command:
109
+ "require_cmd \"${TM_CVS:=cvs}\" \"If you have installed cvs, then you need to either update your <tt>PATH</tt> or set the <tt>TM_CVS</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n\nENV['CVS_PATH'] = ENV['TM_CVS']\n$LOAD_PATH << ENV['TM_BUNDLE_SUPPORT']\nrequire 'versioned_file'\n\ntag=`CocoaDialog inputbox --title Tag --informative-text 'Which tag?' --button1 Update --button2 'Cancel'`\n\naccept, tag = *tag.to_a.map {|l| l.chomp}\n\nexit unless accept =~ /1/\n\nfile = CVS::VersionedFile.new(ENV['TM_FILEPATH'])\nfile.update(:tag => tag)\n\nputs \"Tagged \#{file.basename} with tag \#{tag}.\"\n\nEND\n",
110
+ input: "none",
111
+ keyEquivalent: "^Z",
112
+ name: "Update with tag...",
113
+ output: "showAsTooltip",
114
+ uuid: "1F22884A-6702-4FB6-B4E7-D49B2431BD4E"}]
@@ -0,0 +1,58 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "#!/usr/bin/env ruby\n#\n# Based on (from Source.tmbundle):\n#\n# Assignment block tidier, version 0.1.\n#\n# Copyright Chris Poirier 2006.\n# Licensed under the Academic Free License version 3.0.\n#\n# This script can be used as a command for TextMate to align all \n# of the assignment signs within a block of text. When using it with\n# TextMate, set the command input to \"Selected Text\" or \"Document\",\n# and the output to \"Replace Selected Text\". Map it to a key \n# equivalent, and any time you want to tidy up a block, either \n# select it, or put your cursor somewhere within it; then hit the\n# key equivalent. Voila.\n#\n# Note that this is the first version of the script, and it hasn't\n# been heavily tested. You might encounter a bug or two. \n#\n# Note (by Dr Nic) - the \"first version\" seems to have worked for years.\n# I hope the CoffeeScript version is as successful.\n#\n# Per the license, use of this script is ENTIRELY at your own risk.\n# See the license for full details (they override anything I've \n# said here).\n\nlines = STDIN.readlines()\nselected_text = ENV.member?(\"TM_SELECTED_TEXT\")\n\nrelevant_line_pattern = /^[^:]+:/\ncolumn_search_pattern = /[\\t ]*:/\n\ncomments = []\n\nbegin\n #\n # If called on a selection, every assignment statement\n # is in the block. If called on the document, we start on the \n # current line and look up and down for the start and end of the\n # block.\n\n if selected_text then\n block_top = 1\n block_bottom = lines.length\n else\n \n #\n # We start looking on the current line. However, if the\n # current line doesn't match the pattern, we may be just\n # after or just before a block, and we should check. If\n # neither, we are done.\n\n start_on = ENV[\"TM_LINE_NUMBER\"].to_i\n block_top = lines.length + 1\n block_bottom = 0\n search_top = 1\n search_bottom = lines.length\n search_failed = false\n\n if lines[start_on - 1] !~ relevant_line_pattern then\n if lines[start_on - 2] =~ relevant_line_pattern then\n search_bottom = start_on = start_on - 1\n elsif lines[start_on] =~ relevant_line_pattern then\n search_top = start_on = start_on\n else\n search_failed = true\n end \n end\n\n #\n # Now with the search boundaries set, start looking for\n # the block top and bottom.\n \n unless search_failed\n start_on.downto(search_top) do |number|\n if lines[number-1] =~ relevant_line_pattern then\n block_top = number\n else\n break\n end\n end\n \n start_on.upto(search_bottom) do |number|\n if lines[number-1] =~ relevant_line_pattern then\n block_bottom = number\n else\n break\n end\n end\n end\n end\n\n #\n # Now, iterate over the block and find the best column number\n # for the = sign. The pattern will tell us the position of the\n # first bit of whitespace before the equal sign. We put the\n # equals sign to the right of the furthest-right one. Note that\n # we cannot assume every line in the block is relevant.\n\n best_column = 0\n block_top.upto(block_bottom) do |number|\n line = lines[number - 1]\n if line =~ relevant_line_pattern then\n m = column_search_pattern.match(line)\n best_column = m.begin(0) if m.begin(0) > best_column\n end\n end\n\n \n #\n # Reformat the block. Again, we cannot assume all lines in the \n # block are relevant.\n\n block_top.upto(block_bottom) do |number|\n if lines[number-1] =~ relevant_line_pattern then\n before, after = lines[number-1].split(/[\\t ]*:[\\t ]*/, 2)\n # lines[number-1] = [before.ljust(best_column), after].join(after[0,1] == '>' ? \":\" : \": \")\n lines[number-1] = [\"\#{before}:\".ljust(best_column + 2), after].join\n end\n end\n\n\nrescue => e\n comments << \"Error: \#{e.inspect}\"\n comments << e.backtrace\nend\n\n#\n# Output the replacement text\n\nlines.each do |line|\n puts line\nend\n\ncomments.flatten.each { |c| puts \"# \#{c}\" }\n\n",
6
+ input: "selection",
7
+ keyEquivalent: "~@]",
8
+ name: "Align Assignments",
9
+ output: "replaceSelectedText",
10
+ scope: "source.coffee",
11
+ uuid: "EE3293A5-3761-40BD-9CA8-DAAA176AA19E"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "#!/bin/bash\n\necho \"<pre style='font-family:Monaco; font-size: 20px;'>\"\ncoffee -scp --no-wrap\necho \"</pre>\"",
15
+ fallbackInput: "document",
16
+ input: "selection",
17
+ keyEquivalent: "@b",
18
+ name: "Compile and Display JS",
19
+ output: "showAsHTML",
20
+ scope: "source.coffee",
21
+ uuid: "D749F761-1740-4918-9490-90DF376BA72E"},
22
+ {beforeRunningCommand: "nop",
23
+ command:
24
+ "#!/usr/bin/env ruby\n\ncolumn_number = ENV['TM_COLUMN_NUMBER']\nwhitespace = \" \" * (column_number.to_i - 1)\n\nprint <<-EOS\n\"\"\"\n\#{whitespace}$0\n\#{whitespace}\"\"\"\nEOS\n",
25
+ fallbackInput: "line",
26
+ input: "none",
27
+ keyEquivalent: "@\"",
28
+ name: "Insert Heredoc \"\"\" quotes",
29
+ output: "insertAsSnippet",
30
+ scope: "source.coffee",
31
+ uuid: "F08537AF-4F02-4040-999D-F0785CF64C02"},
32
+ {beforeRunningCommand: "nop",
33
+ command:
34
+ "cat <<SNIPPET\n${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}: (\\${1:args}) ->\n \\$0\nSNIPPET",
35
+ fallbackInput: "word",
36
+ input: "selection",
37
+ keyEquivalent: "$\n",
38
+ name: "New Function",
39
+ output: "insertAsSnippet",
40
+ scope: "source.coffee",
41
+ uuid: "192428A1-8684-4172-8728-225B4C9E532F"},
42
+ {beforeRunningCommand: "nop",
43
+ command:
44
+ "#!/bin/bash\n\necho \"<pre style='font-family:Monaco; font-size: 20px;'>\"\ncoffee -s\necho \"</pre>\"",
45
+ input: "document",
46
+ keyEquivalent: "@r",
47
+ name: "Run",
48
+ output: "showAsHTML",
49
+ scope: "source.coffee",
50
+ uuid: "30395DAB-44A6-44F7-99E1-02D64621303A"},
51
+ {beforeRunningCommand: "nop",
52
+ command: "#!/bin/bash\n\ncoffee -s\n",
53
+ input: "selection",
54
+ keyEquivalent: "@R",
55
+ name: "Run selected text",
56
+ output: "showAsTooltip",
57
+ scope: "source.coffee",
58
+ uuid: "90424631-D00B-448C-B157-DAC92DFB2858"}]
@@ -0,0 +1,20 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{autoScrollOutput: true,
4
+ beforeRunningCommand: "saveActiveFile",
5
+ command:
6
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"Compile “${TM_FILENAME}”\" \"Context Free\"\n\nSIZE=400\nRES=\"/tmp/tm_cfdg_${TM_FILENAME%.*}.png\"\n\ncfdg -s $SIZE \"$TM_FILEPATH\" \"$RES\"|pre\n\nif [[ -e \"$RES\" ]]; then\n echo \"<img src='tm-file://${RES// /%20}' width='$SIZE' height='$SIZE'>\"\n { sleep 20; rm -f \"$RES\"; } &>/dev/null &\nfi\n\nhtml_footer\n",
7
+ input: "none",
8
+ keyEquivalent: "@r",
9
+ name: "Render",
10
+ output: "showAsHTML",
11
+ scope: "source.context-free",
12
+ uuid: "919889A9-590B-45CD-AEA2-CFC3452B16C7"},
13
+ {beforeRunningCommand: "nop",
14
+ command:
15
+ "content () {\n\tperl -pe 's/[\"\\\\]/\\\\$&/g'\n}\n\nosascript <<-APPLESCRIPT\n\ttell application \"Context Free\" to activate\n\tmenu_click({\"Context Free\", \"File\", \"New\"})\n\ttell app \"System Events\"\n\t\tset value of ((process \"Context Free\")'s (window 1)'s (splitter group 1)'s (group 1)'s (scroll area 1)'s (text area 1)) to \"$(content)\"\n\tend tell\n\tmenu_click({\"Context Free\", \"Render\", \"Render\"})\n\n\n\t-- Helper functions\n\ton menu_click(mList)\n\t\tlocal appName, topMenu, r\n\t\tif mList's length < 3 then error \"Menu list is not long enough\"\n\t\tset {appName, topMenu} to (items 1 through 2 of mList)\n\t\tset r to (items 3 through (mList's length) of mList)\n\t\ttell app \"System Events\" to my menu_click_recurse(r, ((process appName)'s (menu bar 1)'s (menu bar item topMenu)'s (menu topMenu)))\n\tend menu_click\n\ton menu_click_recurse(mList, parentObject)\n\t\tlocal f, r\n\t\tset f to item 1 of mList\n\t\tif mList's length > 1 then set r to (items 2 through (mList's length) of mList)\n\t\ttell app \"System Events\"\n\t\t\tif mList's length is 1 then\n\t\t\t\tclick parentObject's menu item f\n\t\t\telse\n\t\t\t\tmy menu_click_recurse(r, (parentObject's (menu item f)'s (menu f)))\n\t\t\tend if\n\t\tend tell\n\tend menu_click_recurse\n\nAPPLESCRIPT",
16
+ input: "selection",
17
+ name: "Render in Context Free",
18
+ output: "showAsTooltip",
19
+ scope: "source.context-free",
20
+ uuid: "4A4BCD2A-C90D-4F5B-90A5-3C1B4208FBD6"}]
@@ -0,0 +1,94 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "#!/usr/bin/env sh\ncat <<'RUBYEOF' > /tmp/cucumber-$$.rb\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/table_aligner\"\nTM_DISCARD = 200\n\ninput = STDIN.read.split(\"\\n\")\noutput = Cucumber::Mate::TableAligner.new.align(input)\n\nif input == output\n exit TM_DISCARD\nelse\n puts(output)\nend\n\nRUBYEOF\n\n${TM_RUBY:-ruby} -w -Ku /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status",
6
+ fallbackInput: "document",
7
+ input: "selection",
8
+ keyEquivalent: "@|",
9
+ name: "Align Table Cells",
10
+ output: "replaceSelectedText",
11
+ uuid: "C210145E-4123-4FC5-BFB3-BC7D8B884F4A"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "#!/usr/bin/env ruby\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nbegin\n\tCucumber::Mate::FeatureHelper.new(ENV['TM_FILEPATH']).autocomplete_step($stdout, ENV['TM_CURRENT_LINE'])\nrescue Cucumber::Mate::Files::InvalidFilePathError => e\n\tCucumber::Mate::TextMateHelper.alert e.message\n\tprint ENV['TM_CURRENT_LINE']\nend",
15
+ fallbackInput: "line",
16
+ input: "selection",
17
+ keyEquivalent: "~",
18
+ name: "Autocomplete Step",
19
+ output: "insertAsSnippet",
20
+ scope: "text.gherkin.feature",
21
+ uuid: "46204E4A-2DA4-4107-9742-60F13EED58B8"},
22
+ {beforeRunningCommand: "saveActiveFile",
23
+ command:
24
+ "#!/usr/bin/env ruby\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nrunner = Cucumber::Mate::Runner.new(STDOUT, ENV['TM_PROJECT_DIRECTORY'], ENV['TM_FILEPATH'], ENV['TM_CUCUMBER_BIN'], ENV['TM_CUCUMBER_OPTS'])\n\nrunner.autoformat_feature\n\n",
25
+ fallbackInput: "document",
26
+ input: "none",
27
+ name: "Autoformat Feature (using Cucumber)",
28
+ output: "discard",
29
+ scope: "text.gherkin.feature, source.ruby.rspec.cucumber.steps",
30
+ uuid: "47E22DF4-07E4-4B15-9BDC-6DB1AE434609"},
31
+ {beforeRunningCommand: "nop",
32
+ command:
33
+ "#!/usr/bin/env sh\n\ncat <<'RUBYEOF' > /tmp/cucumber-$$.rb\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nbegin\n\tCucumber::Mate::FeatureHelper.new(ENV['TM_FILEPATH']).choose_alternate_file\nrescue Cucumber::Mate::Files::InvalidFilePathError => e\n\tCucumber::Mate::TextMateHelper.alert e.message\nend\n\nRUBYEOF\n\n${TM_RUBY:-ruby} /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status",
34
+ input: "none",
35
+ keyEquivalent: "^$",
36
+ name: "Choose Alternate File",
37
+ output: "showAsTooltip",
38
+ scope: "text.gherkin.feature, source.ruby.rspec.cucumber.steps",
39
+ uuid: "2BCE4864-D70A-4C51-B49D-FB3220130B74"},
40
+ {beforeRunningCommand: "nop",
41
+ command:
42
+ "#!/usr/bin/env sh\ncat <<'RUBYEOF' > /tmp/cucumber-$$.rb\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nCucumber::Mate::FeatureHelper.new(ENV['TM_FILEPATH']).create_all_undefined_steps\n\nRUBYEOF\n\n${TM_RUBY:-ruby} /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status",
43
+ input: "none",
44
+ keyEquivalent: "^~$@",
45
+ name: "Create All Undefined Steps",
46
+ output: "showAsTooltip",
47
+ scope: "text.gherkin.feature, source.ruby.cucumber.steps",
48
+ uuid: "A165BB7A-E147-499B-8DF2-CA1FC9049298"},
49
+ {beforeRunningCommand: "nop",
50
+ command:
51
+ "#!/usr/bin/env sh\ncat <<'RUBYEOF' > /tmp/cucumber-$$.rb\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nbegin\n\tCucumber::Mate::FeatureHelper.new(ENV['TM_FILEPATH']).goto_alternate_file\nrescue Cucumber::Mate::Files::InvalidFilePathError => e\n\tCucumber::Mate::TextMateHelper.alert e.message\nend\n\nRUBYEOF\n\n${TM_RUBY:-ruby} /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status",
52
+ input: "none",
53
+ keyEquivalent: "^$",
54
+ name: "Goto Alternate File",
55
+ output: "showAsTooltip",
56
+ scope: "text.gherkin.feature, source.ruby.rspec.cucumber.steps",
57
+ uuid: "6AD6154B-3EE8-43D1-B87F-6261C859AD07"},
58
+ {beforeRunningCommand: "nop",
59
+ command:
60
+ "#!/usr/bin/env sh\ncat <<'RUBYEOF' > /tmp/cucumber-$$.rb\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nCucumber::Mate::FeatureHelper.new(ENV['TM_FILEPATH']).goto_current_step(ENV['TM_LINE_NUMBER'])\n\nRUBYEOF\n\n${TM_RUBY:-ruby} /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status",
61
+ fallbackInput: "document",
62
+ input: "none",
63
+ keyEquivalent: "^~$",
64
+ name: "Goto Current Step",
65
+ output: "showAsTooltip",
66
+ scope: "text.gherkin.feature, source.ruby.cucumber.steps",
67
+ uuid: "8E156A1E-AF51-4CFB-949F-47B6BCE6E6EC"},
68
+ {beforeRunningCommand: "saveActiveFile",
69
+ command:
70
+ "#!/usr/bin/env sh\ncat <<'RUBYEOF' > /tmp/cucumber-$$.rb\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nrunner = Cucumber::Mate::Runner.new(STDOUT, ENV['TM_PROJECT_DIRECTORY'], ENV['TM_FILEPATH'], ENV['TM_CUCUMBER_BIN'], ENV['TM_CUCUMBER_OPTS'])\n\nrunner.run_feature\n\nRUBYEOF\n\n${TM_RUBY:-ruby} /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status",
71
+ fallbackInput: "document",
72
+ input: "document",
73
+ keyEquivalent: "@r",
74
+ name: "Run Feature",
75
+ output: "showAsHTML",
76
+ scope: "text.gherkin.feature, source.ruby.rspec.cucumber.steps",
77
+ uuid: "1531D367-DCDF-4F89-8BDB-896FAA16830E"},
78
+ {beforeRunningCommand: "saveActiveFile",
79
+ command:
80
+ "#!/usr/bin/env sh\ncat <<'RUBYEOF' > /tmp/cucumber-$$.rb\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/cucumber/mate/feature_helper\"\nrunner = Cucumber::Mate::Runner.new(STDOUT, ENV['TM_PROJECT_DIRECTORY'], ENV['TM_FILEPATH'], ENV['TM_CUCUMBER_BIN'], ENV['TM_CUCUMBER_OPTS'])\n\nrunner.run_scenario(ENV['TM_LINE_NUMBER'])\n\nRUBYEOF\n\n${TM_RUBY:-ruby} /tmp/cucumber-$$.rb; exit_status=$?; rm /tmp/cucumber-$$.rb; exit $exit_status",
81
+ fallbackInput: "document",
82
+ input: "document",
83
+ keyEquivalent: "@R",
84
+ name: "Run Single Scenario",
85
+ output: "showAsHTML",
86
+ scope: "text.gherkin.feature",
87
+ uuid: "7B92D0E5-FCF2-4CE0-A900-821E7EA000C7"},
88
+ {beforeRunningCommand: "nop",
89
+ command:
90
+ "cd \"$TM_BUNDLE_PATH\"\n\necho \"<pre>\"\n[ -d \".svn\" ] && svn up\n[ -d \".git\" ] && git pull\n[ ! -d .svn ] && [ ! -d .git ] && echo \"You must install the Cucumber bundle using Subversion or Git in order to update via this command.\"\n\nosascript -e 'tell app \"TextMate\" to reload bundles'\n\necho \"</pre>\"",
91
+ input: "selection",
92
+ name: "Update Cucumber Bundle",
93
+ output: "showAsHTML",
94
+ uuid: "5810C291-0741-4FEA-8227-1BEA776B6B23"}]