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,38 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "require_cmd \"${TM_SML:=sml}\"\necho \"CM.make \\\"sources.cm\\\";\"|\"$TM_SML\"|pre",
6
+ input: "none",
7
+ keyEquivalent: "^R",
8
+ name: "Build CM",
9
+ output: "showAsHTML",
10
+ scope: "source.ml",
11
+ uuid: "1EA6E877-4B4E-44EC-9118-9295A0F1432D"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "if [[ -d \"$TM_SMLNJ_HOME/base/system\" ]]; then\n cd \"$TM_SMLNJ_HOME/base/system\"\n make\nelse\n echo \"No such folder: $TM_SMLNJ_HOME/base/system\"\nfi\n",
15
+ input: "none",
16
+ keyEquivalent: "@b",
17
+ name: "Build SML",
18
+ output: "showAsHTML",
19
+ scope: "source.ml",
20
+ uuid: "0E144686-095D-4B69-94D0-6E0ECA41C90D"},
21
+ {beforeRunningCommand: "nop",
22
+ command:
23
+ "ruby -- \"$TM_SUPPORT_PATH/bin/checknest.rb\" '(?x) (functor|structure) (.+) = (?=\\s*struct)' 'end' 'end (* $1 $2 *)' -n$TM_LINE_NUMBER",
24
+ input: "document",
25
+ keyEquivalent: "~@.",
26
+ name: "Close Module Decl",
27
+ output: "afterSelectedText",
28
+ scope: "source.ml",
29
+ uuid: "C008E916-56AE-4310-9C05-D3070AAF1CF8"},
30
+ {autoScrollOutput: true,
31
+ beforeRunningCommand: "nop",
32
+ command: "require_cmd \"${TM_SML:=sml}\"\n\"$TM_SML\"|pre",
33
+ input: "selection",
34
+ keyEquivalent: "@r",
35
+ name: "Run in SML",
36
+ output: "showAsHTML",
37
+ scope: "source.ml",
38
+ uuid: "18819157-C273-4649-9013-3A2705993795"}]
@@ -0,0 +1,181 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" -r \"$TM_SUPPORT_PATH/lib/shelltokenize.rb\" <<END\n\tsvn = ENV['TM_SVN'] || \"svn\"\n\tputs %x{\#{svn} add \#{TextMate.selected_paths_for_shell}}\nEND",
6
+ input: "none",
7
+ keyEquivalent: "^A",
8
+ name: "Add to Repository",
9
+ output: "showAsTooltip",
10
+ uuid: "CB149C8E-74CD-11D9-813D-000A95A89C98"},
11
+ {beforeRunningCommand: "nop",
12
+ command:
13
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nexport LANG='EN'\n\"$TM_SVN\" blame -v \"$TM_FILEPATH\" 2>&1 \\\n|\"${TM_RUBY:-ruby}\" -- \"${TM_BUNDLE_SUPPORT}/format_blame.rb\"",
14
+ dontFollowNewOutput: true,
15
+ input: "none",
16
+ keyEquivalent: "^A",
17
+ name: "Blame",
18
+ output: "showAsHTML",
19
+ uuid: "37113D20-778A-11D9-B053-0011242E4184"},
20
+ {beforeRunningCommand: "saveModifiedFiles",
21
+ command:
22
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nrequire_cmd \"${TM_RUBY:=ruby}\" \"We need Ruby to proceed.\"\n\nexport TM_RUBY\nexport TM_SVN\nexport CommitWindow=\"$TM_SUPPORT_PATH/bin/CommitWindow.app/Contents/MacOS/CommitWindow\"\n\ncd \"${TM_PROJECT_DIRECTORY:-$TM_DIRECTORY}\"\n\"${TM_RUBY:-ruby}\" -- \"${TM_BUNDLE_SUPPORT}/svn_commit.rb\" &> /dev/console &\n",
23
+ input: "none",
24
+ keyEquivalent: "^A",
25
+ name: "Commit…",
26
+ output: "discard",
27
+ uuid: "5F2BCB27-7A5B-11D9-A61B-000A95A89C98"},
28
+ {beforeRunningCommand: "nop",
29
+ command:
30
+ "if [[ -n \"$TM_SELECTED_FILE\" && -d \"$TM_SELECTED_FILE\" ]]\n then cd \"$TM_SELECTED_FILE\"\n else cd \"${TM_PROJECT_DIRECTORY:-$TM_DIRECTORY}\"\nfi\n\n\"${TM_SVN:-svn}\" diff --diff-cmd diff",
31
+ input: "none",
32
+ name: "Diff Selected Files With Working Copy (BASE)",
33
+ output: "openAsNewDocument",
34
+ uuid: "18D4CF4B-2363-412E-B396-6E33868B2EE4"},
35
+ {beforeRunningCommand: "nop",
36
+ command:
37
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n#!/usr/bin/env ruby -w\n\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/svn_diff\"\n\nSubversion::diff_active_file('BASE', \"Diff With Working Copy\")\nEND",
38
+ input: "none",
39
+ keyEquivalent: "^A",
40
+ name: "Diff With Working Copy (BASE)",
41
+ output: "openAsNewDocument",
42
+ uuid: "11D4D7C2-7665-11D9-B58C-000A95A89C98"},
43
+ {beforeRunningCommand: "nop",
44
+ command:
45
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"Subversion Help\" \"Subversion\"\n\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<'EOF'\n\nThis document describes the commands of the TextMate Subversion bundle and how you can fine-tune their behavior. For general Subversion help and tutorial, you should read the [Subversion book](http://svnbook.red-bean.com/ \"Version Control with Subversion\").\n\n# Command Reference\n\n## Adding, Removing, Updating, Committing\n\nThese commmands operate on the selected files/folders in the project, or the active file if it doesn't belong to a project.\n\n*\t__Add to Repository__\n\n\tSchedules the targets for addition to the repository.\n\n*\t__Remove From Repository&hellip;__\n\n\tSchedules the targets for removal from the repository.\n\n*\t__Revert__\n\n\tReverts the file to the base revision. Any modifications to the file will be lost.\n\n*\t__Update to Newest__\n\n\tUpdates the targets with the newest changes from the repository.\n\n*\t__Commit__\n\n\tCommits your changed files to the repository. A dialog asks you for the description of\n\tyour changes; you may also choose to exclude files from the commit by unchecking them.\n\tIf no files are selected or active, this command does nothing. If the target files\n\thave no local changes, nothing happens.\n\n## Information, Logs, Status\n\n*\t__Blame__\n\n\tDisplays a line-by-line history of the active file, showing you who wrote which line in what revision.\t 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 [adjustable](#tm_svn_date_format). Requires access to the repository.\n\n*\t__Info__\n\n\tDisplays detailed information about the selected files, including the type of file, who last changed the file, the date file was last changed, the repository URL to the file, and other information. Does not require access to the repository.\n\n\tSome parameters are configurable via shell variables; see the [Configuration Options](#tm_svn_info) section below.\n\n*\t__Log__\n\t\n\tDisplays the commit message history for the selected files.\n\tSome parameters are configurable via shell variables; see the [Configuration Options](#tm_svn_log) section below.\n\t\n*\t__View Revision&hellip;__\n\n\tDisplays a different revision of the active file. This command presents you with a list of revisions to choose from.\n\n*\t__Status__\n\n\tDisplays the modification status for each of the selected files/folders, or for the active file's directory if there is no project.\n\tDoes not access the repository.\n\n## Comparing Revisions\n\nThese commands operate on the active file.\n\n*\t__Diff Revisions&hellip;__\n\t\n\tDisplays the differences between two specific revisions of the active file. You will be presented with a list of revisions; please select two.\n\t\n*\t__Diff With Newest (HEAD)__\n\t\n\tDisplays the differences between the active file and the newest available revision of the file on the server.\n\tEquivalent to `svn diff -rHEAD`.\n\t\n*\t__Diff With Working Copy (BASE)__\n\t\n\tDisplays the differences between the active file and an unaltered, pristine copy of the file at the same revision.\n\tEquivalent to `svn diff -rBASE`.\n\t\n*\t__Diff With Previous Revision (PREV)__\n\t\n\tDisplays the differences between the active file and the previous revision of the file.\n\tEquivalent to `svn diff -rPREV`.\n\t\n*\t__Diff With Revision&hellip;__\n\t\n\tDisplays the differences between the active file and a different revision of the same file. This command presents you with a list of revisions to choose from.\n\t\n## Merging Revisions\n\n*\t__Show Available Revisions for Merging__\n\n\tDisplay revisions that can be merged into a selected folder in a project. This command requires the [`svnmerge.py`](http://www.orcaware.com/svn/wiki/Svnmerge.py \"svnmerge.py is a tool for automatic branch management\") script to be installed and for merge tracking to have been previously initiated.\n\n*\t__Resolve Conflicts With FileMerge&hellip;__\n\n\tOpens the active file in FileMerge. This command sets up FileMerge to facilitate conflict resolution.\n\n*\t__Resolved__\n\n\tRemoves conflict-related artifact files for the selected file, allowing the file to be committed after you have fixed the conflicts. Does not remove conflict markers or resolve conflicts itself.\n\n## Check Out\n\n*\t__Check Out&hellip;__\n\t\n\tCheck out a local working copy of a repository directory. Asks for a path to the repository directory to check out.\n\n# Configuration Options\n\nThese shell variables allow you to tweak the behavior of the certain commands if need be. The default values should make sense for normal use. Learn [how to set these variables](?static_variables).\n\n## Tools\n\n*\t`$TM_SVN` (default: `svn`)\n\t\n\tthe path to your svn executable. Must be reachable either as an absolute path or as a relative path from the shell PATH environment variable.\n\t\n*\t`$TM_SVNMERGE` (default: `svnmerge`)\n\t\n\tthe path to your svnmerge.py script.\n\t\n*\t`$TM_RUBY` (default: `ruby`)\n\t\n\tHere you can tweak with what Ruby the formatting scripts will be executed.\n\t\n*\t`$TM_SVN_DIFF_CMD` (default: not set)\n\t\n\tAllows you to set a command that should be used to present file differences. If you want use Apple’s FileMerge application, use [`fmdiff`](http://ssel.vub.ac.be/ssel/internal:fmdiff).\n\n## Date Format\n\n*\t<a name=\"tm_svn_date_format\">`$TM_SVN_DATE_FORMAT`</a> (default: not set&mdash;no changes, just show what SVN shows)\n\t\n\tA date format string that allows you to tweak the format in which Blame, Log and Info show you dates.\t \n\tSee [strftime(3)](http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/strftime.3.html \"man page for strftime(3)\") for what you can enter here.\n\n## Blame, Info, and Log Options\n\n*\t`$TM_SVN_CLOSE` (default: false)\n\t\n\tAdjust whether the windows of Blame and Info close when 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\t\n*\t<a name=\"tm_svn_log\">`$TM_SVN_LOG_RANGE`</a> (default: `BASE:1`)\n\t\n\tThe default range to query for log messages.\n\t\n*\t`$TM_SVN_LOG_LIMIT` (default: 15)\n\t\n\tThe number of messages to show.\t 0 means no limit.\n\n*\t<a name=\"tm_svn_info\">`$TM_SVN_INFO_HIDE`</a> (default: nothing)\n\n\tHere you can adjust what keys of the info stream you don't want to see, it is case insensitive and a comma (,) separated list.\n\tIf you enter a `*`, it is assumed that you want to hide all vars, if so, you can make some values visible again with `$TM_SVN_INFO_SHOW`.\n\n*\t`$TM_SVN_INFO_SHOW` (default: everything else)\n\n\tThis is also a comma separated list of keys, it just makes sense if you did hide all with the above var.\n\t`*` has no special meaning here. Everything you enter here will be shown if you want to hide everything else.\n\n*\t`$TM_SVN_IGNORE_BAD_LINES` (default: not set)\n\n\tBy setting this variable, Log will not print unexpected text that may appear at the beginning of Subversion's output. This could be useful if you frequently see this output but you deem it safe to ignore.\n\nEOF\n",
46
+ dontFollowNewOutput: true,
47
+ input: "none",
48
+ keyEquivalent: "^A",
49
+ name: "Help",
50
+ output: "showAsHTML",
51
+ uuid: "0CE6FB29-8467-11D9-ABBA-0011242E4184"},
52
+ {beforeRunningCommand: "nop",
53
+ command:
54
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n: ${TM_RUBY:=ruby}\nFORMAT_INFO=\"${TM_BUNDLE_SUPPORT}/format_info.rb\"\n\nif [[ -z $TM_SELECTED_FILES ]]; then\n \"$TM_SVN\" info \"$TM_FILEPATH\" 2>&1 \\\n |\"$TM_RUBY\" -- \"$FORMAT_INFO\"\nelse\n eval \"$TM_SVN\" info \"$TM_SELECTED_FILES\" 2>&1 \\\n |\"$TM_RUBY\" -- \"$FORMAT_INFO\"\nfi",
55
+ dontFollowNewOutput: true,
56
+ input: "none",
57
+ keyEquivalent: "^A",
58
+ name: "Info",
59
+ output: "showAsHTML",
60
+ uuid: "56BE2092-806D-11D9-A0FB-0011242E4184"},
61
+ {beforeRunningCommand: "nop",
62
+ command:
63
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n: ${TM_RUBY:=ruby}\n: ${TM_SVN_LOG_RANGE:=HEAD:1}\n: ${TM_SVN_LOG_LIMIT:=15}\nFORMAT_LOG=\"${TM_BUNDLE_SUPPORT}/format_log_xml.rb\"\n\nif [[ $TM_SVN_LOG_LIMIT -eq 0 ]]; then\n\tLIMIT=\"\"\nelse\n\tLIMIT=\"--limit $TM_SVN_LOG_LIMIT\"\nfi\n\nif [[ -z $TM_SELECTED_FILES ]]; then\n \"$TM_SVN\" log --xml $LIMIT -vr \"$TM_SVN_LOG_RANGE\" \\\n \"$TM_FILEPATH\" 2>&1 | \"$TM_RUBY\" -- \"$FORMAT_LOG\"\nelse\n eval \"$TM_SVN\" log --xml $LIMIT -vr \"$TM_SVN_LOG_RANGE\" \\\n \"$TM_SELECTED_FILES\" 2>&1 | \"$TM_RUBY\" -- \"$FORMAT_LOG\"\nfi",
64
+ dontFollowNewOutput: true,
65
+ input: "none",
66
+ keyEquivalent: "^A",
67
+ name: "Log",
68
+ output: "showAsHTML",
69
+ uuid: "55048B05-38AA-4B6C-A83C-7F6190F53B6C"},
70
+ {beforeRunningCommand: "nop",
71
+ command:
72
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nif [[ -z \"$TM_SELECTED_FILES\" && -z $TM_FILEPATH ]]; then\n exit_show_tool_tip \"No files selected.\"\nfi\n\nfile_list () {\n if [[ -n \"$TM_SELECTED_FILES\" ]]; then\n eval arr=(\"$TM_SELECTED_FILES\")\n for (( i = 0; i < ${#arr[@]}; i++ )); do\n FILE=\"${arr[$i]}\"\n echo \"${FILE#\#$TM_PROJECT_DIRECTORY/}\"\n done\n else\n echo \"$TM_FILENAME\"\n fi\n}\n\nrv=$(CocoaDialog textbox --float --title \"Remove from Repository\" \\\n --string-output --no-newline --informative-text \\\n \"These files will be scheduled for deletion during the next commit.\" \\\n --text \"$(file_list|sort -f)\" --button1 \"Delete\" --button2 \"Cancel\")\n\nif [[ \"$rv\" == \"Delete\" ]]; then\n if [[ -n \"$TM_SELECTED_FILES\" ]];\n then eval \"$TM_SVN\" rm \"$TM_SELECTED_FILES\"\n else \"$TM_SVN\" rm \"$TM_FILEPATH\"\n fi\nfi\n",
73
+ input: "none",
74
+ keyEquivalent: "^A",
75
+ name: "Remove From Repository…",
76
+ output: "showAsTooltip",
77
+ uuid: "40EF180F-B8AE-40F7-8237-40A53314B57C"},
78
+ {beforeRunningCommand: "nop",
79
+ command:
80
+ "#!/bin/bash\n#\n# Wrapper script to use FileMerge to resolve Subversion conflicts\n# [modified slightly from http://ssel.vub.ac.be/svn-gen/bdefrain/fmscripts/fmresolve]\n#\n\nconflictfile=\"$TM_FILEPATH\"\nFM=\"/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge\"\n\nrequire_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nrequire_cmd \"$FM\" \"You must install the Apple developer tools to run FileMerge\"\n\nfunction lookup {\n\tlocal info=$1\n\tlocal wantedkey=$2\n\tlocal key\n\tlocal value\n\t# Split lines in info through word splitting\n\tlocal IFS=$'\\n'\n\tfor line in $info; do\n\t\tkey=${line%%: *}\n\t\tvalue=${line#*: }\n\t\tif [ $key == $wantedkey ]; then\n\t\t\tRETVAL=$value\n\t\t\treturn 0\n\t\tfi\n\tdone\n\treturn 1\n}\n\nfiledir=`dirname \"$conflictfile\"`\ninfo=`\"$TM_SVN\" info \"$conflictfile\"`\nlookup \"$info\" \"Conflict Current Base File\" && leftfile=$RETVAL\nlookup \"$info\" \"Conflict Previous Working File\" && rightfile=$RETVAL\nlookup \"$info\" \"Conflict Previous Base File\" && ancestorfile=$RETVAL\nmergefile=`basename \"$conflictfile\"`\n\nif [ -z \"$leftfile\" ] || [ -z \"$rightfile\" ] || [ -z \"$ancestorfile\" ]; then\n\techo \"Can't obtain conflict info for $conflictfile\" 1>&2\n\texit 2\nfi\n\n#echo Starting FileMerge... 1>&2\n\"$FM\" -left \"${filedir}/${leftfile}\" -right \"${filedir}/${rightfile}\" -ancestor \"${filedir}/${ancestorfile}\" -merge \"${filedir}/${mergefile}\" &>/dev/null &\n\n",
81
+ input: "none",
82
+ keyEquivalent: "^A",
83
+ name: "Resolve Conflicts With FileMerge…",
84
+ output: "showAsTooltip",
85
+ uuid: "E8EE6110-2DBA-4FC1-807B-9B19B5DE6737"},
86
+ {beforeRunningCommand: "nop",
87
+ command:
88
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"$TM_SVN\" resolved \"$TM_FILEPATH\"\n\n# force TM to refresh the project to get rid of the conflict files..\nrescan_project\n",
89
+ input: "none",
90
+ keyEquivalent: "^A",
91
+ name: "Resolved",
92
+ output: "showAsTooltip",
93
+ uuid: "8C299FDF-E050-4AFE-A306-491DC4C4A11A"},
94
+ {beforeRunningCommand: "nop",
95
+ command:
96
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\neval '\"$TM_BUNDLE_SUPPORT/revert_file.rb\"' \"${TM_SELECTED_FILES:-'$TM_FILEPATH'}\"\n",
97
+ input: "none",
98
+ keyEquivalent: "^A",
99
+ name: "Revert",
100
+ output: "showAsTooltip",
101
+ uuid: "B9F3EC5C-B299-11D9-9356-0011242E4184"},
102
+ {beforeRunningCommand: "nop",
103
+ command:
104
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nrequire_cmd \"${TM_RUBY:=ruby}\" \"We need Ruby to proceed.\"\n\nexport TM_RUBY\nexport TM_SVN\nexport CommitWindow=\"$TM_SUPPORT_PATH/bin/CommitWindow.app/Contents/MacOS/CommitWindow\"\n\n{ if [[ -z $TM_SELECTED_FILES ]]\n\tthen\n\texport WorkPath=\"${TM_PROJECT_DIRECTORY:-$TM_DIRECTORY}\"\n\texport TM_SELECTED_FILES=\"'\"${WorkPath//\\'/\\'\\\\\\'\\'}\"'\"\n\t\"$TM_SVN\" status \"$WorkPath\" 2>&1| \"${TM_RUBY:-ruby}\" -KU -- \"${TM_BUNDLE_SUPPORT}/format_status.rb\" \"--status\"\n\telse\n\teval \"$TM_SVN\" status \"$TM_SELECTED_FILES\" 2>&1 |\"${TM_RUBY:-ruby}\" -KU -- \"${TM_BUNDLE_SUPPORT}/format_status.rb\" \"--status\"\nfi; }\n",
105
+ dontFollowNewOutput: true,
106
+ input: "none",
107
+ keyEquivalent: "^A",
108
+ name: "Status",
109
+ output: "showAsHTML",
110
+ uuid: "01F140D9-749F-11D9-8199-000A95A89C98"},
111
+ {beforeRunningCommand: "saveModifiedFiles",
112
+ command:
113
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nif [[ -n \"$TM_SELECTED_FILE\" && -d \"$TM_SELECTED_FILE\" ]]\n then WorkPath=\"$TM_SELECTED_FILE\"\n else WorkPath=\"${TM_PROJECT_DIRECTORY:-$TM_DIRECTORY}\"\nfi\n\nexport TM_SVN\nexport WorkPath\n\n\"$TM_SVN\" update \"$WorkPath\" 2>&1 \\\n|\"${TM_RUBY:-ruby}\" -- \"${TM_BUNDLE_SUPPORT}/format_status.rb\"\n\n# force TM to refresh the current file..\nrescan_project\n",
114
+ input: "none",
115
+ name: "Update Selected Files to Newest (HEAD)",
116
+ output: "showAsHTML",
117
+ uuid: "A1DEEFE4-7E3A-11D9-81A1-000A95A89C98"},
118
+ {beforeRunningCommand: "saveModifiedFiles",
119
+ command:
120
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" -r \"$TM_SUPPORT_PATH/lib/shelltokenize.rb\" <<END\n\tsvn = ENV['TM_SVN'] || \"svn\"\n\truby = ENV['TM_RUBY'] || \"ruby\"\n\tsupport = ENV['TM_BUNDLE_SUPPORT']\n\tpaths = TextMate.selected_paths_array\n\t\n\t# TODO: Ideally, we'd like to use a tooltip for one and not others, but we can't switch from a tooltip\n\t# to dynamic HTML output (or maybe we could double-fork a process?)\n\t# if ((paths.size == 1) and not (File.directory? paths[0]))\n\t#\tputs %x{\#{svn} update \#{TextMate.selected_paths_for_shell}}\n\t# else\n\t\tupdate = IO.popen(\"'\#{svn}' update \#{TextMate.selected_paths_for_shell}\", 'r')\n\t\tformat = IO.popen(\"'\#{ruby}' -- '\#{support}/format_status.rb'\", 'w')\n\t\tupdate.each_line { |line| format.puts(line) }\n\t# end\t\nEND\n\n# force TM to refresh the current file..\nrescan_project\n",
121
+ input: "none",
122
+ keyEquivalent: "^A",
123
+ name: "Update to Newest (HEAD)",
124
+ output: "showAsHTML",
125
+ uuid: "175D3D76-74CE-11D9-813D-000A95A89C98"},
126
+ {beforeRunningCommand: "nop",
127
+ command:
128
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nruby >& /tmp/tm_svn_debug <<END &\nbegin\n\trequire \"$TM_BUNDLE_SUPPORT/svn_revision_chooser\"\n\n\tSubversion::view_revision(\"$TM_FILEPATH\")\nrescue Exception => error\n\tTextMate::UI.alert(:warning, \"You’ve discovered a bug\", \"Please report the following text: \#{error}\\n\\n\#{error.backtrace.join(%Q{\\n})}\")\nend\nEND\n",
129
+ input: "none",
130
+ keyEquivalent: "^A",
131
+ name: "View Revision…",
132
+ output: "discard",
133
+ uuid: "05DF9B5B-AB88-4597-ACD3-DD1DCEDC0BE8"},
134
+ {beforeRunningCommand: "nop",
135
+ command:
136
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n# Setup Dialog asking for host\nurl=$(CocoaDialog inputbox --float \\\n --title \"Subversion Checkout\" \\\n --informative-text \"URL:\" \\\n --text \"svn+ssh://\" \\\n --button1 \"Checkout\" \\\n --button2 \"Cancel\")\n\n# If user canceled exit.\n[[ \"${url:0:1}\" == \"2\" ]] && exit_discard\n\n# skip the return code so we are left with just the url\nurl=\"${url:2}\"\n\n# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #\n\n# Setup Dialog asking where to save\nlocation=$(CocoaDialog filesave --float \\\n --text \"Checking out $url\" \\\n --with-file \"$(basename \"$url\")\" )\n\n# If user canceled exit.\n[[ -z \"$location\" ]] && exit_discard\n\n# format the checkout output\nexport WorkPath=\"$location\" # format_status will show paths as relative to this value\n\"$TM_SVN\" checkout \"$url\" \"$location\" 2>&1 |\"${TM_RUBY:-ruby}\" -KU -- \"${TM_BUNDLE_SUPPORT}/format_status.rb\" --checkout\n\nopen -b com.macromates.textmate \"$location\"\n",
137
+ input: "none",
138
+ keyEquivalent: "^A",
139
+ name: " Check Out…",
140
+ output: "showAsHTML",
141
+ uuid: "03E4CAA8-0F74-4394-8709-4EF0E22F908B"},
142
+ {beforeRunningCommand: "nop",
143
+ command:
144
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nruby >& /tmp/tm_svn_debug <<END &\nbegin\n\trequire 'tempfile'\n\trequire \"$TM_BUNDLE_SUPPORT/svn_revision_chooser\"\n\trequire \"$TM_BUNDLE_SUPPORT/svn_diff\"\n\n\tfile = ENV['TM_FILEPATH']\n\trevisions = Subversion::choose_revision(file, \"Diff two revs of \#{File.basename(file)}\", 2)\n\tunless revisions.nil?\n\t\tdiff_text = Subversion::diff_working_copy_with_revision(:paths => [file],\n\t\t\t\t\t\t\t\t:revision => \"\#{revisions[1]}:\#{revisions[0]}\",\n\t\t\t\t\t\t\t\t:command_name => \"Diff Revisions…\")\n\t\tTempfile.open(\"svndiff \#{File.basename(file)}\") do |tempfile|\n\t\t\ttempfile.write(diff_text)\n\t\t\ttempfile.flush\n\t\t\t%x{\"\#{ENV['TM_SUPPORT_PATH']}/bin/mate\" -w \#{e_sh(tempfile.path)}}\n\t\tend\n\tend\n\nrescue Exception => error\n\tTextMate::UI.alert(:warning, \"You’ve discovered a bug\", \"Please report the following text: \#{error}\\n\\n\#{error.backtrace.join(%Q{\\n})}\")\nend\nEND\n",
145
+ input: "none",
146
+ keyEquivalent: "^A",
147
+ name: " Diff Revisions…",
148
+ output: "discard",
149
+ uuid: "C7802039-B3C4-11D9-8D63-000A95A89C98"},
150
+ {beforeRunningCommand: "nop",
151
+ command:
152
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n#!/usr/bin/env ruby -w\n\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/svn_diff\"\n\nSubversion::diff_active_file('HEAD', \"Diff With Newest\")\nEND\n",
153
+ input: "none",
154
+ keyEquivalent: "^A",
155
+ name: " Diff With Newest (HEAD)",
156
+ output: "openAsNewDocument",
157
+ uuid: "DF784C33-74D7-11D9-813D-000A95A89C98"},
158
+ {beforeRunningCommand: "nop",
159
+ command:
160
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\n\"${TM_RUBY:-ruby}\" <<'END'\n#!/usr/bin/env ruby -w\n\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/svn_diff\"\n\nSubversion::diff_active_file('PREV', \"Diff With Previous\")\nEND",
161
+ input: "none",
162
+ keyEquivalent: "^A",
163
+ name: " Diff With Previous Revision (PREV)",
164
+ output: "openAsNewDocument",
165
+ uuid: "37135380-74CE-11D9-813D-000A95A89C98"},
166
+ {beforeRunningCommand: "nop",
167
+ command:
168
+ "require_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nruby >& /tmp/tm_svn_debug <<END &\nbegin\n\trequire 'tempfile'\n\trequire \"$TM_BUNDLE_SUPPORT/svn_revision_chooser\"\n\trequire \"$TM_BUNDLE_SUPPORT/svn_diff\"\n\n\tfile = ENV['TM_FILEPATH']\n\trevisions = Subversion::choose_revision(file, \"Diff \#{File.basename(file)} working copy?\")\n\t\n\tunless revisions.nil?\n\t\tdiff_text = Subversion::diff_working_copy_with_revision(:paths => [file], :revision => revisions[0], :command_name => \"Diff With Revision…\")\n\t\tTempfile.open(\"svndiff \#{File.basename(file)}\") do |tempfile|\n\t\t\ttempfile.write(diff_text)\n\t\t\ttempfile.flush\n\t\t\t%x{\"\#{ENV['TM_SUPPORT_PATH']}/bin/mate\" -w \#{e_sh(tempfile.path)}}\n\t\tend\n\tend\n\nrescue Exception => error\n\tTextMate::UI.alert(:warning, \"You’ve discovered a bug\", \"Please report the following text: \#{error}\\n\\n\#{error.backtrace.join(%Q{\\n})}\")\nend\nEND\n",
169
+ input: "none",
170
+ keyEquivalent: "^A",
171
+ name: " Diff With Revision…",
172
+ output: "discard",
173
+ uuid: "32E15B26-B444-11D9-8D63-000A95A89C98"},
174
+ {beforeRunningCommand: "nop",
175
+ command:
176
+ "#!/bin/bash\n#\nrequire_cmd \"${TM_SVN:=svn}\" \"If you have installed svn, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nrequire_cmd \"${TM_SVNMERGE:=svnmerge}\" \"If you have installed svnmerge, then you need to either update your <tt>PATH</tt> or set the <tt>TM_SVNMERGE</tt> shell variable (e.g. in Preferences / Advanced)\"\n\nworkpath=\"$TM_SELECTED_FILE\"\nif [[ ! -d \"$workpath\" ]]; then\n\tpre <<< \"Please select a folder in the project drawer.\"\n\texit\nfi\n\nFORMAT_LOG=\"${TM_BUNDLE_SUPPORT}/format_log.rb\"\n\n# svnmerge calls stty if COLUMNS is not set. Apparently Python has no is_tty? equivalent.\nexport COLUMNS=80\n\ncd \"$workpath\"\n\n# check for no or multiple HEADs\nintegratedRevs=`svn propget svnmerge-integrated \"$workpath\"`\nif [[ -z \"$integratedRevs\" ]]; then\n\tpre <<< \"Merge tracking has not been initialized for '$workpath'\"\n\texit\nfi\n\ntheHead=`osascript <<END\n\t-- split heads (yes, svnmerge uses spaces to delimit; hopefully spaces in filenames get URI-style encoded, but I haven't checked)\n\tset AppleScript's text item delimiters to {\" \"}\n\tset theList to (every text item of \"$integratedRevs\")\n\n\t-- split head names from associated revision numbers\n\tset theHeads to {}\n\tset AppleScript's text item delimiters to {\":\"}\n\trepeat with i from 1 to the count of theList\n\t\tset theHeads to (theHeads & (text item 1 of (item i of theList)))\n\tend\n\n\tif the count of theHeads is greater than 1 then\n\t\ttell app \"TextMate\"\n\t\t\tchoose from list theHeads with prompt \"Please choose the HEAD directory for '$workpath':\"\n\t\tend tell\n\telse if the count of theHeads is 1 then\n\t\tset the result to item 1 of theHeads\n\telse\n\t\tset the result to false\n\tend if\nEND`\n\n# exit if user canceled\n[[ \"$theHead\" = \"false\" ]] && exit_discard\n\n\n\"$TM_SVNMERGE\" avail --log -S \"`basename $theHead`\" 2>&1 \\\n\t| \"${TM_RUBY:=ruby}\" -- \"$FORMAT_LOG\" '--title=Revisions Available for Merging'\n",
177
+ input: "none",
178
+ keyEquivalent: "^A",
179
+ name: " Show Available Revisions for Merging",
180
+ output: "showAsHTML",
181
+ uuid: "BA4B9C28-6566-46E8-8482-9A52DCB5384D"}]
@@ -0,0 +1,32 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ bundleUUID: "0B296803-7D51-11D9-859D-000D93B6E43C",
5
+ command:
6
+ "#!/usr/bin/env bash\n\n. \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"TODO Bundle Help\" \"TODO\"\n\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<'MARKDOWN'\n\n# Introduction\n\nThe \"Show TODO List\" command will scan your current document (on disk) or documents in your project for lines containing certain tags (see below).\nYou will be presented with a row of “Tabs” that are counting matches while the search is going on. Once the search finishes a list for each of the tags and their context is shown. Each entry can be clicked to jump to that line in that file. The lists can be ordered by clicking on their column titles. Clicking on the Tabs will jump to the corresponding list.\n\nTextMate will ignore files whose full path matches the regular expression defined by the environment variable `TM_TODO_IGNORE`.\n\nNote: This command requires Ruby 1.8\n\n# Tags\n\nPreconfigured tags are:\n\n* <span style=\"color: #A00000;\">FIXME (or FIX ME)</span>\n* <span style=\"color: #CF830D;\">TODO</span>\n* <span style=\"color: #008000;\">CHANGED</span>\n* <span style=\"color: #0090C8;\">RADAR (as &lt;radar://…&gt; or &lt;rdar://…&gt;)</span>\n\nThose tags can easily be set up via the <span onClick=\"TextMate.system(&apos;&quot;${TM_RUBY:-ruby}&quot; &quot;$TM_BUNDLE_SUPPORT/lib/settings.rb&quot; &amp;&gt;/dev/null &amp;&apos;, null)\">“Preferences”</a> command.\n\n# Hints\n\n* The list can be printed using _Print…_ (⌘P) from the _File_ menu.\n* The Command will abort when the project directory resolves to the root folder.\n* Access keys: `⌃` + first letter of the tag (like `⌃T` for “TODO”) will jump to the respective section.\n\nMARKDOWN\n\nhtml_footer\n",
7
+ input: "none",
8
+ name: "Help",
9
+ output: "showAsHTML",
10
+ uuid: "46C3E5A1-7E04-11D9-AE69-000D93B6E43C"},
11
+ {beforeRunningCommand: "nop",
12
+ command:
13
+ "#!/usr/bin/env ruby -wKU\nrequire ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'\n\n10.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 unless start.empty? || stop.empty?\n print \"\#{e_sn start}\\n\\tTODO $0\\n\#{e_sn stop}\"\n exit\n end\nend\n\nfallback = ENV['TM_COMMENT_START'].to_s.strip\nprint \"\#{e_sn fallback.sub(/.$/, '\\\\0 ')}TODO \"\n",
14
+ input: "none",
15
+ name: "Insert TODO List",
16
+ output: "insertAsSnippet",
17
+ tabTrigger: "todo",
18
+ uuid: "D2F7F545-5149-47B9-AC62-DBDC6ACAB9BB"},
19
+ {beforeRunningCommand: "nop",
20
+ command:
21
+ "#!/usr/bin/env ruby -wKU\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/tm/detach\"\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib/settings.rb\"\nTextMate.detach { Settings.show_ui }\n",
22
+ input: "none",
23
+ name: "Preferences…",
24
+ output: "showAsTooltip",
25
+ uuid: "65C4098C-BB16-4CA1-9297-B312BCD0433F"},
26
+ {beforeRunningCommand: "saveModifiedFiles",
27
+ command: "\"${TM_RUBY:-ruby}\" -r \"$TM_BUNDLE_SUPPORT/todo.rb\"",
28
+ input: "none",
29
+ keyEquivalent: "^T",
30
+ name: "Show TODO List",
31
+ output: "showAsHTML",
32
+ uuid: "14C1643E-7D51-11D9-859D-000D93B6E43C"}]
@@ -0,0 +1,21 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "word=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}\n\ntry_man () {\n\tif man n -w \"$word\" &>/dev/null; then\n\t\tpage=$(\"$TM_SUPPORT_PATH/bin/html_man.sh\" n \"$word\")\n\t\techo \"<meta http-equiv='Refresh' content='0;URL=tm-file://$page'>\"\n\t\texit_show_html\n\tfi\n}\n\ntry_man\n\necho \"Couldn’t find documentation in 'man n' for “${word}”\"\n",
6
+ dontFollowNewOutput: true,
7
+ fallbackInput: "word",
8
+ input: "selection",
9
+ keyEquivalent: "^h",
10
+ name: "Documentation for Word / Selection (man) copy",
11
+ output: "showAsTooltip",
12
+ scope: "source.tcl",
13
+ uuid: "56F8C50E-B263-430C-9301-A34EDF05E9F5"},
14
+ {beforeRunningCommand: "saveActiveFile",
15
+ command: "${TM_TCLSH:=tclsh} \"$TM_FILEPATH\"|pre",
16
+ input: "none",
17
+ keyEquivalent: "@r",
18
+ name: "Run",
19
+ output: "showAsHTML",
20
+ scope: "source.tcl",
21
+ uuid: "59700A78-7CB7-11D9-875B-000A95E13C98"}]
@@ -0,0 +1,30 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "#!/usr/bin/env ruby\n\n$LOAD_PATH << \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib\"\nrequire \"terminal_mate\"\n\nfile_ext = ENV[\"TERMINAL_MATE_FILE_EXTENSION\"].to_s\ntm_filepath = ENV[\"TM_FILEPATH\"]\nif tm_filepath.nil?\n tmpfile = `mktemp -t TerminalMate`.chomp # Couldn't get Tempfile to work…\n tmpfile += file_ext\n File.open(tmpfile, \"w\") do |f| f.write(STDIN.read) end\n file = tmpfile\n File.chmod(0755, file) if file_ext == \".sh\"\nelse\n file = tm_filepath\nend\nTerminalMate::Client.new.send(\"load_file\", ENV[\"TM_SCOPE\"], ENV[\"TERMINAL_MATE_LOAD\"] % file)\n",
6
+ input: "document",
7
+ keyEquivalent: "^I",
8
+ name: "Load File",
9
+ output: "afterSelectedText",
10
+ scope: "source",
11
+ uuid: "964A0E53-3896-4EC6-AC15-038DC8FCEEE2"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "#!/usr/bin/env ruby\n$LOAD_PATH << \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib\"\nrequire \"terminal_mate\"\nTerminalMate::Client.new.send(\"new\", ENV[\"TM_SCOPE\"], ENV[\"TM_PROJECT_DIRECTORY\"], ENV[\"TERMINAL_MATE_NEW\"])\n",
15
+ input: "none",
16
+ keyEquivalent: "^I",
17
+ name: "New Terminal",
18
+ output: "afterSelectedText",
19
+ scope: "source",
20
+ uuid: "8F305E73-F68F-4A5D-B04B-A8646F2CC695"},
21
+ {beforeRunningCommand: "nop",
22
+ command:
23
+ "#!/usr/bin/env ruby\n$LOAD_PATH << \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib\"\nrequire \"terminal_mate\"\nTerminalMate::Client.new.send(\"paste\", ENV[\"TM_SCOPE\"], STDIN.read)\n",
24
+ fallbackInput: "document",
25
+ input: "selection",
26
+ keyEquivalent: "^I",
27
+ name: "Paste Selection",
28
+ output: "discard",
29
+ scope: "source",
30
+ uuid: "3B47B103-857B-4A75-938B-4D57D4803BC2"}]
@@ -0,0 +1,137 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "get_pw () {\n ruby -rui -e\"print TextMate::UI.request_secure_string(:title => 'Decrypt AES 128 Encrypted Text', :prompt => '$1', :button1 => '$2', :button2 => 'Cancel').to_s\"\n}\n\npw=$(get_pw 'What is the password?' Decrypt)\n[[ -z \"$pw\" ]] && exit_discard\n\nif ! openssl enc -d -aes128 -base64 -pass \"pass:$pw\"; then\n exit_show_tool_tip\nfi\n",
6
+ fallbackInput: "document",
7
+ input: "selection",
8
+ keyEquivalent: "^@E",
9
+ name: "AES Decrypt Document / Selection With Password…",
10
+ output: "replaceSelectedText",
11
+ uuid: "4B22577B-BC8E-11D9-8946-000D93589AF6"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "get_pw () {\n ruby -rui -e\"print TextMate::UI.request_secure_string(:title => 'Encrypt Text With AES 128', :prompt => '$1', :button1 => '$2', :button2 => 'Cancel').to_s\"\n}\npw1=$(get_pw 'What password should be used?' Continue)\n[[ -z \"$pw1\" ]] && exit_discard\npw2=$(get_pw 'Enter password again to verify.' Encrypt)\n\nif [[ \"$pw1\" == \"$pw2\" ]];\n then openssl enc -e -aes128 -base64 -pass \"pass:$pw1\"\n else exit_show_tool_tip 'Password mismatch! Please play again.'\nfi\n",
15
+ fallbackInput: "document",
16
+ input: "selection",
17
+ keyEquivalent: "^@E",
18
+ name: "AES Encrypt Document / Selection With Password…",
19
+ output: "replaceSelectedText",
20
+ uuid: "D39DC176-BC8D-11D9-8946-000D93589AF6"},
21
+ {beforeRunningCommand: "nop",
22
+ command: "cat -n|expand -8",
23
+ fallbackInput: "document",
24
+ input: "selection",
25
+ keyEquivalent: "",
26
+ name: "Add Line Numbers to Document / Selection",
27
+ output: "replaceSelectedText",
28
+ uuid: "8085013F-8DEA-11D9-B421-000D93589AF6"},
29
+ {beforeRunningCommand: "nop",
30
+ command:
31
+ "#!/usr/bin/env ruby -wKU\nprint STDIN.read.unpack(\"U*\").map { |e| sprintf('0x%02x', e) }.join(' ')",
32
+ fallbackInput: "character",
33
+ input: "selection",
34
+ keyEquivalent: "^X",
35
+ name: "Convert Character / Selection to Hex",
36
+ output: "replaceSelectedText",
37
+ uuid: "7C9736B2-B851-11D9-B05D-00039369B986"},
38
+ {beforeRunningCommand: "nop",
39
+ bundleUUID: "B7BC3FFD-6E4B-11D9-91AF-000D93589AF6",
40
+ command:
41
+ "res=$(ruby -rui -e\"print TextMate::UI.request_string(:title => 'Filter Matching Lines', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s\")\n\n[[ -z \"$res\" ]] && exit_discard\nexport pattern=\"$res\"\n\n# This could be done with grep, but Python's RE is closer to oniguruma\n\"${TM_PYTHON:-python}\" -c '\nimport sys, os, re, traceback\ntry:\n pattern = re.compile(os.environ[\"pattern\"])\nexcept re.error, e:\n sys.stderr.write(\"Invalid pattern: %s\" % e)\n sys.exit(1)\nfor line in sys.stdin:\n if pattern.search(line):\n sys.stdout.write(line)\n' || exit_show_tool_tip\n",
42
+ input: "selection",
43
+ name: "Copy Matching Lines into New Document",
44
+ output: "openAsNewDocument",
45
+ uuid: "965DF29E-4EBD-457A-9A61-56D920C35F72"},
46
+ {beforeRunningCommand: "nop",
47
+ bundleUUID: "B7BC3FFD-6E4B-11D9-91AF-000D93589AF6",
48
+ command:
49
+ "res=$(ruby -rui -e\"print TextMate::UI.request_string(:title => 'Filter Non-Matching Lines', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s\")\n\n[[ -z \"$res\" ]] && exit_discard\nexport pattern=\"$res\"\n\n# This could be done with grep, but Python's RE is closer to oniguruma\n\"${TM_PYTHON:-python}\" -c '\nimport sys, os, re, traceback\ntry:\n pattern = re.compile(os.environ[\"pattern\"])\nexcept re.error, e:\n sys.stderr.write(\"Invalid pattern: %s\" % e)\n sys.exit(1)\nfor line in sys.stdin:\n if not pattern.search(line):\n sys.stdout.write(line)\n' || exit_show_tool_tip\n",
50
+ input: "selection",
51
+ name: "Copy Non-Matching Lines into New Document",
52
+ output: "openAsNewDocument",
53
+ uuid: "8109F2C2-FF63-46F7-83F3-D2318290FC11"},
54
+ {beforeRunningCommand: "nop",
55
+ bundleUUID: "B7BC3FFD-6E4B-11D9-91AF-000D93589AF6",
56
+ command:
57
+ "res=$(ruby -rui -e\"print TextMate::UI.request_string(:title => 'Distill Text', :prompt => 'Enter a pattern:', :button1 => 'Filter', :button2 => 'Cancel').to_s\")\n\n[[ -z \"$res\" ]] && exit_discard\nexport pattern=\"$res\"\n\n# This could be done with grep, but Python's RE is closer to oniguruma\n\"${TM_PYTHON:-python}\" -c '\nimport sys, os, re, traceback\ntry:\n pattern = re.compile(os.environ[\"pattern\"])\nexcept re.error, e:\n sys.stderr.write(\"Invalid pattern: %s\" % e)\n sys.exit(1)\nmate = \"\\\"%s/bin/mate\\\" -a\" % os.environ[\"TM_SUPPORT_PATH\"]\npb = os.popen(mate, \"w\")\nfor line in sys.stdin:\n if pattern.search(line):\n pb.write(line)\n else:\n sys.stdout.write(line)\npb.close()\n' || exit_show_tool_tip\n\n",
58
+ input: "selection",
59
+ name: "Distill Document / Selection",
60
+ output: "replaceSelectedText",
61
+ uuid: "DA5AD0D9-F7C0-4010-9FDC-FF01B0434F9A"},
62
+ {beforeRunningCommand: "nop",
63
+ command:
64
+ "#!/usr/bin/env ruby -wKU\n\n# If there’s a selection, output that twice (as a snippet)\n# leaving the duplicate as the new selected text.\n# Otherwise split the current line around the caret and\n# output “right, left” to duplicate the line, leaving the\n# caret in the same place on the new line\n\nrequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/exit_codes.rb\")\nrequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/escape.rb\")\n\nif ENV['TM_SELECTED_TEXT'] != nil\n\tTextMate.exit_insert_snippet(e_sn(ENV['TM_SELECTED_TEXT']) + \"${0:\" + e_snp(ENV['TM_SELECTED_TEXT']) + \"}\")\nelse\n\tcol = ENV['TM_LINE_INDEX'].to_i\n\tTextMate.exit_insert_text(ENV['TM_CURRENT_LINE'][col..-1] + \"\\n\" + ENV['TM_CURRENT_LINE'][0...col])\nend",
65
+ fallbackInput: "none",
66
+ input: "selection",
67
+ keyEquivalent: "^D",
68
+ name: "Duplicate Line / Selection",
69
+ output: "afterSelectedText",
70
+ uuid: "C46A9DBC-0B06-49DF-838B-491B529ECF22"},
71
+ {beforeRunningCommand: "nop",
72
+ command: "open \"$(cat)\"\n",
73
+ fallbackInput: "scope",
74
+ input: "selection",
75
+ keyEquivalent: "",
76
+ name: "Open Current URL",
77
+ output: "discard",
78
+ scope: "markup.underline.link - markup.underline.link.relative",
79
+ uuid: "5A08E461-05CC-4C03-9DC8-BF118594EA3E"},
80
+ {beforeRunningCommand: "nop",
81
+ command:
82
+ "ruby -pe'$_ = (rand * 100000000).round.to_s + \"\\t\" + $_'|sort|cut -f2-",
83
+ input: "selection",
84
+ name: "Randomize Lines in Document / Selection",
85
+ output: "replaceSelectedText",
86
+ uuid: "90291A6E-34F6-4FD5-BA82-6BB6FB4DD492"},
87
+ {beforeRunningCommand: "nop",
88
+ command: "perl -pe 's/[\\t ]+$//g'",
89
+ fallbackInput: "document",
90
+ input: "selection",
91
+ name: "Remove Trailing Spaces in Document / Selection",
92
+ output: "replaceSelectedText",
93
+ uuid: "0F8C1F78-6E4C-11D9-91AF-000D93589AF6"},
94
+ {beforeRunningCommand: "nop",
95
+ command: "perl -pe 's/[^\\t\\n\\x20-\\xFF]|\\x7F|\\xC2[\\x80-\\x9F]//g'",
96
+ fallbackInput: "document",
97
+ input: "selection",
98
+ name: "Remove Unprintable Characters in Document / Selection",
99
+ output: "replaceSelectedText",
100
+ uuid: "BEC25DC3-6E4B-11D9-91AF-000D93589AF6"},
101
+ {beforeRunningCommand: "nop",
102
+ command: "sort -f|uniq",
103
+ input: "selection",
104
+ keyEquivalent: "",
105
+ name: "Sort Lines & Remove Duplicates",
106
+ output: "replaceSelectedText",
107
+ uuid: "3010E2A8-6E4F-11D9-A18D-000D93589AF6"},
108
+ {beforeRunningCommand: "nop",
109
+ command: "sort -f",
110
+ fallbackInput: "document",
111
+ input: "selection",
112
+ keyEquivalent: "",
113
+ name: "Sort Lines in Document / Selection",
114
+ output: "replaceSelectedText",
115
+ uuid: "273853DF-6E4F-11D9-A18D-000D93589AF6"},
116
+ {beforeRunningCommand: "nop",
117
+ command: "say `echo \"$TM_SELECTED_TEXT\"` &",
118
+ input: "selection",
119
+ name: "Speak Document / Selection",
120
+ output: "discard",
121
+ uuid: "D26BEEE3-7439-4B7E-AD9D-9A144CDC5873"},
122
+ {beforeRunningCommand: "nop",
123
+ command:
124
+ "#!/usr/bin/env ruby -wKU\n\ndef pretty(number)\n number.to_s.gsub(/\\d{1,3}(?=\\d{3}+(?!\\d))/, '\\0,')\nend\n\ncounts = `wc -lwc`.scan(/\\d+/)\ncounts[0] = counts[0].to_i + 1 # increase one to the line count\n\n%w[ line word byte ].each do |unit|\n cnt = counts.shift\n plural = cnt.to_i != 1 ? 's' : ''\n printf(\"%11.11s %s%s\\n\", pretty(cnt), unit, plural)\nend\n",
125
+ fallbackInput: "document",
126
+ input: "selection",
127
+ keyEquivalent: "^N",
128
+ name: "Statistics for Document / Selection (Word Count)",
129
+ output: "showAsTooltip",
130
+ uuid: "AA202E76-8A0A-11D9-B85D-000D93589AF6"},
131
+ {beforeRunningCommand: "nop",
132
+ command: "iconv -c -f utf-8 -t ASCII//TRANSLIT",
133
+ fallbackInput: "word",
134
+ input: "selection",
135
+ name: "Transliterate Word / Selection to ASCII",
136
+ output: "replaceSelectedText",
137
+ uuid: "3AA8A593-6E4C-11D9-91AF-000D93589AF6"}]
@@ -0,0 +1,100 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "#!/usr/bin/env ruby\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib/doctohtml.rb\"\nprint generate_stylesheet_from_theme()",
6
+ input: "none",
7
+ inputFormat: "xml",
8
+ keyEquivalent: "",
9
+ name: "Create CSS From Current Theme",
10
+ output: "openAsNewDocument",
11
+ uuid: "ED204720-38FC-427C-B91E-D6AE866DAE3A"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "#!/usr/bin/env ruby -rjcode -Ku\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib/doctohtml.rb\"\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/progress.rb\"\nunit = ENV.has_key?('TM_SELECTED_TEXT') ? 'selection' : 'document'\nTextMate.call_with_progress(:message => \"Creating HTML version of \#{unit}…\") do\n print document_to_html( STDIN.read, :include_css => !ENV.has_key?('TM_SELECTED_TEXT') )\nend\n",
15
+ input: "selection",
16
+ inputFormat: "xml",
17
+ name: "Create HTML From Document / Selection",
18
+ output: "openAsNewDocument",
19
+ uuid: "950B3108-E2E3-414E-9C4C-EE068F59A895"},
20
+ {beforeRunningCommand: "nop",
21
+ command:
22
+ "#!/usr/bin/env ruby -rjcode -Ku\nrequire \"\#{ENV['TM_BUNDLE_SUPPORT']}/lib/doctohtml.rb\"\nrequire \"\#{ENV['TM_SUPPORT_PATH']}/lib/progress.rb\"\nunit = ENV.has_key?('TM_SELECTED_TEXT') ? 'selection' : 'document'\nTextMate.call_with_progress(:message => \"Creating HTML version of \#{unit}…\") do\n print document_to_html( STDIN.read, { :line_numbers => true, :include_css => !ENV.has_key?('TM_SELECTED_TEXT') } )\nend",
23
+ input: "selection",
24
+ inputFormat: "xml",
25
+ name: "Create HTML From Document / Selection With Line Numbers",
26
+ output: "openAsNewDocument",
27
+ uuid: "7AE6F783-F162-4063-850D-1441441849D8"},
28
+ {beforeRunningCommand: "nop",
29
+ command:
30
+ "FILE=\"$HOME/Library/Preferences/com.macromates.edit_in_textmate.plist\"\n[ -e \"$FILE\" ] || cat <<'PLIST' >\"$FILE\"; mate \"$FILE\"\n{\n\tURLAssociations = {\n\t\t'mail.google.com/' = 'mail';\n\t\t'macromates.com/blog/' = 'markdown';\n\t\t'blacktree.cocoaforge.com/forums/' = 'bbcode';\n\t};\n}\n/*\n\tCustom associations used by the Edit in TextMate service when\n\tinvoked from a WebKit-based browser (e.g. Safari or OmniWeb)\n\n\tProvide an URL subset and the extension to use for the temporary\n\tfile when this subset is found in the URL from the calling\n\tapplications current page.\n\n\tThis is to trigger proper syntax highlight.\n\t\n\tIn case of multiple subsets matching the URL, the longest one\n\twill win.\n\n*/\nPLIST",
31
+ input: "none",
32
+ name: "Edit in TextMate URL Associations",
33
+ output: "showAsTooltip",
34
+ uuid: "4981F52A-F663-45FC-AE25-EE211E88BA05"},
35
+ {beforeRunningCommand: "nop",
36
+ command: "open \"http://macromates.com/ticket/show?ticket_id=$(cat)\"",
37
+ fallbackInput: "scope",
38
+ input: "selection",
39
+ keyEquivalent: "",
40
+ name: "Go to Ticket",
41
+ output: "discard",
42
+ scope: "constant.numeric.ticket.release-notes",
43
+ uuid: "F10674C0-D55D-4EFD-88DE-DC60C3EE6562"},
44
+ {beforeRunningCommand: "nop",
45
+ command:
46
+ "# This shortcut can crash under Leopard, so blocking\n# out the shortcut for now\n\necho \"WARNING: On Leopard the menu item searching is prone to crashing, so we\nhave disabled the key equivalent. Sorry about the inconvenience.\"",
47
+ input: "none",
48
+ keyEquivalent: "@?",
49
+ name: "Help Menu Crash Preventer",
50
+ output: "showAsTooltip",
51
+ uuid: "89CFAC75-FF44-4106-8168-475E685D2018"},
52
+ {beforeRunningCommand: "nop",
53
+ command: "cat ${TMP:-/tmp}/TextMate-ScratchSnippet.txt",
54
+ input: "none",
55
+ keyEquivalent: "~S",
56
+ name: "Insert Scratch Snippet",
57
+ output: "insertAsSnippet",
58
+ uuid: "ADFED53B-16EC-4956-A6A7-3EA2B8140F86"},
59
+ {beforeRunningCommand: "nop",
60
+ command:
61
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"Install “Edit in TextMate…”\"\n\n# javascript which creates the link (by calling out to the shell)\ncat <<HTML\n<script>\nfunction installInputManager () {\n var cmd = TextMate.system('install_edit_in_tm.sh', null);\n var res = document.getElementById(\"result\");\n res.innerHTML = \"<p>\" + cmd.outputString + \"</p>\";\n}\n</script>\nHTML\n\n# documentation which links to the script above\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<\"MARKDOWN\"\n# Intro\n\nIncluded with TextMate is an input manager which can add an “Edit in TextMate” menu item to the Edit menu of other applications.\n\nThis allow you to call upon TextMate to edit the text in the current web form (Safari) or current letter that you are writing (Mail) by pressing &#x2303;&#x2318;E and when done editing the text in TextMate, press &#x2318;S + &#x2318;W to save, close, and have focus (plus edited text) return to the application from which you invoked the Edit in TextMate action.\n\n\n# Installation\n\nThe Input Manager is preferably installed by creating a symbolic link in `~/Library/InputManagers` which point to the location of the input manager (inside the TextMate application bundle).\n\nYou can create this link by using the button below. **Note for Leopard users:** The script requires you to enter an administrator password to install the Input Manager (see [this post](http://blog.macromates.com/2007/inputmanagers-on-leopard/))\n\n<div id=\"result\"><input type=\"Button\" value=\"Create Symbolic Link\" onClick=\"installInputManager();\"></div>\n\n_After creating the link you need to relaunch the applications in which you want to test the functionality (e.g. Mail, Safari, …)_\n\n\n# Excluding Applications\n\nIf you do not want the menu item to appear in a certain application, you can set the `DisableEditInTextMateMenuItem` defaults key to `1` for that application.\n\nFor example to disable the menu item for `Console` we would do:\n\n\tdefaults write -app Console DisableEditInTextMateMenuItem 1 \n\nWe can also disable it for all applications using:\n\n\tdefaults write NSGlobalDomain DisableEditInTextMateMenuItem 1 \n\n\n# File Type Mapping\n\nWhen you initiate editing from an application, the temporary file used will have the application name as extension. For example if you call it from Mail then the extension will be `mail`. Based on this, TextMate will pick the proper language grammar, and if not, you can correct it, which will then stick to that extension.\n\nWhen you call it from a browser, the URL of the page is often indicative of the type you will be editing, for example if the URL is <http://macromates.com/blog/> then you are most likely editing a comment on the blog, which is in Markdown, thus TextMate should pick that syntax.\n\nFor this reason, the service reads a configuration file which maps URL fragments to a file extension that will be used for the temporary file. This only works for WebKit based browsers (e.g. OmniWeb and Safari).\n\nThe file is read as:\n\n\t~/Library/Preferences/com.macromates.edit_in_textmate.plist\n\nHere is an example file:\n\n { URLAssociations = {\n 'mail.google.com/' = mail;\n 'macromates.com/blog/' = markdown;\n 'macromates.com/wiki/' = markdown;\n 'blacktree.cocoaforge.com/forums/' = bbcode;\n };\n }\n\nIf multiple URL fragments match the current URL, the longest match wins.\n\n\n# Custom Key Bindings\n\nYou can use System Preferences &#x2192; Keyboard & Mouse to change the default key equivalent. This however only works as long as the key binding includes the command modifier (&#x2318;). If you want to give it a key that does not include this modifier, you can add an entry to your `~/Library/KeyBindings/DefaultKeyBinding.dict` with the action method set to `editInTextMate:`. With this key binding, you do not need to have the menu item (so you can disable that in the global domain).\n\nFor example I have the following line in my `DefaultKeyBinding.dict`:\n\n\t\"^E\" = \"editInTextMate:\";\n\nThis puts the action on &#x2303;&#x21E7;E.\n\n\n# Compatibility\n\nThe input manager works by adding a category to `NSTextView` and `WebView` (which is used by Mail to edit text). So it will only work for Cocoa applications (and those which use these controls).\n\nPreviously the functionality was provided by a Service, but the synchronous nature of services, and the need to select text first, made it less than ideal.\n\nGenerally the input manager approach works better, but it is a hack, so e.g. if you call upon the Edit in TextMate action and close the window which held the text, or was calling the service from the field editors text view and advance focus, before the text has been returned, do not be surprised if the text does not show up in the proper text view.\n\nThat said, it should be rather robust, and you can even call “Edit in TextMate” from within TextMate (in its Cocoa text views used e.g. in the Bundle Editor).\n\n\n# Source Code\n\nThe source code for the input manager is available here: <http://macromates.com/svn/Bundles/trunk/Tools/Edit%20in%20TextMate/>\n\nMARKDOWN\n\nhtml_footer",
62
+ input: "none",
63
+ name: "Install “Edit in TextMate”…",
64
+ output: "showAsHTML",
65
+ uuid: "61F92184-1A50-4310-9F75-C9CD2C8819FA"},
66
+ {beforeRunningCommand: "nop",
67
+ command:
68
+ "#!/usr/bin/env ruby -rjcode -KU\n\nBUNDLE_SUPPORT = ENV['TM_BUNDLE_SUPPORT']\nSUPPORT_PATH = ENV['TM_SUPPORT_PATH']\n\nPASTE_URL = ENV['TM_PASTIE_URL'] || 'http://pastie.textmate.org/pastes'\n\nrequire \"\#{BUNDLE_SUPPORT}/lib/doctohtml.rb\"\nrequire \"\#{SUPPORT_PATH}/lib/textmate\"\nrequire \"\#{SUPPORT_PATH}/lib/tm/detach\"\nrequire \"\#{SUPPORT_PATH}/lib/progress\"\nrequire \"\#{SUPPORT_PATH}/lib/escape\"\nrequire 'cgi'\nrequire 'fileutils'\nrequire 'zlib'\nrequire \"yaml\"\nrequire \"iconv\"\nrequire \"tempfile\"\n\ndef temp_script(script)\n dest = %x{ /usr/bin/mktemp -t tm_paste }.chomp\n at_exit { File.delete dest }\n FileUtils.cp(script, dest)\n dest\nend\n\n# example: [\"Colloquy\", \"#textmate\"] -> [ 2, 1 ]\ndef indices_for_names(names, tree)\n name = names.shift\n node = tree.find { |n| n[\"name\"] == name }\n return [ 0 ] if node.nil?\n res = [ tree.index(node) ]\n res += indices_for_names(names, node[\"children\"]) unless names.empty? || node[\"children\"].nil?\n return res\nend\n\n# example: [ 2, 1 ] -> [\"Colloquy\", \"#textmate\"]\ndef names_for_indices(indices, tree)\n node = tree[indices.shift.to_i]\n res = [ node[\"name\"] ]\n res += names_for_indices(indices, node[\"children\"]) unless indices.empty?\n return res\nend\n\nPREFS_FILE = \"\#{ENV['HOME']}/Library/Preferences/com.macromates.textmate.paste_online.yaml\"\n\ndef load_prefs(destinations)\n prefs = File.open(PREFS_FILE) { |file| YAML.load(file) } rescue { }\n selected = prefs['selectedDestinations'] || [ [ \"Paste to Colloquy:\", \"#textmate\" ] ]\n selected.collect! { |names| indices_for_names(names, destinations) }\n return { 'selectedDestinations' => selected }\nend\n\ndef save_prefs(params)\n selected = params['selectedDestinations'].dup\n selected.collect! { |indices| names_for_indices(indices.dup, params['destinations']) }\n File.open(PREFS_FILE, \"w\") { |file| YAML.dump({ 'selectedDestinations' => selected }, file) }\nend\n\ndef get_destinations\n destinations = []\n node = nil\n\n actions = %x{ osascript \#{e_sh temp_script(BUNDLE_SUPPORT + \"/get_destinations.scpt\")} }\n actions.split(\"\\n\").each do |action|\n if action =~ /^\\t(.+)/ then\n (node['children'] ||= [ ]) << { 'name' => $1 }\n else\n node = { 'name' => action }\n destinations << node\n end\n end\n\n destinations.sort! { |a, b| a['name'] <=> b['name'] }\n destinations.each { |e| e['children'].sort! { |a, b| a['name'] <=> b['name'] } if e.has_key? 'children' }\n\n prefs = load_prefs(destinations)\n\n window_title = if ENV.has_key? 'TM_SELECTED_TEXT'; 'Paste Selection Online'; else 'Paste Document Online'; end\n default_wrap = (ENV['TM_SCOPE'] =~ /^text\\./) ? 1 : 0\n parameters = {\n 'windowTitle' => window_title,\n 'destinations' => destinations,\n 'selectedDestinations' => prefs['selectedDestinations'],\n 'private' => true,\n 'lineWrap' => default_wrap,\n }.to_plist\n\n res = %x{ \"$DIALOG\" -cmp \#{e_sh parameters} pastebin }\n exit if $? != 0\n\n res = OSX::PropertyList.load(res)\n exit unless res.has_key? 'returnCode'\n\n save_prefs(res)\n\n actions = []\n res['selectedDestinations'].to_a.each do |index_array|\n path = []\n node = destinations\n index_array.each do |index|\n path << node[index.to_i]['name']\n node = node[index.to_i]['children']\n end\n actions << path.join(' ')\n end\n\n [ actions.join(\"\\n\"), res['private'], res['lineWrap'] ]\nend\n\nTM_APP_PATH = TextMate.app_path\n\ndef find_language_ext\n\tbundle_dirs = [\n\t\tFile.expand_path('~/Library/Application Support/TextMate/Bundles'),\n\t\t'/Library/Application Support/TextMate/Bundles',\n\t\tTM_APP_PATH + '/Contents/SharedSupport/Bundles'\n\t]\n\n if scope = ENV['TM_SCOPE'] then\n scope = scope.split(' ').first\n bundle_dirs.each do |dir|\n Dir.glob(dir + '/*.tmbundle/Syntaxes/*.{plist,tmLanguage}') do |filename|\n File.open(filename) do |io|\n begin\n plist = OSX::PropertyList.load(io)\n if scope == plist['scopeName'].to_s then\n return Array(plist['fileTypes']).first || 'txt'\n end\n rescue Exception => e\n abort \"Error while parsing “\#{filename}”\\n\\n\#{e}\"\n end\n end\n end\n end\n end\n\n ext = File.extname(ENV['TM_FILENAME'].to_s).sub(/\\A\\./, '')\n ext.empty? ? 'txt' : ext\nend\n\ndef strip_leading(text, ch = ' ')\n count = text.gsub(/<[^>]+>/, '').split(\"\\n\").map { |e| e =~ /^\#{ch}*(?!\#{ch}|$)/ ? $&.length : nil }.reject { |e| e.nil? }.min\n text.send(text.respond_to?(:lines) ? :lines : :to_s).map { |line| count.times { line.sub!(/^((<[^>]+>)*)\#{ch}/, '\\1') }; line }.join\nend\n\nURL_REGEXP = %r{\n \\A(https?://) # scheme\n ([0-9a-z_!~*\\'()-]+\\.)* # tertiary domain(s) -- e.g. www. \n ([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\\. # second level domain \n ([a-z]{2,6}) # first level domain -- e.g. .com or .museum \n (:[0-9]{1,4})? # port number -- e.g. :80 \n ((/?)| # a slash isn’t required if there is no file name \n (/[0-9a-z_!~*\\'().;?:@&=+$,%#-]+)+/?)\\z # path\n }xi\n\ndef connect_to_server(name, url, *args)\n $status, res = :unknown, nil\n\n server = $1 if url =~ %r{.*?://(.*?)(/.*)?$}\n TextMate.call_with_progress(:title => \"Paste to \#{name}\", :message => \"Contacting Host “\#{server}”…\", :cancel => lambda { $status = :cancel; Process.kill(\"INT\", -Process.pid) }) do\n thr = Thread.new { sleep 60.0; $status = :timeout; Process.kill(\"INT\", -Process.pid) rescue nil }\n\n oldpgid = Process.getpgid(0)\n Process.setpgid(0, 0)\n rd, wr = IO.pipe\n pid = fork do\n STDOUT.reopen(wr)\n rd.close\n exec('curl', url, '-sLo/dev/null', '-w%{url_effective}', *args)\n end\n Process.setpgid(0, oldpgid)\n wr.close\n res = rd.read\n Process.wait(pid)\n\n $status = :success if $?.exitstatus == 0 && $status == :unknown\n\n thr.kill unless $status == :timeout\n thr.join\n end\n\n $status = :error if res !~ URL_REGEXP || res == url # pastie returns the initial URL on some errors\n return $status, res\nend\n\ndef paste_stdin(priv, wrap)\n xml = STDIN.read\n\n text_file = Tempfile.new('tm_paste_text')\n html_file = Tempfile.new('tm_paste_html')\n\n text_file << CGI::unescapeHTML(xml.gsub(/<[^>]*>/, ''))\n text_file.close\n\n gz = Zlib::GzipWriter.new(html_file)\n gz.write(document_to_html(strip_leading(strip_leading(xml, \" \"), \"\\t\")))\n gz.close\n html_file.close\n\n author = ENV['TM_AUTHOR'] || \"\#{ENV['TM_FULLNAME']} (\#{ENV['USER']})\"\n ext = find_language_ext\n\n start_time = Time.now\n $status, res = connect_to_server(\"Pastie\", PASTE_URL,\n \"-HExpect:\",\n \"-Fpaste[parser]=plaintext\",\n \"-Fpaste[restricted]=\#{priv}\",\n \"-Fpaste[wrap]=\#{wrap}\",\n \"-Fpaste[display_name]=\#{author}\",\n \"-Fpaste[file_extension]=\#{ext}\",\n \"-Fpaste[body]=<\#{text_file.path}\",\n \"-Fpaste[textmate_html_gz]=<\#{html_file.path}\"\n )\n\n open(File.expand_path('~/Library/Logs/Pastie.log'), 'a') do |io|\n amount = (File.size(text_file.path) + File.size(html_file.path)).to_s.gsub(/\\d{1,3}(?=(\\d{3})+(?!\\d))/, '\\0,') + \" bytes\"\n time_elapsed = '%.1f seconds' % (Time.now - start_time)\n io << start_time.strftime('%F %T %Z: ') <<\n case $status\n when :timeout then \"Timeout pasting \#{amount} after \#{time_elapsed}\\n\"\n when :cancel then \"User cancelled pasting of \#{amount} after \#{time_elapsed}\\n\"\n when :error then \"Unknown error after \#{time_elapsed} pasting \#{amount}\\n\"\n else \"Pasted \#{amount} in \#{time_elapsed}: \#{res}\\n\"\n end\n end\n\n paste_via_rafb = \n case $status\n when :timeout then TextMate::UI.alert(:warning, \"Timeout Pasting\", \"There was a problem pasting your text (timeout).\\nWould you like to use RAFB.net instead?\", \"Paste via RAFB\", \"Cancel\") != \"Cancel\"\n when :error then TextMate::UI.alert(:warning, \"Error Pasting\", \"There was a problem pasting your text (unknown).\\nWould you like to use RAFB.net instead?\", \"Paste via RAFB\", \"Cancel\") != \"Cancel\"\n else false\n end\n\n if paste_via_rafb\n mode = $& if ENV['TM_MODE'] =~ /^(C89|C|C\\+\\+|C#|Java|Pascal|Perl|PHP|PL\\/I|Python|Ruby|SQL|VB)$/\n $status, res = connect_to_server(\"RAFB.net\", \"http://rafb.net/paste/paste.php\",\n \"-Fnick=\#{ENV['USER']}\",\n \"-Fcvt_tabs=\#{ENV['TM_TAB_SIZE']}\",\n \"-Ftext=<\#{text_file.path}\",\n \"-Flang=\#{mode || \"Plain Text\"}\"\n )\n end\n\n return $status == :success ? res : nil\nend\n\nTextMate.detach {\n dests, priv, wrap = get_destinations\n unless dests.empty?\n if url = paste_stdin(priv, wrap)\n dests = Iconv.iconv('mac', 'utf-8', dests) if %x{ defaults read /System/Library/CoreServices/SystemVersion ProductVersion } =~ /\\A10\\.4/\n %x{ osascript \#{e_sh temp_script(BUNDLE_SUPPORT + \"/paste_to_destinations.scpt\")} \#{e_sh url} \#{e_sh dests} }\n end\n end\n}\n",
69
+ fallbackInput: "document",
70
+ input: "selection",
71
+ inputFormat: "xml",
72
+ keyEquivalent: "^~V",
73
+ name: "Paste Document / Selection Online…",
74
+ output: "discard",
75
+ uuid: "6E779E48-F146-49BF-B60C-EFDFD1380772"},
76
+ {beforeRunningCommand: "nop",
77
+ command: "cat > ${TMP:-/tmp}/TextMate-ScratchSnippet.txt",
78
+ fallbackInput: "line",
79
+ input: "selection",
80
+ keyEquivalent: "^~s",
81
+ name: "Record Scratch Snippet",
82
+ output: "discard",
83
+ uuid: "5F225755-5840-44CF-BC26-2D484DE833A0"},
84
+ {beforeRunningCommand: "nop",
85
+ command:
86
+ "#!/bin/sh\n\n{ osascript -e \"tell app \\\"$(basename \"$TM_APP_PATH\")\\\" to quit\"\n\n while ps >/dev/null -xp \"$PPID\"; do\n if (( ++n == 10 )); then\n \"$DIALOG\" </dev/null alert --title \"Relaunch Timed Out\" --body \"Unable to exit TextMate.\" --button1 OK\n exit\n fi\n sleep .2;\n done\n\n open \"$TM_APP_PATH\"\n\n} &>/dev/null &",
87
+ input: "none",
88
+ keyEquivalent: "^@q",
89
+ name: "Relaunch TextMate",
90
+ output: "discard",
91
+ uuid: "E5142394-B07A-11D9-8EC4-000D93589AF6"},
92
+ {beforeRunningCommand: "nop",
93
+ command:
94
+ "\"${TM_RUBY:=ruby}\" -- \"${TM_BUNDLE_SUPPORT}/bin/list_shortcuts.rb\"",
95
+ dontFollowNewOutput: true,
96
+ input: "none",
97
+ keyEquivalent: "^~@k",
98
+ name: "Show Keyboard Shortcuts",
99
+ output: "showAsHTML",
100
+ uuid: "970BA294-B667-11D9-8D53-00039369B986"}]