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,37 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "saveActiveFile",
4
+ command:
5
+ "#!/usr/bin/env ruby\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib/s5.rb\"\nprint S5.new(STDIN.readlines.join).to_html",
6
+ input: "document",
7
+ keyEquivalent: "^H",
8
+ name: "Convert to HTML",
9
+ output: "openAsNewDocument",
10
+ scope: "source.s5, source.s5 text.html.markdown",
11
+ uuid: "C1EC9501-B96E-4E6E-8F0A-2BECF19D0F30"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "#!/usr/bin/env ruby\nrequire 'fileutils'\n\nsrc = ENV['TM_BUNDLE_SUPPORT'] + \"/ui\"\ndst = ENV['TM_DIRECTORY']\n\nabort \"This action only works for saved documents.\" if dst.nil?\nabort \"The S5 ‘ui’ directory already exists.\" if File.directory?(dst + \"/ui\")\n\nbegin\n FileUtils.cp_r(src, dst)\n puts \"Theme files copied successfully.\"\nrescue Exception => e\n puts \"Error copying files to “\#{dst}”.\", e\nend\n",
15
+ input: "none",
16
+ name: "Copy Theme to Document Location",
17
+ output: "showAsTooltip",
18
+ scope: "source.s5",
19
+ uuid: "8B63721C-EDE4-42D4-8589-B6EA1D4F2D5B"},
20
+ {beforeRunningCommand: "nop",
21
+ command:
22
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"S5 Slide Show Help\" \"S5 Slide Show\"\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<'EOF'|SmartyPants.pl\n\nS5 is a slide show format based entirely on XHTML, CSS, and JavaScript. To read all about S5, visit the [S5 project web site][3].\n\n# Getting Started\n\nThe best way to start a new presentation is to use the \"New from Template\" option from the \"File\" menu, choosing \"S5 Presentation\" from the \"S5\" menu. This will give you a basic presentation file which you can then start modifying.\n\nTo quickly enter a new slide, type \"slide\" and hit the tab key. If you just want to create the dividing marker inbetween slides, type \"cut\" and hit the tab key.\n\nThe formatting of the slides themselves is Markdown, which is pretty ideal for entering lots of bullet lists and headings. S5 does support most any HTML you enter into the slide as well, including images. Refer to the [S5 project site][3] for further documentation on writing slides.\n\n# Headers\n\nThe S5 document format supports a set of \"header\" lines that are always placed at the top of the document. These provide extra metadata regarding the presentation itself. If you create a blank presentation using the above instructions, you will see some of these. The list of headers you may specify include:\n\n* Title - The title of the presentation.\n* Subtitle - The subtitle of the presentation (optional).\n* Presenter (or Author) - Your name or the name of the person that will be presenting the presentation.\n* Company (or Organization) - The name of the presenter's company.\n* Location - The location where the presentation will be given.\n* Date - The date the presentation will be given.\n* Controls - Specifies whether the navigation controls are always visible or not. The value for this should be either \"hidden\" or \"visible\" (the default is to be visible).\n* View - Specifies the default view of the presentation. Should be either \"slideshow\" or \"outline\" (the default is \"slideshow\").\n* Theme - The name of a S5 theme directory. This should be a directory name that contains a S5 compatible theme. The directory should be immediately under the \"ui\" directory (see Directory Layout section below). The default value for theme is \"default\".\n\nHeader lines are written with the heading keyword followed with a colon (\":\") and then the value for the keyword follows.\n\n Title: Presentation title\n\nMany of these headings are optional, but some are required in the sense that omitting them will adversely affect the appearance of the presentation.\n\n# Content Layout\n\nS5 supports placing \"handout\" and \"note\" sections within individual slides. You can notate these portions of a slide using the \"note\" and \"hand\" tab-triggered snippets. For example, a slide with text, handout and notes would look like this:\n\n Slide Text\n\n __________\n\n Handout section\n\n ##########\n\n Presentation notes.\n\nThe presentation notes are displayed in the popup-notes/control window that is new to S5 1.2.\n\nHandout notes are included when printing the presentation.\n\n# Commands\n\n* **Present**: Formats the presentation and opens it in your web browser.\n* **Convert to HTML**: Converts the presentation into HTML, creating a new document.\n* **Copy theme files**: Places a copy of the S5 support files into the same directory where your presentation resides.\n\n# Directory Layout\n\nThe S5 bundle includes a copy of the S5 default theme. Executing the \"Present\" command will load the default theme files from the S5 Bundle directory. If you want to include a copy of the S5 support files with your presentation document, use the \"Copy theme files\" command to make a copy of the S5 support files into the directory your presentation document is in. Additional custom themes can be copied into the \"ui\" folder. The theme can be specified using the \"Theme\" header (as described above). If you have a file named \"MyPresentation.s5\", the S5 \"ui\" folder should be placed in the same folder, and the directory would look something like this:\n\n<pre>MyPresentation.s5\nui/\nui/s5-notes.html\nui/default/\nui/default/blank.gif\nui/default/bodybg.gif\nui/default/framing.css\nui/default/iepngfix.htc\nui/default/opera.css\nui/default/notes.css\nui/default/outline.css\nui/default/pretty.css\nui/default/print.css\nui/default/s5-core.css\nui/default/slides.css\nui/default/slides.js\n</pre>\n\nNote that if your presentation is part of a TextMate project, the S5 Bundle will look for the \"ui\" directory first in the directory of your presentation file and if not found there, it will also check the top-level project directory as well.\n\n# Credits\n\nThis bundle is maintained by [Brad Choate][1]. The S5 CSS and HTML framework was developed by [Eric Meyer][2]. Many additional resources regarding S5, including documentation and additional themes may be found at the [S5 project site][3].\n\n[1]: http://bradchoate.com/\n[2]: http://www.meyerweb.com/eric/\n[3]: http://www.meyerweb.com/eric/tools/s5/\n\nEOF\nhtml_footer",
23
+ fallbackInput: "scope",
24
+ input: "none",
25
+ name: "Help",
26
+ output: "showAsHTML",
27
+ scope: "source.s5",
28
+ uuid: "0A8006CB-834C-4AC5-BAFE-672EB5F19417"},
29
+ {beforeRunningCommand: "saveActiveFile",
30
+ command:
31
+ "#!/usr/bin/env ruby\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib/s5.rb\"\ns5 = S5.new(STDIN.readlines.join)\nhtml = s5.to_html\nslide_anchor = ''\nif s5.current_slide_number\n slide_anchor = \"#slide\#{s5.current_slide_number}\"\nend\nfilename = ENV['TM_FILEPATH'].dup\nif (filename =~ /\\.s5$/)\n filename.sub!(/\\.s5$/, '.html')\nelse\n filename += '.html'\nend\nFile.open(filename, \"w\") do | fout |\n fout.print html\nend\nfilename.gsub!(/ /, '%20')\n%x{open file://\#{filename}\#{slide_anchor}}\nexit 200",
32
+ input: "document",
33
+ keyEquivalent: "^@p",
34
+ name: "Present",
35
+ output: "showAsTooltip",
36
+ scope: "source.s5",
37
+ uuid: "171DDC95-11B1-4044-80E3-328589A4994A"}]
@@ -0,0 +1,24 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "saveModifiedFiles",
4
+ command:
5
+ "# TM_IGNORE_WARNINGS is a sequence of glob patterns of files in which to ignore\n# warnings. Right now it doesn't support escaped ':\" -- the separator character.\n# export TM_IGNORE_WARNINGS=\"mitchcode_*.h:*/MitchCode/*\"\n\n# Look at other bundles to see if there are conventions for using 'defaults'.\nPREF_DOMAIN=com.macromates.textmate.scons_prefs\nlastTarget=`defaults read ${PREF_DOMAIN} last_target`\n\nres=$(CocoaDialog inputbox --title \"Target\" \\\n --informative-text \"Build Target:\" \\\n --text \"${lastTarget}\" \\\n --button1 \"Build\" --button2 \"Cancel\")\n\n[[ $(head -n1 <<<\"$res\") == \"2\" ]] && exit_discard\n\ntarget=\"\"\nreslines=`(wc -l <<<\"$res\")|sed -e 's/ //g'`\n[[ \"${reslines}\" == \"2\" ]] && target=$(tail -n1 <<<\"$res\")\n\ndefaults write ${PREF_DOMAIN} last_target -string \"${target}\"\ndefaults write ${PREF_DOMAIN} last_build_dir -string \"${TM_DIRECTORY}\"\n\n# Allow spaces to delimit arguments in ${target} -- bad idea?\npython -u \"${TM_BUNDLE_SUPPORT}/bin/scons_html_wrapper.py\" ${target}",
6
+ fallbackInput: "word",
7
+ input: "none",
8
+ keyEquivalent: "@b",
9
+ name: "Build ...",
10
+ output: "showAsHTML",
11
+ scope:
12
+ "source.c, source.objc, source.c++, source.objc++, source.python, source.d",
13
+ uuid: "88F36C61-F809-4FCE-97AF-D36019891F31"},
14
+ {beforeRunningCommand: "saveModifiedFiles",
15
+ command:
16
+ "# TM_IGNORE_WARNINGS is a sequence of glob patterns of files in which to ignore\n# warnings. Right now it doesn't support escaped ':\" -- the separator character.\n# export TM_IGNORE_WARNINGS=\"mitchcode_*.h:*/MitchCode/*\"\n\n# Look at other bundles to see if there are conventions for using 'defaults'.\nPREF_DOMAIN=com.macromates.textmate.scons_prefs\nlastTarget=`defaults read ${PREF_DOMAIN} last_target 2>/dev/null`\nlastBuildDir=`defaults read ${PREF_DOMAIN} last_build_dir 2>/dev/null`\n\nif [ \"x$lastBuildDir\" != \"x\" ]; then\n cd ${lastBuildDir}\nfi\n\n# Allow spaces to delimit arguments in ${target} -- bad idea?\npython -u \"${TM_BUNDLE_SUPPORT}/bin/scons_html_wrapper.py\" ${lastTarget}",
17
+ fallbackInput: "word",
18
+ input: "none",
19
+ keyEquivalent: "@b",
20
+ name: "Rebuild",
21
+ output: "showAsHTML",
22
+ scope:
23
+ "source.c, source.objc, source.c++, source.objc++, source.python, source.d",
24
+ uuid: "2CDB078C-78E9-4DDA-9DF9-6F18D1E92BAE"}]
@@ -0,0 +1,60 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command: "\"$TM_BUNDLE_SUPPORT/bin/completion.rb\"",
5
+ input: "none",
6
+ keyEquivalent: "~",
7
+ name: "Completion",
8
+ output: "afterSelectedText",
9
+ scope: "source.sql",
10
+ uuid: "AFBD4D3D-926A-44B1-91CD-2BF793BCB8FD"},
11
+ {beforeRunningCommand: "nop",
12
+ command:
13
+ "#!/usr/bin/env perl\n$/=\\0;$_=<>; # Read all input\n\ns/\\s*\\-\\-.*$//g; # Strip comments\n\n1while s@^(([^'\"]*[\"'][^'\"]*[\"'])*[^\"']*)(\\n+|\\s{2,})@$1 @; # Compact whitespace\n\n# set defaultCStringEncoding to UTF-8 and open pbcopy\nopen(PBCOPY, '|__CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbcopy');\nprint PBCOPY; # Print the SQL to pbcopy\nclose PBCOPY;\nprint \"Copied SQL to Clipboard\";",
14
+ input: "selection",
15
+ keyEquivalent: "~@C",
16
+ name: "Copy Condensed SQL",
17
+ output: "showAsTooltip",
18
+ scope: "source.sql",
19
+ uuid: "37E7E7F5-DD1E-4306-B258-0F9176DC8D7E"},
20
+ {beforeRunningCommand: "nop",
21
+ command: "\"${TM_RUBY:=ruby}\" \"$TM_BUNDLE_SUPPORT/bin/db_browser.rb\"",
22
+ input: "none",
23
+ name: "Database Browser",
24
+ output: "showAsHTML",
25
+ uuid: "CDD74FE0-32E1-4604-BFC9-96173A557550"},
26
+ {beforeRunningCommand: "nop",
27
+ command:
28
+ "#!/usr/bin/env ruby -wKU\n\nrequire ENV['TM_BUNDLE_SUPPORT'] + '/bin/db_browser_lib.rb'\n\noptions = OpenStruct.new\nget_connection_settings(options)\n\nif options.server == 'mysql'\n url = \"http://dev.mysql.com/\#{ENV['TM_CURRENT_WORD'].downcase}\"\nelsif options.server == 'postgresql'\n url = \"http://www.postgresql.org/docs/current/static/sql-\#{ENV['TM_CURRENT_WORD'].downcase}.html\"\n if `curl --silent -I \"\#{url}\" | grep '200 OK'`.empty?\n url = \"http://search.postgresql.org/search?q=\#{ENV['TM_CURRENT_WORD'].downcase}\"\n end\nend\nputs \"<script>window.location='\#{url}'</script>\"",
29
+ input: "none",
30
+ keyEquivalent: "^h",
31
+ name: "Documentation for Current Word",
32
+ output: "showAsHTML",
33
+ scope: "source.sql",
34
+ uuid: "245B2739-B3C5-4BBD-9772-C97C3C790BB6"},
35
+ {beforeRunningCommand: "nop",
36
+ command:
37
+ "query=${TM_SELECTED_TEXT:-$TM_CURRENT_LINE}\n\n\"${TM_RUBY:=ruby}\" \"$TM_BUNDLE_SUPPORT/bin/db_browser.rb\" --query=\"$(tr '\\n' ' ' <<< \"$query\")\"\n",
38
+ fallbackInput: "line",
39
+ input: "selection",
40
+ keyEquivalent: "^Q",
41
+ name: "Execute Line / Selection as Query",
42
+ output: "showAsHTML",
43
+ uuid: "C3045596-791D-11D9-9130-000A95766570"},
44
+ {beforeRunningCommand: "nop",
45
+ bundleUUID: "AAB4CBF7-73F9-11D9-B89A-000D93589AF6",
46
+ command:
47
+ "#!/usr/bin/env bash\n\n. \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"SQL Bundle Help\" \"SQL\"\n\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<'MARKDOWN'\n<script type=\"text/javascript\" charset=\"utf-8\">\n\tfunction launchConfig() {\n\t TextMate.system('\"$TM_BUNDLE_SUPPORT\"/bin/configure.sh 2>&1', null);\n\t window.close();\n\t}\n</script>\nThe SQL bundle allows you to browse MySQL/PostgreSQL databases and execute queries.\n\n# Configuration\n\nBefore you can use the SQL bundle you must configure at least one SQL connection using the <a href=\"javascript:launchConfig()\">*Configure*</a> command.\nYou must provide at least a username and a hostname (note that if you wish to connect locally bypassing a socket, you must use `127.0.0.1` rather than `localhost`).\n\nYou can store multiple connections – use the ‘+’ button to add another connection. Whichever profile is selected when you close the dialog will be used when connecting.\n\nAlternatively you can set `TM_SQL_CONNECTION` to the title of a connection and it will take precedence. This is useful for setting connections on a per-project basis.\n\n# Execute Line / Selection as Query\n\nThe _Execute Line / Selection as Query_ command takes the selected text or current line and submits it as a query to either MySQL or PostgreSQL.\n\nYou will need to setup a database connection via the <a href=\"javascript:launchConfig()\">*Configure*</a> command. Pressing ⌃⇧Q on an empty line will open the database browser.\n\n# Database Browser\n\nThe database browser command displays a list of tables in whatever database you are currently working in using either PostgreSQL or MySQL. Click on the name of a database on the left to view the tables in that database.\n\nThe connection to your server is setup with the <a href=\"javascript:launchConfig()\">*Configure*</a> command.\n\nMARKDOWN\n\nhtml_footer\n",
48
+ input: "none",
49
+ name: "Help",
50
+ output: "showAsHTML",
51
+ scope: "source.sql",
52
+ uuid: "FE9FF936-7E32-11D9-B7C6-000D93B6E43C"},
53
+ {beforeRunningCommand: "nop",
54
+ keyEquivalent: "~@,",
55
+ command: "configure.sh",
56
+ input: "none",
57
+ name: "Preferences…",
58
+ output: "discard",
59
+ scope: "source.sql",
60
+ uuid: "6374BC72-221E-4517-95DA-5D63B50E77BC"}]
@@ -0,0 +1,83 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "require_cmd \"${TM_SVK:=svk}\" \"If you have installed svk, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVK</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:=ruby}\" -r \"$TM_SUPPORT_PATH/lib/shelltokenize.rb\" <<END\n\tsvk = ENV['TM_SVK'] || \"svk\"\n\tputs %x{\#{svk} add \#{TextMate.selected_paths_for_shell}}\nEND",
6
+ input: "none",
7
+ keyEquivalent: "^~A",
8
+ name: "Add to Repository",
9
+ output: "showAsTooltip",
10
+ uuid: "F41366B2-C373-11D9-8A81-000A95BCAFA8"},
11
+ {beforeRunningCommand: "nop",
12
+ command:
13
+ "require_cmd \"${TM_SVK:=svk}\" \"If you have installed svk, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVK</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_SVK:=svk}\" blame \"$TM_FILEPATH\" \\\n2>&1| \"${TM_RUBY:=ruby}\" -- \"${TM_BUNDLE_SUPPORT}/format_blame.rb\"",
14
+ input: "none",
15
+ keyEquivalent: "^~A",
16
+ name: "Blame",
17
+ output: "showAsHTML",
18
+ uuid: "B37F2E1A-C35F-11D9-AB2C-000A95BCAFA8"},
19
+ {beforeRunningCommand: "saveModifiedFiles",
20
+ command:
21
+ "require_cmd \"${TM_SVK:=svk}\" \"If you have installed svk, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVK</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nCommitWindow=\"$TM_SUPPORT_PATH/bin/CommitWindow.app/Contents/MacOS/CommitWindow\"\nexport CommitWindow\n\nTM_SVK=\"${TM_SVK:=svk}\"\nexport TM_SVK\n\n\"${TM_RUBY:=ruby}\" -- \"${TM_BUNDLE_SUPPORT}/svk_commit.rb\"\n",
22
+ input: "none",
23
+ keyEquivalent: "^~A",
24
+ name: "Commit",
25
+ output: "showAsHTML",
26
+ uuid: "C03C7374-C371-11D9-AAA6-000A95BCAFA8"},
27
+ {beforeRunningCommand: "nop",
28
+ command:
29
+ "TMPFILE=`mktemp /tmp/tm-svk.XXXXXX` || exit 1\n\nmv \"$TMPFILE\" \"$TMPFILE.diff\"\nTMPFILE=\"$TMPFILE.diff\"\n\n# -rBASE is the same as specifying no revision -- it's the version that you have checked out.\n\"${TM_SVK:=svk}\" diff -rBASE \"$TM_FILEPATH\" &> \"$TMPFILE\"\n\nopen -a TextMate \"$TMPFILE\" &\n\n#rm \"$TMPFILE\" # ideally, we'd do this, but it creates a race condition, because 'open' is asynchronous.\n",
30
+ input: "none",
31
+ keyEquivalent: "^~A",
32
+ name: "Diff With Working Copy (BASE)",
33
+ output: "discard",
34
+ uuid: "0987069A-C370-11D9-AAA6-000A95BCAFA8"},
35
+ {beforeRunningCommand: "nop",
36
+ command:
37
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"SVK Bundle Help\" \"SVK\"\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<'EOF'\n\nThis README just documents what the commands of this Bundle do and how you can <a href=\"#sect_2\">fine-tune</a> their behaviour; if you need general SVK Help/Introduction, you should look at the <a href=\"http://svk.elixus.org/\">SVK homepage</a>.\n \n# Commands\n \n- **Add to Repository**\n\n __Target__: selected project files/folders or the active file if it doesn't belong to a project\n \n Adds the targets to the repository.\n\n- **Blame**\n\n __Target__: active file\n \n Displays a line-by-line history of the file, showing you who wrote which line in what revision. Click a line to jump to it in an editor window. Hover over a revision number or author name to see when the corresponding line was last changed. The date format is <a href=\"#sect_2\">adjustable</a> with `TM_SVK_DATE_FORMAT`.\n \n \"wc\" means the last change was in your working copy.\n\n- **Commit**\n\n __Target__: selected project files/folders or the active file if it doesn't belong to a project\n \n Commits your changed files to the repository. A dialog asks you for the description of your changes; you may also choose to exclude files from the commit by un-checking them. If no files are selected or active, this command does nothing. If the target files have no local changes, nothing happens.\n \n- **Diff With Working Copy (BASE)**\n \n __Target__: active file\n \n Displays the differences between the active file and an unaltered, pristine copy of the file at the same revision.\n \n Equivalent to `svk diff -rBASE`\n \n- **Info**\n\n __Target__: selected project files/folders or the active file if it doesn't belong to a project\n\n Displays detailed information about the selected files. Some parameters are configurable via shell variables; see the <a href=\"#sect_2\">Configuration Options</a> section below.\n \n- **Log**\n\n __Target__: selected project files/folders or the active file if it doesn't belong to a project\n \n Displays the commit message history for the selected files. Some parameters are configurable via shell variables; see the <a href=\"#sect_2\">Configuration Options</a> section below. (TODO: if multiple files are selected, only the logs from the first are shown.)\n\n- **Revert**\n\n __Target__: active file\n \n Revert changes made in checkout copies.\n\n- **Status**\n\n __Target__: directory of active file\n \n Displays a list of files with changes in your working copy, along with the type of change for each file.\n\n- **Update to Newest**\n\n __Target__: selected project files/folders or the active file if it doesn't belong to a project\n \n Updates the targets with the newest changes from the repository.\n\n\n# Configuration Options\n \nThese [static variables](?static_variables) allow you to tweak the behaviour of the certain commands if need be. The default values should make sense for normal use.\n \n- `TM_SVK`\n\n __Default__: `svk`\n \n The path to your svk executable.\n \n- `TM_RUBY`\n\n __Default__: `ruby`\n \n Here you can tweak with what Ruby the formatting scripts will be executed.\n \n- `TM_SVK_DATE_FORMAT`\n\n __Default__: *not set* (No Changes, just show what SVK shows)\n \n A date format string that allows you to tweak the format in which Blame, Log and Info show you dates. See <a title=\"Manual Page For strftime(3)\" href=\"http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/strftime.3.html\">strftime(3)</a> for what you can enter here.\n \n- `TM_SVK_CLOSE`\n\n __Default__: `false`\n \n\tWith this option you can adjust whether the windows of Blame and Info close if you click on a link which opens a file in TM. Set it to `1` or `true` if windows should close or to something else if they should not.\n \n- `TM_SVK_LOG_RANGE`\n\n __Default__: `BASE:1`\n\n The default range to query for log messages.\n \n- `TM_SVK_LOG_LIMIT`\n\n __Default__: `9`\n\n The number of messages to show. `0` means no limit.\n \n- `TM_SVK_INFO_HIDE`\n\n __Default__: *not set* (nothing)\n \n Here you can adjust what keys of the info stream you don't want to see, it is case insensitive and a comma (`,`) separated list. If you enter a `*`, it is assumed that you want to hide all vars, if so, you can make some values visible again with `TM_SVK_INFO_SHOW`.\n \n- `TM_SVK_INFO_SHOW`\n\n __Default__: *not set* (everything else)\n \n This is also a comma-separated list of keys, it just makes sense if you did hide all with the above var. `*` has no special meaning here. Everything you enter here will be shown if you want to hide everything else.\n\n\n# Authors\n \n- <a href=\"mailto:glasser@mit.edu\">David Glasser</a>, ported to SVK from Subversion\n- Chris Thomas (Subversion bundle) (Idea, Status, Diffs, Commit, Add, and Updates)\n- Torsten Becker (Subversion bundle) (Blame, Log, Info, and Revert)\n\nEOF\nhtml_footer\n",
38
+ dontFollowNewOutput: 1,
39
+ input: "none",
40
+ keyEquivalent: "^~A",
41
+ name: "Help",
42
+ output: "showAsHTML",
43
+ uuid: "5263FCE3-C32A-11D9-BFEF-000A95BCAFA8"},
44
+ {beforeRunningCommand: "nop",
45
+ command:
46
+ "TM_SVK=\"${TM_SVK:=svk}\"\nTM_RUBY=\"${TM_RUBY:=ruby}\"\nFORMAT_INFO=\"${TM_BUNDLE_SUPPORT}/format_info.rb\"\n\nif [[ -z $TM_SELECTED_FILES ]]; then\n \"$TM_SVK\" info \"$TM_FILEPATH\" \\\n 2>&1| \"$TM_RUBY\" -- \"$FORMAT_INFO\"\nelse\n eval \"$TM_SVK\" info $TM_SELECTED_FILES \\\n 2>&1| \"$TM_RUBY\" -- \"$FORMAT_INFO\"\nfi",
47
+ input: "none",
48
+ keyEquivalent: "^~A",
49
+ name: "Info",
50
+ output: "showAsHTML",
51
+ uuid: "70BCF12B-C35D-11D9-AB2C-000A95BCAFA8"},
52
+ {beforeRunningCommand: "nop",
53
+ command:
54
+ "# XXX: svk log doesn't support multiple paths\n# so if multiple files are selected, it will\n# only do the first one!\n\nTM_SVK=\"${TM_SVK:=svk}\"\nTM_RUBY=\"${TM_RUBY:=ruby}\"\nFORMAT_LOG=\"${TM_BUNDLE_SUPPORT}/format_log.rb\"\nTM_SVK_LOG_RANGE=\"${TM_SVK_LOG_RANGE:=BASE:1}\"\n\nif [[ -z $TM_SELECTED_FILES ]]; then\n \"$TM_SVK\" log -vr\"$TM_SVK_LOG_RANGE\" \"$TM_FILEPATH\" \\\n 2>&1| \"$TM_RUBY\" -- \"$FORMAT_LOG\"\nelse\n eval \"$TM_SVK\" log -vr\"$TM_SVK_LOG_RANGE\" $TM_SELECTED_FILES \\\n 2>&1| \"$TM_RUBY\" -- \"$FORMAT_LOG\"\nfi",
55
+ input: "none",
56
+ keyEquivalent: "^~A",
57
+ name: "Log",
58
+ output: "showAsHTML",
59
+ uuid: "9BF6E13C-C31A-11D9-820C-000A95BCAFA8"},
60
+ {beforeRunningCommand: "nop",
61
+ command:
62
+ "require_cmd \"${TM_SVK:=svk}\" \"If you have installed svk, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVK</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nif [[ -z $TM_SELECTED_FILES ]]\n\tthen\n\tTM_SELECTED_FILES=\"'$TM_FILEPATH'\"\nfi\n\"$TM_BUNDLE_SUPPORT/revert_file.rb\" $TM_SELECTED_FILES\n",
63
+ input: "none",
64
+ keyEquivalent: "^~A",
65
+ name: "Revert",
66
+ output: "showAsTooltip",
67
+ uuid: "8FCB4C8F-23CD-4D2E-A9F2-C4564DFFEB2A"},
68
+ {beforeRunningCommand: "nop",
69
+ command:
70
+ "export WorkPath=\"$TM_DIRECTORY\"\n\n# show it..\n\"${TM_SVK:=svk}\" status \"$WorkPath\" 2>&1| \"${TM_RUBY:=ruby}\" -- \"${TM_BUNDLE_SUPPORT}/format_status.rb\"\n",
71
+ input: "none",
72
+ keyEquivalent: "^~A",
73
+ name: "Status",
74
+ output: "showAsHTML",
75
+ uuid: "C17472A0-C36B-11D9-954B-000A95BCAFA8"},
76
+ {beforeRunningCommand: "saveModifiedFiles",
77
+ command:
78
+ "\"${TM_RUBY:=ruby}\" -r \"$TM_SUPPORT_PATH/lib/shelltokenize.rb\" <<END\n\tsvk = ENV['TM_SVK'] || \"svk\"\n\tputs %x{\#{svk} update \#{TextMate.selected_paths_for_shell}}\nEND\n",
79
+ input: "none",
80
+ keyEquivalent: "^~A",
81
+ name: "Update to Newest",
82
+ output: "showAsTooltip",
83
+ uuid: "D79E0650-C374-11D9-8A81-000A95BCAFA8"}]
@@ -0,0 +1,63 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "#!/usr/bin/env ruby\nar = [\"<<>>=\",\n \"<<echo=true>>=\",\"<<echo=false,results=hide>>=\",\n \"<<echo=false,results=tex>>=\",\n \"<<echo=false,results=verbatim>>=\"]\ntext = STDIN.readlines\nif (i = ar.index(text[0].strip))\n text[0] = ar[(i+1)% 4] + \"\\n\"\nend\nprint text.join\n",
6
+ fallbackInput: "scope",
7
+ input: "selection",
8
+ keyEquivalent: "^<",
9
+ name: "Change Block Parameters",
10
+ output: "replaceSelectedText",
11
+ scope: "text.tex.latex.sweave meta.block",
12
+ uuid: "486047C3-9313-4276-97A7-EEDCF2E2ABB8"},
13
+ {beforeRunningCommand: "nop",
14
+ command:
15
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\n\n\thtml_header \"Sweave Bundle Help\" \"Sweave\"\n\tMarkdown.pl \"$TM_BUNDLE_SUPPORT/help.markdown\"|Smartypants.pl\n\thtml_footer\n",
16
+ input: "none",
17
+ name: "Help",
18
+ output: "showAsHTML",
19
+ scope: "text.sweave",
20
+ uuid: "F05EE36B-139D-41A4-8957-637BE0AAD847"},
21
+ {beforeRunningCommand: "nop",
22
+ command:
23
+ "M=${TM_SWEAVE_WD:=${TM_DIRECTORY}}\nosascript -e 'tell application \"R\" to activate' -e \"tell application \\\"R\\\" to cmd \\\"setwd('$M')\\nSweave('$TM_FILEPATH')\\ndate()\\\"\"",
24
+ input: "selection",
25
+ name: "SWeave in R",
26
+ output: "discard",
27
+ scope: "text.sweave text.tex.latex, source.r",
28
+ uuid: "09834657-AF82-4CB6-8239-3894E9B7926E"},
29
+ {beforeRunningCommand: "nop",
30
+ command:
31
+ "# this command requires that TM_SWEAVE_MASTER is set\n\nM=${TM_SWEAVE_WD:=${TM_DIRECTORY}}\nosascript -e 'tell application \"R\" to activate' -e \"tell application \\\"R\\\" to cmd \\\"setwd('$M')\\nSweave('$TM_SWEAVE_MASTER')\\ndate()\\\"\"",
32
+ input: "selection",
33
+ name: "SWeave project in R",
34
+ output: "showAsTooltip",
35
+ scope: "source.r, text.sweave",
36
+ uuid: "778EA411-C3C7-42F0-802B-4DE23326E328"},
37
+ {beforeRunningCommand: "nop",
38
+ command:
39
+ "# Source some support functions we need.\n. \"${TM_SUPPORT_PATH}/lib/html.sh\"\n. \"${TM_SUPPORT_PATH}/lib/webpreview.sh\"\n\n# Get the viewer program. Any program (that works with open -a <name>) can be used,\n# except 'html' which is reserved to mean the internal HTML window. This is also the\n# default option.\nV=${TM_LATEX_VIEWER:-html}\nEL=${TM_LATEX_ERRLVL:-1}\nM=${TM_LATEX_MASTER:-$TM_FILEPATH}\nDIR=`dirname \"$M\"`\nFILE=`basename \"${M%.*}\".tex`\nPDF=\"${FILE%.*}.pdf\"\nCWD=\"`pwd`/\"\n\n# Set up TeX compiler, fallback to xelatex if document indicates it\nif grep -Esq '\\\\usepackage{.*(xunicode|fontspec)|program=xelatex' \"$M\"\n\tthen DEF_TEX=xelatex\n\telse DEF_TEX=pdflatex\nfi\nTEX=${TM_LATEX_COMPILER:-$DEF_TEX}\n\n# Add our tex directory to the TEXINPUTS variable so e.g. pdfsync is found (even when the user hasn’t installed it)\nexport TEXINPUTS=\"$TM_BUNDLE_SUPPORT/tex//:$(kpsewhich --expand-var '$TEXINPUTS')\"\n\n# Switch to the right directory.\ncd \"$TM_PROJECT_DIRECTORY\"\ncd \"$DIR\"\n\n# Prepare output window.\nhtml_header 'Sweave, Typeset &amp; View' \"$FILE\"\necho '<h2>Sweaving…</h2>'\n\nSW=${TM_SWEAVE_WD:=${TM_DIRECTORY}}\necho -e \"setwd('$SW')\\nSweave('$TM_FILEPATH')\" | R --vanilla --quiet | pre\n\n# Check if we actually have a tex compiler\nrequire_cmd \"$TEX\" \"You can either set the <tt>TM_LATEX_COMPILER</tt> variable to the full path of your LaTeX compiler (e.g. <tt>/opt/local/bin/pdflatex</tt> or set the <tt>PATH</tt> variable to include the path of <tt>pdflatex</tt>.\"\n\n\nrun_tex () {\nif [ \"$TEX\" != latexmk.pl ]\n\tthen \"$TEX\" ${TM_LATEX_OPTIONS:=-interaction=nonstopmode -file-line-error-style} \"$1\"\n\telse \"$TEX\" -f -r \"${TM_BUNDLE_SUPPORT}/latexmkrc\" \"$1\"\nfi\n}\n\n# Compile.\nrun_tex \"$FILE\" 2>&1| latexErrWarnHtml.py -v\nRC=$?\n\n# If there is output and it's newer than the current document, then we go directly to preview or link to it.\nif [ -s \"${PDF}\" -a ! \"$PDF\" -ot \"$FILE\" ]; then\n\tif [[ \"$V\" == html ]]; then\n\t\tWEB_LOC=\"tm-file://${DIR}/${PDF}\"\n\t\tWEB_LOC=\"${WEB_LOC//\\\\#/%23}\"\n\t\tif (($RC > $EL))\n\t\t\tthen link \"${WEB_LOC}\" 'Click Here to Preview'\n\t\t\telse redirect \"${WEB_LOC}\"\n\t\tfi\n\telse\n\t\tV=${V%.app} # strip potential .app extension\n\t\tif find_app >/dev/null \"$V.app\"; then\n\t\t\topen -a \"$V\" \"$PDF\"\n\t\t\tif [[ \"$V\" == TeXniscope && -f \"${PDF}sync\" ]]; then\n\t\t\t\tSCRIPT=$(find_app TeXniscope.app)/Contents/Resources/forward-search.sh\n\t\t\t\t[[ -x \"$SCRIPT\" ]] && \"$SCRIPT\" \"$TM_LINE_NUMBER\" \"$TM_FILEPATH\" \"$PDF\"\n\t\t\tfi\n\t\t\tif (($RC <= $EL)); then exit_discard; fi\n\t\telse\n\t\t\tstrong \"Error locating external viewer: $V\"\n\t\tfi\n\tfi\nelse\n\tstrong \"Error: PDF file not written to disk\"\nfi\nhtml_footer\n",
40
+ input: "none",
41
+ keyEquivalent: "@r",
42
+ name: "Sweave, Typeset & View",
43
+ output: "showAsHTML",
44
+ scope: "text.tex.latex.sweave, text.tex.latex.sweave source.r",
45
+ uuid: "F599ACE4-6B59-4235-A2BF-7BABA5C911B7"},
46
+ {beforeRunningCommand: "saveModifiedFiles",
47
+ command:
48
+ "#echo $TM_DIRECTORY/${{TM_FILENAME%.*}.tex}\nM=${TM_LATEX_MASTER:=$TM_DIRECTORY/${TM_FILENAME%.*}.tex}\nM=${M%.*}.pdf\n#M=$TM_DIRECTORY/$M\n\necho \"<meta http-equiv=\\\"refresh\\\" content=\\\"0; tm-file://${M}\\\"><title>${M}</title>\"\n\necho \"loading <b>$M</b>\"\n\n# open $M",
49
+ dontFollowNewOutput: 0,
50
+ input: "none",
51
+ keyEquivalent: "@V",
52
+ name: "View (PDF)",
53
+ output: "showAsHTML",
54
+ scope: "text.sweave",
55
+ uuid: "43E6A4DB-1524-4FDD-8BD9-76852A2FA790"},
56
+ {beforeRunningCommand: "nop",
57
+ command:
58
+ "M=${TM_SWEAVE_WD:=${TM_DIRECTORY}}\nosascript -e 'tell application \"R\" to activate' -e \"tell application \\\"R\\\" to cmd \\\"setwd('$M')\\n\\\"\"",
59
+ input: "selection",
60
+ name: "setwd",
61
+ output: "showAsTooltip",
62
+ scope: "source.r, text.sweave",
63
+ uuid: "6B05627E-6513-4C10-A489-1A09001F8D0D"}]
@@ -0,0 +1,30 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "# Evaluate the current seletion in our Scheme interpreter\n#\n# The interpreter you use should be set in the environment\n# variable TM_SCHEME_EVALUATOR \n\nINTERPRET=${TM_SCHEME_INTERPRETER:=csi}\nCMD=$(basename \"$INTERPRET\")\n\n# Run depending on the system are we on?\nif [ $CMD == \"mzscheme\" ] ; then\n\n\t# Check mzscheme version for decimal;\n\t# command-line behavior changed between\n\t# v372 and v4.0\n\n\tVER=$(\"$INTERPRET\" -v | sed -E 's/^Welcome to MzScheme v([^ ]+).*$/\\1/')\n\n\t# version 4.0 or later\n\tif (echo $VER | grep -q '\\.') ; then\n\t\t\"$INTERPRET\" -e \"$TM_SELECTED_TEXT\"\n\t# version 372 or earlier\n\telse\n\t\t\"$INTERPRET\" -vm -e \"$TM_SELECTED_TEXT\"\n\tfi\nelif [ $CMD == \"csi\" ] ; then\n\t\"$INTERPRET\" -q < /dev/stdin\nfi",
6
+ fallbackInput: "line",
7
+ input: "selection",
8
+ keyEquivalent: "^E",
9
+ name: "Evaluate Selection",
10
+ output: "showAsTooltip",
11
+ scope: "source.scheme",
12
+ uuid: "B270255C-1AE7-47FA-B3A7-38E983402C36"},
13
+ {beforeRunningCommand: "nop",
14
+ command:
15
+ "#!/usr/bin/env ruby\n\nrequire ENV[\"TM_SUPPORT_PATH\"] + \"/lib/tm/executor\"\nrequire ENV[\"TM_SUPPORT_PATH\"] + \"/lib/tm/save_current_document\"\nrequire ENV[\"TM_SUPPORT_PATH\"] + \"/lib/escape\"\n\nTextMate.save_current_document\nTextMate::Executor.make_project_master_current_document\n\ninterpreters = [\"mzscheme\", \"csi\", \"guile\"]\nargs = []\nargs << (ENV[\"TM_SCHEME\"] || interpreters.select{|ii| ENV[\"PATH\"].split(\":\").any?{|dd| File.executable? File.join(dd, ii)}}.first)\n\ncase args[0]\nwhen \"mzscheme\"\n args << \"-e\" << '(require (lib \"errortrace.ss\" \"errortrace\"))' << \"-r\"\nelse\n args << \"-s\"\nend\n\nTextMate::Executor.run(args, ENV[\"TM_FILEPATH\"]) do |line,type|\n if line =~ /(.*):([0-9]+):([0-9]+):(.*)/ then\n unless ENV[\"TM_FILE_IS_UNTITLED\"] == \"true\"\n \"<a href=\\\"txmt://open?url=file://\#{htmlize($1)}&line=\#{$2}&column=\#{$3}\\\">\#{htmlize($1)}:\#{$2}:\#{$3}</a>:\#{htmlize($4)}\"\n else\n \"<a href=\\\"txmt://open?line=\#{$2}&column=\#{$3}\\\">\#{htmlize($1)}:\#{$2}:\#{$3}</a>:\#{htmlize($4)}\"\n end\n end\nend\n \n\n\n# def printheader(schemesystem, interpreter)\n# print <<-ENDHTML\n# <html>\n# <head>\n# <title>Scheme TextMate Runtime</title>\n# <style type='text/css'>\n# body { background-color: #e0e0ff;}\n# .header,\n# .output,\n# .errors {\n# margin: 10px 0px 10px 0px;\n# padding: 10px;\n# border: 1px dotted black;\n# background-color: #ffffff;\n# }\n# .header { background-color: #a0a0ff;}\n# .output { background-color: #ffffff;}\n# .outputline { font-family: Monaco;\n# font-size: 8pt; }\n# .errors { background-color: #f0f0f0;}\n# .errorline { font-family: Monaco;\n# font-size: 8pt;\n# color: #0000f0 }\n# .errorinfo { font-family: Monaco;\n# font-size: 8pt; }\n# .errorexp { font-family: Monaco;\n# font-size: 8pt;\n# color: #f00000 }\n# a { color: #f00000;\n# text-decoration: none; }\n# </style>\n# <body>\n# <div class='header'>\n# Executed Scheme file in \#{schemesystem} (<i>\#{interpreter}</i>)\n# </div>\n# ENDHTML\n# end\n# \n# def printend\n# print <<-ENDHTML\n# </body>\n# </html>\n# ENDHTML\n# end\n# \n# def printoutput(ioport)\n# puts \"<div class='output'>\"\n# ioport.each do |line| \n# puts \"<div class='outputline'>\"\n# puts line\n# puts \"</div>\"\n# end\n# puts \"</div>\"\n# end\n# \n# def makeerrorlink(line, system)\n# case system\n# when \"mzscheme\"\n# a = line.split(':', 4)\n# file = a[0]\n# line = a[1]\n# column = a[2]\n# exp = a[3]\n# \"<tr><td width='50'></td><td><div class='errorinfo'>\" +\n# File.basename(file) + \" line \#{line}, column \#{column}</div></td>\" +\n# '<td width=\"30\"></td><td><div class=\"errorexp\"><a href=\"txmt://open?url=file://' + \n# File.expand_path(a[0]) + '&line=' + line + '&column=' + column + '\">' + \n# escape(exp) + \"</a></div></td></tr>\"\n# end\n# end\n# \n# def printerrors(errorfile, system)\n# puts \"<div class='errors'>\"\n# puts \"<table>\"\n# errors = 0\n# f = File.new(errorfile) \n# f.each do |line|\n# errors = 1\n# case system\n# when \"mzscheme\"\n# if line =~ /:[0-9]+:[0-9]+:/ then\n# puts makeerrorlink(line, system)\n# else\n# puts \"<div class='errorline'>\"\n# puts line\n# puts \"</div>\"\n# end\n# when \"csi\"\n# if line =~ /^Error/ then\n# puts \"<div class='errorline'>\"\n# puts line\n# puts \"</div>\" \n# else\n# puts \"<div class='errorinfo'>\"\n# puts line\n# puts \"</div>\"\n# end\n# else\n# puts \"<div class='errorline'>\"\n# puts line\n# puts \"</div>\" \n# end\n# end\n# if errors == 0\n# puts \"Program exited normally.\"\n# end\n# puts \"</table></div>\"\n# end\n\n\n\n# error_fd ||= IO.for_fd(ENV[\"TM_ERROR_FD\"].to_i)\n# case type\n# when :err # \n# if str =~ /^([^\\:]+):(\\d+):(\\d+): (.*?): (.*) \\((-?\\d+)\\)$/ then\n# filepath, start, stop, err, msg, status = $1, $2.to_i, $3.to_i, $4, $5, $6\n# \n# err = err.gsub(/\\b\\w(?=\\w{3,})/) { |m| m.upcase }\n# \n# error_fd << \"<div id=\\\"exception_report\\\" class=\\\"framed\\\">\\n\"\n# error_fd << \"<p id=\\\"exception\\\"><strong>\#{htmlize err}</strong>: \#{htmlize msg}</p>\\n\"\n# \n# from = document[0..start].rindex(/^/)\n# to = start + document[start..-1].index(/$/)\n# src = document[from...to]\n# \n# line = document[0...start].count(\"\\n\") + 1\n# column = start - from\n# \n# link = \"txmt://open?line=\#{line}&column=\#{column}\"\n# error_fd << \"<pre>\#{src}\\n\"\n# error_fd << \"\#{' ' * (column)}↑</pre>\"\n# error_fd << \"<blockquote><a href=\\\"\#{link}\\\">line \#{line}, column \#{column}</a> in \#{ENV['TM_DISPLAYNAME']}\\n\"\n# \n# error_fd << \"<p>Error \#{status}.</p>\\n\"\n# error_fd << \"</div>\\n\"\n# \n# error_fd.flush\n# \"\"\n# else\n# \"<span class=\\\"err\\\" style=\\\"color:red;\\\">\#{htmlize(str)}</span><br/>\"\n# end\n# when :out\n# htmlize(str)\n# end\n\n\n# Run the current document in our Scheme interpreter.\n#\n# The interpreter you use should be set in the environment\n# variable TM_SCHEME_INTERPRETER.\n#\n\n# # Save file, use tmp-file if there's no filepath.\n# [[ -z \"$TM_FILEPATH\" ]] && TM_TMPFILE=$(mktemp -t pythonmate)\n# : \"${TM_FILEPATH:=$TM_TMPFILE}\"; cat >\"$TM_FILEPATH\"\n# \n# # set up variables\n# INTERPRET=${TM_SCHEME_INTERPRETER:=csi}\n# CMD=$(basename \"$INTERPRET\")\n# SHOWOUTPUT=\"$TM_BUNDLE_SUPPORT/showoutput.rb\"\n# TM_ERRORTEMP=$(mktemp -t scheme)\n# \n# # Run depending on the system are we on?\n# if [ $CMD == \"mzscheme\" ] ; then\n# \"$INTERPRET\" -e '(require (lib \"errortrace.ss\" \"errortrace\"))' -r \"$TM_FILEPATH\" 2>\"$TM_ERRORTEMP\" | \"$SHOWOUTPUT\" \"$INTERPRET\" \"$TM_ERRORTEMP\"\n# elif [ $CMD == \"csi\" ] ; then\n# \"$INTERPRET\" -s \"$TM_FILEPATH\" 2>\"$TM_ERRORTEMP\" | \"$SHOWOUTPUT\" \"$INTERPRET\" \"$TM_ERRORTEMP\"\n# elif [ $CMD = \"guile\" ] ; then\n# \"$INTERPRET\" -s \"$TM_FILEPATH\" 2>\"$TM_ERRORTEMP\" | \"$SHOWOUTPUT\" \"$INTERPRET\" \"$TM_ERRORTEMP\"\n# fi\n# \n# # Delete tempfiles\n# rm -f \"$TM_TMPFILE\"\n# rm -f \"$TM_ERRORTEMP\" ",
16
+ input: "document",
17
+ keyEquivalent: "@r",
18
+ name: "Run Script",
19
+ output: "showAsHTML",
20
+ scope: "source.scheme",
21
+ uuid: "CBFEB6F9-D38C-4726-BD16-325E3FCC0C6B"},
22
+ {beforeRunningCommand: "nop",
23
+ command:
24
+ "osascript -e \"tell application \\\"Terminal\\\"\n do script \\\"clear; ${TM_SCHEME_INTERPRETER:=csi}\\\"\n activate\nend tell\"\n",
25
+ input: "none",
26
+ keyEquivalent: "^I",
27
+ name: "Start Interpreter",
28
+ output: "discard",
29
+ scope: "source.scheme",
30
+ uuid: "887AF89E-004D-42AC-B29E-D90B0147F6DC"}]
@@ -0,0 +1,28 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"Scilab Bundle Help\" \"Scilab\"\n\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<'EOF'\n\n# Help for Scilab Bundle (v0.11)\n\nThis Scilab bundle was created to help make editing Scilab scripts in TextMate a little easier. The two main benefits are:\n\n1. **Syntax Highlighting**\n\n Most conventional Scilab scripts should be interpreted correctly using the language grammar provided with this bundle. You'll get all the benefits of syntax highlighting, function pop-ups, and code folding.\n\n2. **Run Script Command**\n\n If you have `Scilab-4.1.app` installed, you'll be able to run the current script in a new instance of Scilab by simply pressing &#x2318;R. You can also load all functions defined in the working directory first (using getd) by pressing &#x21E7;&#x2318;R.\n\n You can obtain `Scilab-4.1.app` at <a href=\"javascript:TextMate.system('open http://www.lmac.utc.fr/~mottelet/Darwin/', null);\">http://www.lmac.utc.fr/~mottelet/Darwin/</a>.\n\nIf you have any suggestions or bug reports, feel free to send them to <a href=\"mailto:jc483@cornell.edu?subject=Scilab Bundle\">jc483@cornell.edu</a> with the subject \"Scilab Bundle\".\n\n# Version History\n\n- v0.11 (March 5th, 2007)\n\t- Thanks to Allan Odgaard for reviewing this bundle\n\t\t- Help now uses `markdown_to_help.rb` instead of `Markdown.pl`\n\t\t- `Scilab-4.1.app` is now located using `find_app`\n- v0.1 (March 3rd, 2007)\n\t- Initial release\n\n# About This Bundle\n\n## Disclaimer\n\nI'm just an amateur programmer, so it's very likely that there are better ways to automate some of the things that this bundle attempts to do. Feel free to correct any errors you may find, and if you want, you can publish your changes for everyone's benefit.\n\n## Credits\n\nCreated by Jiun Wei Chia. Various code stolen from the default TextMate bundles.\n\nEOF\n\nhtml_footer",
6
+ input: "none",
7
+ name: "Help",
8
+ output: "showAsHTML",
9
+ scope: "source.scilab",
10
+ uuid: "B2908B89-B064-447E-B3A7-C03D4BEE6D1C"},
11
+ {beforeRunningCommand: "saveActiveFile",
12
+ command:
13
+ "export APP=`find_app Scilab-4.1.app`\nLAUNCHER=$APP/Contents/Resources/launcher.sh\nif [ -x \"$LAUNCHER\" ]\nthen\n\tDIRECTORY=`echo \"$TM_DIRECTORY\" | sed -e \"s/'/''/g\" -e \"s/\\\"/\\\"\\\"/g\"`\n\tFILEPATH=`echo \"$TM_FILEPATH\" | sed -e \"s/'/''/g\" -e \"s/\\\"/\\\"\\\"/g\"`\n\techo \"cd('$DIRECTORY'); exec('$FILEPATH');\" > /tmp/scilab.sce\n\t$LAUNCHER -f /tmp/scilab.sce\nelse\n\techo \"Scilab 4.1 not found.\"\n\techo \"Please copy Scilab-4.1.app to the Applications directory.\"\nfi\n",
14
+ input: "none",
15
+ keyEquivalent: "@r",
16
+ name: "Run Script",
17
+ output: "showAsTooltip",
18
+ scope: "source.scilab",
19
+ uuid: "14038705-CA2C-4386-8B21-3EEF52A15537"},
20
+ {beforeRunningCommand: "saveActiveFile",
21
+ command:
22
+ "export APP=`find_app Scilab-4.1.app`\nLAUNCHER=$APP/Contents/Resources/launcher.sh\nif [ -x \"$LAUNCHER\" ]\nthen\n\tDIRECTORY=`echo \"$TM_DIRECTORY\" | sed -e \"s/'/''/g\" -e \"s/\\\"/\\\"\\\"/g\"`\n\tFILEPATH=`echo \"$TM_FILEPATH\" | sed -e \"s/'/''/g\" -e \"s/\\\"/\\\"\\\"/g\"`\n\techo \"cd('$DIRECTORY'); getd('$DIRECTORY'); exec('$FILEPATH');\" > /tmp/scilab.sce\n\t$LAUNCHER -f /tmp/scilab.sce\nelse\n\techo \"Scilab 4.1 not found.\"\n\techo \"Please copy Scilab-4.1.app to the Applications directory.\"\nfi\n",
23
+ input: "none",
24
+ keyEquivalent: "@R",
25
+ name: "Run Script (with getd)",
26
+ output: "showAsTooltip",
27
+ scope: "source.scilab",
28
+ uuid: "FCD467AA-0FAF-4B63-A613-E7175B80709A"}]
@@ -0,0 +1,20 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "head -n$((TM_LINE_NUMBER-1))|tail -n1|sed 's/./-/g'|tail -c +$((TM_LINE_INDEX+1))",
6
+ input: "document",
7
+ name: "Subheading",
8
+ output: "insertAsSnippet",
9
+ scope: "text.setext",
10
+ tabTrigger: "-",
11
+ uuid: "95C6ECD1-69B9-4EB9-840B-C7753C226306"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "head -n$((TM_LINE_NUMBER-1))|tail -n1|sed 's/./=/g'|tail -c +$((TM_LINE_INDEX+1))",
15
+ input: "document",
16
+ name: "Title",
17
+ output: "insertAsSnippet",
18
+ scope: "text.setext",
19
+ tabTrigger: "=",
20
+ uuid: "8E5BEE2D-01D5-455A-A576-044DCC1243AA"}]
@@ -0,0 +1,59 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "#!/bin/bash\nword=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}\n\ntry_help () {\n\tif help \"$word\" &>/dev/null; then\n\t\tsource \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\n\t\thtml_header \"Documentation for \\\"$word\\\"\"\n\t\thelp \"$word\" | pre\n\t\thtml_footer\n\t\texit_show_html\n\telif man -w \"$word\" &>/dev/null; then\n\t\tpage=$(\"$TM_SUPPORT_PATH/bin/html_man.sh\" -a \"$word\")\n\t\techo \"<meta http-equiv='Refresh' content='0;URL=tm-file://$page'>\"\n\t\texit_show_html\n\tfi\n}\n\nMANSECT=${MANSECT:-2:3:4:5:6:7:8:9} try_help\ntry_help\n\necho \"Couldn’t find documentation for “${word}”\"\n",
6
+ dontFollowNewOutput: true,
7
+ fallbackInput: "word",
8
+ input: "selection",
9
+ keyEquivalent: "^h",
10
+ name: "Documentation for Word / Selection",
11
+ output: "showAsTooltip",
12
+ uuid: "776163E4-730B-11D9-BCD0-000D93589AF6"},
13
+ {beforeRunningCommand: "saveActiveFile",
14
+ command:
15
+ "#!/bin/bash\nif chmod +x \"${TM_FILEPATH}\" && [[ -x \"${TM_FILEPATH}\" ]]\n then echo \"${TM_FILEPATH} is now executable\"\n else echo \"Failed making ${TM_FILEPATH} executable\"\nfi",
16
+ input: "none",
17
+ keyEquivalent: "^@X",
18
+ name: "Make Script Executable",
19
+ output: "showAsTooltip",
20
+ uuid: "200ED3B8-A64B-11D9-B384-000D93382786"},
21
+ {beforeRunningCommand: "nop",
22
+ command:
23
+ "#!/bin/bash\nNAME=\"$(cat)\"\nif [[ -z \"$NAME\" ]]; then\n\tNAME='${1:function_name}'\nfi\n\ncat <<SNIPPET\nfunction $NAME () {\n\t\\${0:#statements}\n}\nSNIPPET",
24
+ fallbackInput: "word",
25
+ input: "selection",
26
+ keyEquivalent: "$\n",
27
+ name: "New Function",
28
+ output: "insertAsSnippet",
29
+ scope: "source.shell",
30
+ tabTrigger: "fun",
31
+ uuid: "74ED8466-F6E5-48F8-8063-E252C2A36353"},
32
+ {beforeRunningCommand: "nop",
33
+ command:
34
+ "#!/usr/bin/env ruby -wKU\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'\n\ndef find_directory\n files = [ ENV['TM_SELECTED_FILE'], ENV['TM_FILEPATH'], ENV['TM_DIRECTORY'], ENV['TM_PROJECT_DIRECTORY'], ENV['HOME'] ]\n res = files.find { |file| file && File.exists?(file) }\n res && File.file?(res) ? File.split(res).first : res\nend\n\ndef is_running(process)\n all = `ps -U \"$USER\" -o ucomm`\n all.to_a[1..-1].find { |cmd| process == cmd.strip }\nend\n\ndef terminal_script(dir)\n return <<-APPLESCRIPT\n tell application \"Terminal\"\n activate\n do script \"cd \#{e_as(e_sh(dir))}; clear; pwd\"\n end tell\nAPPLESCRIPT\nend\n\ndef iterm_script(dir)\n return <<-APPLESCRIPT\n tell application \"iTerm\"\n activate\n if exists the first terminal then\n set myterm to the first terminal\n else\n set myterm to (make new terminal)\n end if\n tell myterm\n activate current session\n launch session \"Default Session\"\n tell the last session\n write text \"cd \#{e_as(e_sh(dir))}; clear; pwd\"\n end tell\n end tell\n end tell\nAPPLESCRIPT\nend\n\nif dir = find_directory\n script = nil\n if ENV['TM_TERMINAL'] =~ /^iterm$/i || is_running('iTerm')\n script = iterm_script(dir)\n else\n script = terminal_script(dir)\n end\n open(\"|osascript\", \"w\") { |io| io << script }\nend\n",
35
+ input: "none",
36
+ keyEquivalent: "^O",
37
+ name: "Open Terminal",
38
+ output: "discard",
39
+ uuid: "54CDB56E-85EA-11D9-B369-000A95E13C98"},
40
+ {autoScrollOutput: 1,
41
+ beforeRunningCommand: "nop",
42
+ command:
43
+ "#!/usr/bin/env ruby\n\nrequire ENV[\"TM_SUPPORT_PATH\"] + \"/lib/tm/executor\"\nrequire ENV[\"TM_SUPPORT_PATH\"] + \"/lib/tm/save_current_document\"\n\nTextMate.save_current_document\nTextMate::Executor.make_project_master_current_document\n\nTextMate::Executor.run(ENV[\"TM_SHELL\"] || ENV[\"SHELL\"] || \"bash\", ENV[\"TM_FILEPATH\"])",
44
+ input: "document",
45
+ keyEquivalent: "@r",
46
+ name: "Run Script",
47
+ output: "showAsHTML",
48
+ scope: "source.shell",
49
+ uuid: "7207ACC2-A64B-11D9-B384-000D93382786"},
50
+ {beforeRunningCommand: "nop",
51
+ command:
52
+ "#!/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",
53
+ fallbackInput: "scope",
54
+ input: "selection",
55
+ keyEquivalent: "^\"",
56
+ name: "Toggle Backticks",
57
+ output: "replaceSelectedText",
58
+ scope: "source.shell string.interpolated",
59
+ uuid: "3602A889-81F7-422B-BC0E-3FB0543CEA9C"}]
@@ -0,0 +1,9 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command: "cd $TM_DIRECTORY ; $TM_FILEPATH",
5
+ input: "selection",
6
+ name: "Run Script",
7
+ output: "replaceSelectedText",
8
+ scope: "source.slate",
9
+ uuid: "2E994C2A-2589-4198-8627-F0B82A8B594E"}]
@@ -0,0 +1,84 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "#!/usr/bin/env ruby\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 equal 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# 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\n\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\nif selected_text then\n block_top = 1\n block_bottom = lines.length\nelse\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\nend\n\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\nbest_column = 0\nblock_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\nend\n\n \n#\n# Reformat the block. Again, we cannot assume all lines in the \n# block are relevant.\n\nblock_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 end\nend\n\n\n#\n# Output the replacement text\n\nlines.each do |line|\n puts line\nend\n",
6
+ input: "selection",
7
+ keyEquivalent: "~@]",
8
+ name: "Align Assignments",
9
+ output: "replaceSelectedText",
10
+ uuid: "FCBE2215-19CA-470A-8D92-BB0D00491D62"},
11
+ {beforeRunningCommand: "nop",
12
+ command:
13
+ "#!/usr/bin/env ruby\n\n# by James Edward Gray II <james (at) grayproductions.net>\n\n# \n# To override the operation of this commond for your language add a Preferences\n# bundle item that defines the following valiables as appropriate for your\n# language:\n# \n# TM_COMMENT_START - the character string that starts comments, e.g. /*\n# TM_COMMENT_END - the character string that ends comments (if appropriate),\n# e.g. */\n# TM_COMMENT_MODE - the type of comment to use - either 'line' or 'block'\n# \n\nrequire \"\#{ENV[\"TM_SUPPORT_PATH\"]}/lib/escape\"\n\ndef out(*args)\n print( *args.map do |arg|\n escaped = e_sn(arg)\n $selected ? escaped.gsub(\"}\", \"\\\\}\") : escaped.sub(\"\\0\", \"${0}\")\n end )\nend\n\n# find all available comment variables\nvar_suffixes = [\"\"]\n2.upto(1.0/0.0) do |n|\n if ENV.include? \"TM_COMMENT_START_\#{n}\"\n var_suffixes << \"_\#{n}\"\n else\n break\n end\nend\n\ntext = STDIN.read\ndefault = nil # the comment we will insert, if none are removed\n\n# maintain selection\nif text == ENV[\"TM_SELECTED_TEXT\"]\n $selected = true\n print \"${0:\"\n at_exit { print \"}\" }\nelse\n $selected = false\nend\n\n# try a removal for each comment...\nvar_suffixes.each do |suffix|\n # build comment\n com = { :start => ENV[\"TM_COMMENT_START\#{suffix}\"] || \"# \",\n :end => ENV[\"TM_COMMENT_END\#{suffix}\"] || \"\",\n :mode => ENV[\"TM_COMMENT_MODE\#{suffix}\"] ||\n (ENV[\"TM_COMMENT_END\#{suffix}\"] ? \"block\" : \"line\"),\n :no_indent => ENV[\"TM_COMMENT_DISABLE_INDENT\#{suffix}\"] }\n \n com[:esc_start], com[:esc_end] = [com[:start], com[:end]].map do |str|\n str.gsub(/[\\\\|()\\[\\].?*+{}^$]/, '\\\\\\\\\\&').\n gsub(/\\A\\s+|\\s+\\z/, '(?:\\&)?')\n end\n \n # save the first one as our insertion default\n default = com if default.nil?\n \n # try a removal\n case com[:mode]\n when \"line\" # line by line comment\n if text !~ /\\A[\\t ]+\\z/ &&\n text.send(text.respond_to?(:lines) ? :lines : :to_s).\n map { |l| !!(l =~ /\\A\\s*(\#{com[:esc_start]}|$)/) }.uniq == [true]\n if $selected\n out text.gsub( /^(\\s*)\#{com[:esc_start]}(.*?)\#{com[:esc_end]}(\\s*)$/,\n '\\1\\2\\3' )\n exit\n else\n r = text.sub( /^(\\s*)\#{com[:esc_start]}(.*?)\#{com[:esc_end]}(\\s*)$/,\n '\\1\\2\\3' )\n i = ENV[\"TM_LINE_INDEX\"].to_i\n i = i > text.index(/\#{com[:esc_start]}/) ?\n [[0, i - com[:start].length].max, r.length].min :\n [i, r.length].min\n r[i, 0] = \"\\0\"\n out r\n exit\n end\n end\n when \"block\" # block comment\n regex = /\\A(\\s*)\#{com[:esc_start]}(.*?)\#{com[:esc_end]}(\\s*)\\z/m\n if text =~ regex\n if $selected\n out text.sub(regex, '\\1\\2\\3')\n exit\n else\n r = text.sub(regex, '\\1\\2\\3')\n i = ENV[\"TM_LINE_INDEX\"].to_i\n i = i > text.index(/\#{com[:esc_start]}/) ?\n [[0, i - com[:start].length].max, r.length].min :\n [i, r.length].min\n r[i, 0] = \"\\0\"\n out r\n exit\n end\n end\n end\nend\n\n# none of our removals worked, so preform an insert (minding indent setting)\ntext[ENV[\"TM_LINE_INDEX\"].to_i, 0] = \"\\0\" unless $selected or text.empty?\ncase default[:mode]\nwhen \"line\" # apply comment line by line\n if text.empty?\n out \"\#{default[:start]}\\0\#{default[:end]}\"\n elsif default[:no_indent]\n out text.gsub(/^.*$/, \"\#{default[:start]}\\\\&\#{default[:end]}\")\n elsif text =~ /\\A([\\t ]*)\\0([\\t ]*)\\z/\n out text.gsub(/^.*$/, \"\#{$1}\#{default[:start]}\#{$2}\#{default[:end]}\")\n else\n indent = text.scan(/^[\\t \\0]*(?=\\S)/).\n min { |a, b| a.length <=> b.length } || \"\"\n text.send(text.respond_to?(:lines) ? :lines : :to_s).map do |line|\n if line =~ /^(\#{indent})(.*)$(\\n?)/ then\n out $1 + default[:start] + $2 + default[:end] + $3\n elsif line =~ /^(.*)$(\\n?)/ then\n out indent + default[:start] + $1 + default[:end] + $2\n end\n end\n end\nwhen \"block\" # apply comment around selection\n if text.empty?\n out default[:start]\n print \"${0}\"\n out default[:end]\n elsif text =~ /\\A([\\t ]*)\\0([\\t ]*)\\z/\n out $1, default[:start]\n print \"${0}\"\n out $2, default[:end]\n elsif default[:no_indent]\n out default[:start], text, default[:end]\n else\n lines = text.to_a\n if lines.empty?\n out default[:start], default[:end]\n else\n lines[-1].sub!(/^(.*)$/, \"\\\\1\#{default[:end]}\")\n out lines.shift.sub(/^([\\s\\0]*)(.*)$/, \"\\\\1\#{default[:start]}\\\\2\")\n out(*lines) unless lines.empty?\n end\n end\nend\n",
14
+ fallbackInput: "line",
15
+ input: "selection",
16
+ keyEquivalent: "@/",
17
+ name: "Comment Line / Selection",
18
+ output: "insertAsSnippet",
19
+ uuid: "73EAE95D-A09C-4FC2-B4E3-42505678B57E"},
20
+ {beforeRunningCommand: "saveActiveFile",
21
+ command:
22
+ "#!/usr/bin/env ruby\n\n# This is a little more convoluted than it needs to be\n# just to ensure that we can do an OK job on really long\n# files. Frankly, it's probably all for nothing given\n# that we likely have plenty of memory, and that Ruby will\n# probably go an cache a whole chunk of the file somewhere in\n# the IO pipeline anyway - but we like to make the effort.\n\nspacing = nil\nlines = Array.new()\nline = $stdin.gets()\nwhile(line != nil)\n\tlines << line\n\tif(line =~ /^\\t/) # mixed tabs with spaces, use TM's tab setting\n\t\tspacing = ENV['TM_TAB_SIZE']\n\t\tbreak\n\telsif(line =~ /^[ ]+\\S/)\n\t\tspacing = line[/^([ ]+)\\S/, 1].length\n\t\tbreak\n\tend\n\n\tline = $stdin.gets()\nend\n\nif(spacing != nil)\n\tfp = IO.popen(\"cat \\\"\#{ENV['TM_FILEPATH']}\\\" | unexpand -t \#{spacing}\", \"r\")\n\tline = fp.gets()\n\twhile(line != nil)\n\t\tprint line\n\t\tline = fp.gets\n\tend\nelse\n\tlines.each() { |line|\n\t\tprint line\n\t}\n\n\tline = $stdin.gets()\n\twhile(line != nil)\n\t\tprint line\n\t\tline = $stdin.gets()\n\tend\nend\n",
23
+ input: "document",
24
+ keyEquivalent: "^@T",
25
+ name: "Convert Spaces to Tabs (Estimating Indent)",
26
+ output: "replaceDocument",
27
+ uuid: "0526D870-BE98-4931-8DBF-FDD3D405BB1B"},
28
+ {beforeRunningCommand: "nop",
29
+ command:
30
+ "#!/usr/bin/env ruby -wKU\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/exit_codes.rb'\n\ndef find_markers\n 10.times do |n|\n start = ENV[\"TM_COMMENT_START\#{\"_\#{n}\" if n > 0}\"].to_s.strip\n stop = ENV[\"TM_COMMENT_END\#{\"_\#{n}\" if n > 0}\"].to_s.strip\n return start, stop if not start.empty? and not stop.empty?\n end\n TextMate.exit_show_tool_tip \"No block comment markers found for this language.\"\nend\n\nstart, stop = find_markers\ninput = STDIN.read.to_s\n\nif input =~ /\\n/\n start << \"\\n\"\n stop << \"\\n\"\nend\n\nSTDOUT << e_sn(start) << (input.empty? ? \"\\n\\t$0\\n\" : e_sn(input)) << e_sn(stop)\n",
31
+ fallbackInput: "none",
32
+ input: "selection",
33
+ keyEquivalent: "~@/",
34
+ name: "Insert Block Comment",
35
+ output: "insertAsSnippet",
36
+ uuid: "83560C23-63E2-4920-8E26-7EAC5FE86B2F"},
37
+ {beforeRunningCommand: "nop",
38
+ command:
39
+ "#!/usr/bin/env ruby\n\n#\n# Notes:\n#\n# '(c)' is legally ambiguous. '©' is not ambiguous, but may cause problems for some compilers.\n# The copyright symbol is redundant if the word 'Copyright' is present, so it's safe to omit it\n# entirely.\n#\n\nfile_placeholder = '${1:«file»}'\nproject_placeholder = '${2:«project»}'\n\ntm_filename\t\t= ENV['TM_FILENAME']\t\t\t|| file_placeholder\ntm_project_dir\t= ENV['TM_PROJECT_DIRECTORY']\t|| ''\ncomment_start \t= ENV['TM_COMMENT_START']\t\t|| ''\ncomment_end\t\t= ENV['TM_COMMENT_END'] \t\t|| ''\ncopyright_holder\t= ENV['TM_ORGANIZATION_NAME']\n\nproject = case tm_project_dir\nwhen /.*\\/(.*)/\n\tproject = Regexp.last_match(1)\nelse\n\tproject_placeholder\nend\n\n# use line comments?\nline_comment\t= ''\nindent\t\t= ' ' * (comment_start.length + 1)\n\nif comment_end.empty?\n\tline_comment = comment_start\n\tcomment_start = ''\n\tcomment_end = ''\n\tindent = ' '\nend\n\nusername\t= ENV['TM_FULLNAME']\ndate\t\t= `date +%Y-%m-%d`.chomp\n\n# Default to username if no organization name\ncopyright_holder ||= username\n\nprint %Q{\#{line_comment}\#{comment_start}\n\#{line_comment}\#{indent}\#{tm_filename}\n\#{line_comment}\#{indent}\#{project}\n\#{line_comment}\#{indent}\n\#{line_comment}\#{indent}Created by \#{username} on \#{date}.\n\#{line_comment}\#{indent}Copyright \#{`date +%Y`.chomp} \#{copyright_holder}. All rights reserved.\n\#{line_comment}\#{comment_end}\n$0}\n",
40
+ input: "none",
41
+ name: "Insert Comment Header",
42
+ output: "insertAsSnippet",
43
+ tabTrigger: "head",
44
+ uuid: "3050DE46-2337-476A-B733-8063B61ECB63"},
45
+ {beforeRunningCommand: "nop",
46
+ command:
47
+ "#!/usr/bin/env ruby\n\n$LOAD_PATH << \"\#{ENV[\"TM_SUPPORT_PATH\"]}/lib\"\nrequire \"escape\"\nrequire \"exit_codes\"\n\nctext = STDIN.read\nif ctext =~ /^\\s*(.[^\\s\\w\\\\]*\\s*)/\n cstring = $1\nelse\n TextMate.exit_show_tool_tip(\"Unable to determine comment character.\")\nend\n\nflags = %Q{-p \"\#{cstring}\"}\nflags += \" --retabify\" unless ENV[\"TM_SOFT_TABS\"] == \"YES\"\n\ncommand = \"ruby \#{e_sh(ENV[\"TM_BUNDLE_SUPPORT\"])}/bin/rubywrap.rb \#{flags}\"\ntext = open(\"| \#{command}\", \"r+\") do |wrapper|\n wrapper << ctext\n wrapper.close_write\n wrapper.read\nend\n\nprint e_sn(text)\n",
48
+ fallbackInput: "scope",
49
+ input: "selection",
50
+ keyEquivalent: "^q",
51
+ name: "Reformat Comment",
52
+ output: "insertAsSnippet",
53
+ scope: "comment.line",
54
+ uuid: "F20AD964-3C68-4940-91B1-8A99B8E2A375"},
55
+ {beforeRunningCommand: "nop",
56
+ command:
57
+ "#!/usr/bin/env ruby\n\nprint case str = STDIN.read\n when /\\A\"(.*)\"\\z/m; \"'\" + $1 + \"'\"\n when /\\A'(.*)'\\z/m; '\"' + $1 + '\"'\n else str\nend\n",
58
+ fallbackInput: "scope",
59
+ input: "selection",
60
+ keyEquivalent: "^\"",
61
+ name: "Toggle Single / Double String Quotes",
62
+ output: "replaceSelectedText",
63
+ scope: "string.quoted.single, string.quoted.double",
64
+ uuid: "70A0BC8E-98E0-4D14-B004-7ACA9162B496"},
65
+ {beforeRunningCommand: "nop",
66
+ command:
67
+ "#!/usr/bin/env ruby\n\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/exit_codes'\n\n# Test Cases\n# \n# AFooBar -> a_foo_bar -> aFooBar -> AFooBar\n# URLString -> url_string -> urlString -> UrlString\n# TestURLString -> test_url_string -> testUrlString -> TestUrlString\n# test -> Test -> test\n# test_URL_STRING -> testUrlString -> TestUrlString -> test_url_string\n\n\n# HotFlamingCats -> hot_flaming_cats\ndef pascalcase_to_snakecase(word)\n\tword.gsub(/\\B([A-Z])(?=[a-z0-9])|([a-z0-9])([A-Z])/, '\\2_\\+').downcase\nend\n\n# hot_flaming_cats -> hotFlamingCats\ndef snakecase_to_camelcase(word)\n word.gsub(/_([^_]+)/) { $1.capitalize }\nend\n\n# hotFlamingCats -> HotFlamingCats\ndef camelcase_to_pascalcase(word)\n\tword.gsub(/^\\w{1}/) {|c| c.upcase}\nend\n\nword = $stdin.gets\n\nTextMate.exit_discard if word.nil?\n\nis_pascal = word.match(/^[A-Z]{1}/) ? true : false\nis_snake = word.match(/_/) ? true : false\n\nif is_pascal then\n\tprint pascalcase_to_snakecase(word)\nelsif is_snake then\n\tprint snakecase_to_camelcase(word)\nelse\n\tprint camelcase_to_pascalcase(word) \nend\n",
68
+ fallbackInput: "word",
69
+ input: "selection",
70
+ keyEquivalent: "^_",
71
+ name: "Toggle camelCase / snake_case / PascalCase",
72
+ output: "replaceSelectedText",
73
+ scope: "source",
74
+ uuid: "6065BB2D-242A-4C3D-B523-6F560D65AC11"},
75
+ {beforeRunningCommand: "nop",
76
+ command:
77
+ "#!/usr/bin/env ruby\n\ntermchar = ENV['TM_LINE_TERMINATOR'] || \";\"\n\n# short for escape_snippet - escapes special snippet characters in str\ndef es(str)\n\tstr.to_s.gsub(/([$`\\\\])/, \"\\\\\\\\\\\\1\")\nend\n\nprint es($stdin.read()[/^(.*?);*\\s*$/, 1]) + \"\#{es(termchar)}$0\"",
78
+ fallbackInput: "line",
79
+ input: "selection",
80
+ keyEquivalent: "~@\n",
81
+ name: "and Insert Terminator",
82
+ output: "insertAsSnippet",
83
+ scope: "source",
84
+ uuid: "CA1849DD-D6EC-415D-8788-DD93BE027F6D"}]