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,80 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "ruby -e '\nrequire ENV[\"TM_BUNDLE_SUPPORT\"] + \"/lib/historyList.rb\"\nprint HistoryList.new(STDIN.read + \"\\n> \").list.join(\"\\n\")\n' | pbcopy\n\necho \"Commands from selection/document placed into pasteboard\"",
6
+ fallbackInput: "document",
7
+ input: "selection",
8
+ keyEquivalent: "^@r",
9
+ name: "Copy Commands into Clipboard",
10
+ output: "showAsTooltip",
11
+ scope: "source.rapp-console",
12
+ uuid: "48E1CB3A-8349-46E4-86B0-671663712005"},
13
+ {beforeRunningCommand: "nop",
14
+ command:
15
+ "echo\ntest=`tail -c+2`\nosascript <<-APPLESCRIPT | tail -n +2 | perl -pe 'BEGIN {$/=undef} s/\\n\\z//'\ntell application \"System Events\"\n -- Get a reference to the text field\n set text_area to (process \"R\")'s (window \"R Console\")'s (scroll area 1)'s text area 1\n \n -- Get text before and after our command\n set oldtext to text_area's value\n tell application \"R\" to cmd \"${test//\\\"/\\\"}\" \n set newtext to text_area's value\n\n -- Find the difference between old and new\n text from (oldtext's length + 1) to -1 of newtext\nend tell\nAPPLESCRIPT",
16
+ fallbackInput: "line",
17
+ input: "selection",
18
+ keyEquivalent: "\n",
19
+ name: "Execute Line / Selection",
20
+ output: "afterSelectedText",
21
+ scope: "source.rapp-console",
22
+ uuid: "7AF6ADAA-E6F0-4B9D-B146-A62BDE600D74"},
23
+ {beforeRunningCommand: "nop",
24
+ command:
25
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"R Console (R.app) Bundle Help\" \"R\"\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" <<'MARKDOWN'\n\n# Introduction\n\nThe \"R Console (R.app)\" bundle provides some commands to remote the Mac OSX GUI R.app using AppleScript.\n \n# Commands\n\n- __Send Selection / Document to R.app__\n\n Executes the current document or selection in R.app and switches to R.app's Console.\n\n- __Show Line Output as Tool Tip__\n\n Executes the current line or selection in R.app and shows only the result as tooltip.\n \n- __Execute Line / Selection__\n\n Executes the current line or selection in R.app and inserts the result into the current document.\n \n- __Copy Commands into Clipboard__\n\n Parses the current document or selection for lines beginning with \"> \" and pastes all found commands into the clipboard.\n \n- __Show History List__\n\n Shows as inline menu all commands entered in the current document.\n\n- __Next/Previous History Item__\n\n Inserts the next/previous command found in the current document.\n\n ***Notes***\n <blockquote>\n All commands specified within the \"R\" bundle can be used.\n </blockquote>\n <blockquote>\n If the \"Rdaemon\" also runs in the background and the library \"CarbonEL\" (R 2.6.x) or RQuartz (R 2.7.x) is loaded the communication between TextMate and R.app wont't work caused by the issue that the event loop handler (R 2.6.x) resp. the RQuartz window handler (R 2.7.x) has the same name \"R\".\n </blockquote>\n\n\n# Main Bundle Maintainer\n\n***Date: Mai 20 2008***\n\n<pre>\n- Charilaos Skiadas&nbsp;<a href=\"mailto:cskiadas@gmail.com\">cskiadas@gmail.com</a>\n- Hans-Jörg Bibiko&nbsp;&nbsp;<a href=\"mailto:bibiko@eva.mpg.de\">bibiko@eva.mpg.de</a>\n</pre>\n\nMARKDOWN\nhtml_footer",
26
+ input: "none",
27
+ keyEquivalent: "",
28
+ name: "Help",
29
+ output: "showAsHTML",
30
+ scope: "source.rapp-console",
31
+ uuid: "CAEB703B-1D79-4D3A-90BB-2A2C2BD846F7"},
32
+ {beforeRunningCommand: "nop",
33
+ command:
34
+ "#!/usr/bin/ruby\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/historyList.rb\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/exit_codes.rb\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/escape.rb\"\ndoc = STDIN.read\nnew_doc = HistoryList.move_down(doc)\nTextMate.exit_discard if new_doc == doc\nprint e_sn(new_doc)",
35
+ fallbackInput: "document",
36
+ input: "selection",
37
+ keyEquivalent: "",
38
+ name: "Next History Item",
39
+ output: "insertAsSnippet",
40
+ scope: "source.rapp-console",
41
+ uuid: "C1302FC5-FDC8-4560-8DFF-2CEC85EFCD19"},
42
+ {beforeRunningCommand: "nop",
43
+ command:
44
+ "#!/usr/bin/ruby\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/historyList.rb\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/exit_codes.rb\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/escape.rb\"\ndoc = STDIN.read\nnew_doc = HistoryList.move_up(doc)\nTextMate.exit_discard if new_doc == doc\nprint e_sn(new_doc)",
45
+ fallbackInput: "document",
46
+ input: "selection",
47
+ keyEquivalent: "",
48
+ name: "Previous History Item",
49
+ output: "insertAsSnippet",
50
+ scope: "source.rapp-console",
51
+ uuid: "2CE460A3-ADAE-47B6-8A89-EE142C714CC2"},
52
+ {beforeRunningCommand: "nop",
53
+ command:
54
+ "# input is selection or document\nrawText=\"`cat`\"\n\ncurDir=''\nif [[ ${#TM_DIRECTORY} -gt 0 ]]; then\n\tcurDir=\"$TM_DIRECTORY\"\nfi\n\nosascript -e 'on run(theCode)' \\\n\t\t -e 'tell application \"R\" to activate' \\\n\t\t -e 'if (item 2 of theCode) is not \"\" then tell application \"R\" to cmd \"setwd('\\''\" & (item 2 of theCode) & \"'\\'')\"' \\\n\t\t -e 'tell application \"R\" to cmd (item 1 of theCode)' \\\n\t\t -e 'end run' -- \"$rawText\" \"$curDir\"\n",
55
+ input: "selection",
56
+ keyEquivalent: "@R",
57
+ name: "Send Document / Selection to R.app",
58
+ output: "showAsTooltip",
59
+ scope: "source.rapp-console",
60
+ uuid: "B2E62E8B-6E70-11D9-A369-000D93B3A10E"},
61
+ {beforeRunningCommand: "nop",
62
+ command:
63
+ "#!/usr/bin/ruby\nrequire ENV['TM_BUNDLE_SUPPORT'] + \"/lib/historyList.rb\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/ui.rb\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/exit_codes.rb\"\nrequire ENV['TM_SUPPORT_PATH'] + \"/lib/escape.rb\"\ndoc = STDIN.read\nlist = HistoryList.new(doc)\nchoice = TextMate::UI.menu(list.list)\nTextMate.exit_discard if choice.nil?\nprint e_sn(list.add_line(list.list[choice]))",
64
+ fallbackInput: "document",
65
+ input: "selection",
66
+ keyEquivalent: "^~",
67
+ name: "Show History List",
68
+ output: "insertAsSnippet",
69
+ scope: "source.rapp-console",
70
+ uuid: "613CDD87-1F8B-484E-B741-74B95F3C878B"},
71
+ {beforeRunningCommand: "nop",
72
+ command:
73
+ "echo\n#test=`tail -c+2`\ntest=$(cat)\nosascript <<-APPLESCRIPT | tail -n +2 | perl -pe 'BEGIN {$/=undef} s/> $//;s/\\n\\z//'\ntell application \"System Events\"\n -- Get a reference to the text field\n set text_area to (process \"R\")'s (window \"R Console\")'s (scroll area 1)'s text area 1\n \n -- Get text before and after our command\n set oldtext to text_area's value\n tell application \"R\" to cmd \"${test//\\\"/\\\"}\" \n set newtext to text_area's value\n\n -- Find the difference between old and new\n text from (oldtext's length + 1) to -1 of newtext\nend tell\nAPPLESCRIPT",
74
+ fallbackInput: "line",
75
+ input: "selection",
76
+ keyEquivalent: "^@r",
77
+ name: "Show Line Output as Tool Tip",
78
+ output: "showAsTooltip",
79
+ scope: "source.rapp-console",
80
+ uuid: "1A8EC6F7-D254-4888-9095-75C9DBA519F7"}]
@@ -0,0 +1,414 @@
1
+ # Encoding: UTF-8
2
+
3
+ [{beforeRunningCommand: "nop",
4
+ command:
5
+ "ERR=$(osascript -e 'tell application \"System Events\" to set frontmost of process \"R\" to true' 2>&1)\n\n#[[ ! -z $ERR ]] && echo \"Sorry, no success to call CarbonEL\"",
6
+ input: "none",
7
+ keyEquivalent: "~@g",
8
+ name: "Bring All Quartz Windows to Front",
9
+ output: "showAsTooltip",
10
+ scope: "source.rd.console",
11
+ uuid: "E0880424-74E2-49FF-B8BE-99496443A5C7"},
12
+ {beforeRunningCommand: "nop",
13
+ command:
14
+ "echo -n > \"$HOME/Library/Application Support/Rdaemon/history/Rhistory.txt\"\necho -n 0 > \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistcounter.txt",
15
+ input: "none",
16
+ keyEquivalent: "~@t",
17
+ name: "Clear History",
18
+ output: "showAsTooltip",
19
+ scope: "source.rd.console",
20
+ uuid: "73281DA3-A3F5-4103-B94F-303B32498440"},
21
+ {beforeRunningCommand: "nop",
22
+ command:
23
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\n\nANS=$(\"$DIALOG\" -e -p '{messageTitle=\"Rdaemon\";alertStyle=\"critical\";informativeText=\"Do you really want to clear the entire workspace?\";buttonTitles=(\"Clear\",\"Cancel\");}')\nif [ \"$ANS\" == \"0\" ]; then\n\techo \"@|rm(list=ls());gc(reset=TRUE)\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in\n\techo \"Workspace is empty.\"\nelse\n\techo \"Task was cancelled.\"\nfi",
24
+ input: "none",
25
+ keyEquivalent: "~@w",
26
+ name: "Clear Workspace",
27
+ output: "showAsTooltip",
28
+ scope: "source.rd.console",
29
+ uuid: "E17C7056-8C4F-4738-A9B9-891D30E635DF"},
30
+ {beforeRunningCommand: "nop",
31
+ command:
32
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\n\necho -e \"@|graphics.off()\\n\" > \"$HOME/Library/Application Support/Rdaemon/r_in\"",
33
+ input: "none",
34
+ keyEquivalent: "~@g",
35
+ name: "Close all Graphic Devices",
36
+ output: "showAsTooltip",
37
+ scope: "source.rd.console",
38
+ uuid: "C52208F6-DC46-4F56-AFBA-BA69F7C0F89E"},
39
+ {beforeRunningCommand: "nop",
40
+ command:
41
+ "\nRDHOME=\"$HOME/Library/Application Support/Rdaemon\"\nif [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$RDHOME\"\nfi\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\n\nfunction getSig {\n\t[[ -e \"$RDRAMDISK\"/r_tmp ]] && rm \"$RDRAMDISK\"/r_tmp\n\n\t#get R's PID\n\tRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\t#check whether Rdaemon runs\n\ttest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\n\tWORD=$1\n\tTASK=\"@|sink('$RDRAMDISK/r_tmp')\"\n\techo \"$TASK\" > \"$RDHOME\"/r_in\n\tTASK=\"@|cat(paste(.getSig(if ('${WORD}' %in% (ary0815 <- sort(apropos('${WORD}', mode='function')))) '${WORD}' else ary0815), collapse='\\\\n'))\"\n\techo \"$TASK\" > \"$RDHOME\"/r_in\n\tTASK=\"@|rm(ary0815); sink(file=NULL)\"\n\techo \"$TASK\" > \"$RDHOME\"/r_in\n\n\twhile [ 1 ]\n\tdo\n\t\tRES=$(tail -c 2 \"$RDRAMDISK\"/r_out)\n\t\t#expect these things from R\n\t\t[[ \"$RES\" == \"> \" ]] && break\n\t\t[[ \"$RES\" == \"+ \" ]] && break\n\t\t[[ \"$RES\" == \": \" ]] && break\n\t\tsleep 0.05\n\tdone\n\texport RES=$(cat \"$RDRAMDISK\"/r_tmp)\n\n}\n\nWORD=$(ruby -- <<-SCR1 \nrequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/current_word.rb\")\nword = Word.current_word('\\w\\.')\\w./)\nprint word\nSCR1\n)\n\nWORDORG=\"$WORD\"\n\ngetSig \"^$WORDORG\"\n\nif [ \"${#RES}\" -eq 0 ]; then\n\techo \"No signatur found for '$WORDORG'\"\n\texit_show_tool_tip\nfi\n\nruby -- <<-SCRIPT 2> /dev/null\nrequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/exit_codes.rb\")\nrequire \"\#{ENV[\"TM_SUPPORT_PATH\"]}/lib/ui\"\nword = \"$WORD\"\nwordorg = \"$WORDORG\"\ntext = ENV['RES']\nfuns = text.split(\"\\n\")\nfunctions = funs.select{|item| item =~ /^\#{word}/}\nfunc = funs.select{|item| item !~ /^\#{word}/}\nf = func.collect { |f| f[0...f.index(\"(\")] }\nfp = f.join(\"\\n\")\nTextMate.exit_show_tool_tip(\"Only found :\\n\#{fp}\") if functions.size < 1\n\nif functions.size == 1\n function = functions.first\nelse\n\tidx = TextMate::UI.menu functions.collect { |f| f[0...f.index(\"(\")] }\n\tTextMate.exit_discard if idx.nil?\n\tfunction = functions[idx]\nend\n#TextMate.exit_discard if function.empty?\nif ENV['TM_SELECTED_TEXT'].nil? or ENV['TM_SELECTED_TEXT'].empty?\n print function[wordorg.length..-1]\nelse\n print function\nend\nSCRIPT\n",
42
+ fallbackInput: "none",
43
+ input: "selection",
44
+ keyEquivalent: "^$",
45
+ name: "Command Template",
46
+ output: "insertAsSnippet",
47
+ scope: "source.rd.console",
48
+ uuid: "32812513-77C4-4C5C-9D8D-6467680759F7"},
49
+ {beforeRunningCommand: "nop",
50
+ command:
51
+ "n=$'\\n'\n\ncat <<-AS | iconv -f UTF-8 -t MACROMAN | osascript --\n tell application \"AppleScript Editor\"\n activate\n set theDocument to make new document\n tell theDocument\n set contents of selection to \"tell application \\\"TextMate\\\" $n activate $n tell application \\\"System Events\\\" to keystroke \\\"r\\\" using {control down, command down, option down} $n end tell\"\n try\n check syntax\n save as \"application bundle\" in posix file \"$HOME/Desktop/TM_Rdaemon.app\" run only TRUE startup screen FALSE\n on error error_message number the error_number\n display dialog \"Error: \" & the error_number & \". \" & the error_message buttons {\"OK\"} default button 1\n end try\n end tell\n quit\n end tell\nAS\n\ncp \"$TM_BUNDLE_PATH\"/Support/lib/TMRdaemonLogo.icns ~/Desktop/TM_Rdaemon.app/Contents/Resources/\n\ncat ~/Desktop/TM_Rdaemon.app/Contents/Info.plist | perl -e '$/=\"\";$pl=<>;$pl=~s!(CFBundleIconFile</key>\\n\\t{1,}<string>)(.*?)(</string>)!$1TMRdaemonLogo$3!;print $pl' > ~/Desktop/TM_Rdaemon.app/Contents/Info1.plist\nrm ~/Desktop/TM_Rdaemon.app/Contents/Info.plist\ncat ~/Desktop/TM_Rdaemon.app/Contents/Info1.plist > ~/Desktop/TM_Rdaemon.app/Contents/Info.plist\nrm ~/Desktop/TM_Rdaemon.app/Contents/Info1.plist",
52
+ input: "none",
53
+ name: "Create TM_Rdaemon.app",
54
+ output: "showAsTooltip",
55
+ scope: "source.rd.console",
56
+ uuid: "F43C0D32-2402-4542-8FB9-EF9AF960E3B9"},
57
+ {beforeRunningCommand: "nop",
58
+ command: "mate \"$HOME/Library/Application Support/Rdaemon\"/startOptions.R",
59
+ input: "none",
60
+ keyEquivalent: "~@c",
61
+ name: "Edit StartOptions",
62
+ output: "discard",
63
+ scope: "source.rd.console",
64
+ uuid: "48D80FF3-4866-4ECD-8637-B3E4F6FCDB02"},
65
+ {beforeRunningCommand: "nop",
66
+ bundleUUID: "B5A22967-2E6A-4B66-9C71-DA8762C01E27",
67
+ command: ". \"$TM_BUNDLE_SUPPORT\"/bin/execute.sh",
68
+ fallbackInput: "line",
69
+ input: "selection",
70
+ keyEquivalent: "",
71
+ name: "Execute Line / Selection",
72
+ output: "insertAsSnippet",
73
+ scope: "source.rd.console",
74
+ uuid: "10522958-CCD6-4404-A582-1027A8A1EF87"},
75
+ {beforeRunningCommand: "nop",
76
+ bundleUUID: "B5A22967-2E6A-4B66-9C71-DA8762C01E27",
77
+ command:
78
+ "######### global variables #########\n\nRDHOME=\"$HOME/Library/Application Support/Rdaemon\"\nif [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$RDHOME\"\nfi\n\n\n######### begin script #########\n\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\n#check free space on ram drive\nif [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRES=$(df -H | grep TMRramdisk1 | awk '{ print $5 }' | perl -e 'print <>+0;')\n\tif [ $RES -gt 96 ]; then\n\t\t\"$DIALOG\" -e -p '{messageTitle=\"Rdaemon – RAM drive – Security Alert\"; alertStyle=\"critical\"; informativeText=\"Free disk space is less than 3%!\\nFor safety reasons save your data image and restart the Rdaemon!\";}' >/dev/null\n\t\techo \"RAM drive on '/tmp/TMRramdrive1':\"\n\t\tRES=$(df -H | grep TMRramdisk1 | awk '{ print $5 }')\n\t\techo -n \" $RES are used of\"\n\t\tRES=$(df -H | grep TMRramdisk1 | awk '{ print $2 }')\n\t\techo -n \" $RES.\"\n\t\texit 206\n\tfi\nfi\n\n#get the task from TM and delete beginning >+: SPACE TAB\nTASK=$(cat | sed -e 's/Browse\\[.*\\]//;s/^[>+:] \\{0,1\\}//;s/\t/ /g;s/\\\\/\\\\\\\\/g;')\n\n#check named input pipe for safety reasons\nif [ ! -p \"$RDHOME\"/r_in ]; then\n\techo -en \"Rdaemon Error:\\nThe pipe /tmp/r_in is not found!\\n\\nYou have to kill Rdaemon manually!\"\n\texit 206\nfi\n\n#check if user wants to quit\nQTASK=$(echo -en \"$TASK\" | perl -pe 's/ *//g')\nif [ \"$QTASK\" == \"q()\" -o \"$QTASK\" == \"quit()\" ]; then\n\tANS=$(\"$DIALOG\" -e -p \"{messageTitle='Closing Rdaemon';informativeText='Save workspace image?';buttonTitles=('Save','Cancel','Don\\'t Save');}\")\n\tif [ \"$ANS\" == \"1\" ]; then\n\t\techo -en \"> \"\n\t\texit 204\n\telse\n\t\tif [ \"$ANS\" == \"0\" ]; then\n\t\t\techo -e \"@|q()\\n@|y\\n\" > \"$RDHOME/r_in\"\n\t\tfi\n\t\tif [ \"$ANS\" == \"2\" ]; then\n\t\t\techo -e \"@|q()\\n@|n\\n\" > \"$RDHOME/r_in\"\n\t\tfi\n\t\tif [ ! -e \"$RDHOME\"/daemon/x11runs ]; then\n\t\t\tosascript <<-AS &>/dev/null\n\t \t\t\tignoring application responses\n\t \t\t\ttell application \"X11\" to quit\n\t \t\t\tend ignoring\n\t\t\tAS\n\t\tfi\n\t\texit 200\n\tfi\nfi\n\n#set history counter to 0\necho -n 0 > \"$RDHOME/history\"/Rhistcounter.txt\n\n#send task to Rdaemon and give Rdaemon the chance to read from the pipe\necho -e \"@|sink('$RDHOME/r_res')\" > \"$RDHOME\"/r_in\n#send task to Rdaemon\nif [ -z \"$TM_SELECTED_TEXT\" ]; then\n\techo -e \"$TASK\" > \"$RDHOME\"/r_in\nelse\n\texport token=$(\"$DIALOG\" -a ProgressDialog -p \"{title=Rdaemon;isIndeterminate=1;summary='Sending task to Rdaemon…';}\")\n\techo -e \"$TASK\" | while read LINE\n\tdo\n\t\techo -e \"$LINE\" > \"$RDHOME\"/r_in\n\t\tsleep 0.002\n\t\t\"$DIALOG\" -t $token -p \"{details='${LINE//\\'/’}';}\" 2&>/dev/null\n\tdone\n\t\"$DIALOG\" -x $token 2&>/dev/null\nfi\necho \"@|sink(file=NULL)\" > \"$RDHOME\"/r_in\n\necho \"Result is being written into 'r_res'\"\nexit_show_tool_tip\n",
79
+ fallbackInput: "line",
80
+ input: "selection",
81
+ keyEquivalent: "$",
82
+ name: "Execute Line / Selection (Background r_res)",
83
+ output: "showAsTooltip",
84
+ scope: "source.rd.console",
85
+ uuid: "60C2BE95-B3D8-4BB4-ACBC-8638E8CEC58F"},
86
+ {beforeRunningCommand: "nop",
87
+ command:
88
+ "TASK=$(cat | perl -pe 's/^> \\s*//')\nTASK=\"ifelse(is.null(dim($TASK)),write($TASK, '|pbcopy'),write.table($TASK, file=pipe('pbcopy'),quote=F,row.names=F, sep='\\t'))\"\n\necho \"@|$TASK\" | \"$TM_BUNDLE_SUPPORT\"/bin/execute.sh > /dev/null &\n\n# | sed '1d;$d' | pbcopy",
89
+ fallbackInput: "line",
90
+ input: "selection",
91
+ keyEquivalent: "$",
92
+ name: "Execute Line / Selection and Copy into Pasteboard",
93
+ output: "showAsTooltip",
94
+ scope: "source.rd.console",
95
+ uuid: "CDBEF676-C47F-492B-B005-BFC7426798B9"},
96
+ {beforeRunningCommand: "nop",
97
+ command:
98
+ "RUBYRUN=$(ps xw | grep 'Rdaemon\\.rb')\nRRUN=$(ps aw | grep 'Librar.*--TMRdaemon')\nif [ ! ${#RRUN} == 0 -a ! ${#RUBYRUN} == 0 ]; then\n\tRUBYRUN=$(echo -en \"$RUBYRUN\" | awk '{print $1;}')\n\tRRUN=$(echo -en \"$RRUN\" | awk '{print $1;}')\n\tkill $RUBYRUN\n\t#kill $RRUN\n\techo -e \"Rdaemon was killed!\"\nelse\n\techo -e \"Rdaemon is not running!\"\nfi\n\nif [ ! -e \"$HOME/Library/Application Support/Rdaemon/daemon/x11runs\" ]; then\nosascript <<-AS &>/dev/null\n \ttell application \"X11\"\n \t\tquit\n \tend tell\nAS\nfi\n",
99
+ input: "selection",
100
+ name: "Force Kill Rdaemon",
101
+ output: "showAsTooltip",
102
+ scope: "source.rd.console",
103
+ tabTrigger: "kill",
104
+ uuid: "6B70DCAD-E1F1-4080-B50C-442C628842A8"},
105
+ {beforeRunningCommand: "nop",
106
+ command: "\"$HOME/Library/Application Support/Rdaemon/help/grMan.sh\"\n",
107
+ input: "none",
108
+ keyEquivalent: "~@g",
109
+ name: "Graphic Manager",
110
+ output: "showAsHTML",
111
+ scope: "source.rd.console",
112
+ uuid: "26515667-4135-43CB-B706-19BA1D604131"},
113
+ {beforeRunningCommand: "nop",
114
+ command:
115
+ ". \"$TM_SUPPORT_PATH/lib/webpreview.sh\"\nhtml_header \"R Console (Rdaemon) Bundle Help\" \"R\"\n\"$TM_SUPPORT_PATH/lib/markdown_to_help.rb\" \"$TM_BUNDLE_SUPPORT/lib/help.markdown\"\nhtml_footer",
116
+ input: "none",
117
+ name: "Help",
118
+ output: "showAsHTML",
119
+ scope: "source.rd.console",
120
+ uuid: "3BDDFA7D-5095-4665-8906-718DF27CD3F9"},
121
+ {beforeRunningCommand: "nop",
122
+ command:
123
+ "[[ -d \"$HOME/Library/Application Support/Rdaemon\" ]] && echo -e \"'$HOME/Library/Application Support/Rdaemon' already exists! Please remove it first.\" && exit_show_tool_tip\ncp -R \"$TM_BUNDLE_SUPPORT\"/Rdaemon \"$HOME/Library/Application Support/Rdaemon\"\necho -e \"Rdaemon was installed in:\\n'$HOME/Library/Application Support/Rdaemon'\"",
124
+ input: "none",
125
+ name: "Install Rdaemon",
126
+ output: "showAsTooltip",
127
+ scope: "source.rd.console",
128
+ tabTrigger: "installrd",
129
+ uuid: "C25F0701-67B0-44A4-AD75-76BD7F7EFF7F"},
130
+ {beforeRunningCommand: "nop",
131
+ command:
132
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\nif [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$HOME/Library/Application Support/Rdaemon\"\nfi\n\necho \"@|sink('$RDRAMDISK/r_tmp');cat(getwd());sink(file=NULL)\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in\nsleep 0.1\nCURDIR=$(cat \"$RDRAMDISK\"/r_tmp)\nif [ ! -e \"$CURDIR/.RData\" ]; then\n\techo \"No file .RData found in current working directory '$CURDIR'.\"\nelse\n\techo \"@|load(file='$CURDIR/.RData')\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in\n\tsleep 0.1\n\techo \"Workspace loaded\"\nfi",
133
+ input: "none",
134
+ keyEquivalent: "~@w",
135
+ name: "Load Default Workspace",
136
+ output: "showAsTooltip",
137
+ scope: "source.rd.console",
138
+ uuid: "5D4BA313-66B4-4674-9E55-DB56F788587B"},
139
+ {beforeRunningCommand: "nop",
140
+ bundleUUID: "DA2A7475-3FDF-4D66-A796-1C45F6BBF5B9",
141
+ command:
142
+ "VAR=$(ruby -- <<-SCR1 \n\trequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/current_word.rb\")\n\tword = Word.current_word('\\w\\.')\nprint word\nSCR1\n)\n\n[[ -z $VAR ]] && exit_discard\n\nif [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$HOME/Library/Application Support/Rdaemon\"\nfi\n\nTASK=\"@|cat(is.matrix($VAR))\"\nRES=$(\"$HOME/Library/Application Support/Rdaemon\"/daemon/execRStr.sh \"$TASK\" | tail -n 1)\n[[ \"$RES\" != \"TRUE> \" ]] && echo \"'$VAR' is not a matrix.\" && exit_show_tool_tip\n\nTASK=\"@|sink('$RDRAMDISK/r_tmp');cat(dim($VAR)[1], sep='\\\\\\\\\\\\\\n');cat(dim($VAR)[2], sep='\\\\\\\\\\\\\\n');if(is.null(dimnames($VAR)[1]) || length(dimnames($VAR)[[1]])==0) cat(paste('[', c(1:dim($VAR)[1]), ',]', sep=''),sep='\\\\\\\\\\\\\\n') else cat(dimnames($VAR)[[1]], sep='\\\\\\\\\\\\\\n');if(is.null(dimnames($VAR)[2]) || length(dimnames($VAR)[[2]])==0) cat(paste('[,', c(1:dim($VAR)[2]), ']', sep=''),sep='\\\\\\\\\\\\\\n') else cat(dimnames($VAR)[[2]], sep='\\\\\\\\\\\\\\n');cat(t($VAR), sep='\\\\\\\\\\\\\\n');sink(file=NULL);\"\n\"$HOME/Library/Application Support/Rdaemon\"/daemon/execRStr.sh \"$TASK\" > /dev/null\n\nRES=$(cat \"$RDRAMDISK/r_tmp\")\nROWS=$(echo -e \"$RES\" | head -n 1 )\nRES=$(echo -e \"$RES\" | sed '1,1d')\nCOLS=$(echo -e \"$RES\" | head -n 1 )\n\nLC=$(($ROWS * 26 + 135))\n[[ $LC -gt 630 ]] && LC=630\ncat <<HTML0 \n<html>\n<head>\n<title>Rdaemon &mdash; Matrix Editor</title>\n<style type=\"text/css\">\n<!--\nINPUT {\nborder: #AAAAAA 0px solid;\nbackground-color: #FFFFFF;\ntext-align:right;\nfont-family:Monaco\n}\nBODY {\nfont-family:Monaco;\n}\n.var {\nborder: lightgrey 0px dotted;\nbackground-color: white;\ntext-align:left;\ntext-weight:bold;\nfont-size:11pt;\n}\n.var1 {\nborder: lightgrey 0px dotted;\nbackground-color: #ECECEC;\ntext-align:center;\nfont-size:8pt;\n}\n.var2 {\nborder: lightgrey 0px dotted;\nbackground-color: #ECECEC;\ntext-align:right;\nfont-size:8pt;\n}\n-->\n</style>\n<script type=\"text/javascript\">\n\tfunction saveIt() {\n\t\tTextMate.isBusy = true;\n\t\tvar reg = new RegExp(\"(^\\\"?\\-?[0-9\\.]+[0-9]*\\\"?$)|(^NA$)\");\n\t\tvar data = new Array();\n\t\tvar dim=$COLS*$ROWS;\n\t\tvar rownames = new Array();\n\t\tif (document.getElementById(\"row_1\").value.substr(0,1)!=\"[\") {\n\t\t\tfor (var i=1; i<=$ROWS; i++) {\n\t\t\t\tvar rn = document.getElementById(\"row_\"+String(i));\n\t\t\t\trownames.push(\"as.character(\\\"\"+rn.value+\"\\\")\");\n\t\t\t}\n\t\t\tvar rnames = \"c(\" + rownames.join(\",\") + \")\";\n\t\t} else {\n\t\t\tvar rnames = \"NULL\";\n\t\t}\n\t\tvar colnames = new Array();\n\t\tif (document.getElementById(\"col_1\").value.substr(0,1)!=\"[\") {\n\t\t\tfor (var i=1; i<=$COLS; i++) {\n\t\t\t\tvar rn = document.getElementById(\"col_\"+String(i));\n\t\t\t\tcolnames.push(\"as.character(\\\"\"+rn.value+\"\\\")\");\n\t\t\t}\n\t\t\tvar cnames = \"c(\" + colnames.join(\",\") + \")\";\n\t\t} else {\n\t\t\tvar cnames = \"NULL\";\n\t\t}\n\t\tfor (var i=1; i<=dim; i++) {\n\t\t\tvar inp = document.getElementById(\"in_\"+String(i));\n\t\t\tif (inp.value.length == 0) {\n\t\t\t\tdata.push(\"NA\");\n\t\t\t} else {\n\t\t\t\tif (reg.test(inp.value)) {\n\t\t\t\t\tdata.push(inp.value);\n\t\t\t\t} else {\n\t\t\t\t\tdata.push(\"as.character(\\\"\"+inp.value+\"\\\")\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar cmd = \"echo '\" + document.getElementById(\"varname\").value +\"<-matrix(c(\" + data.join(\",\") + \"),ncol=$COLS,byrow=T,dimnames=list(\" + rnames + \",\" + cnames + \"))' > \"$HOME/Library/Application Support/Rdaemon\"/r_tmp;echo -e '@|source(\\\"$HOME/Library/Application Support/Rdaemon/r_tmp\\\")' > \"$HOME/Library/Application Support/Rdaemon\"/r_in\";\n\t\tTextMate.system(cmd,null);\n\t\tTextMate.isBusy = false;\n\t\twindow.close();\n\t}\n\tfunction init() {\n\t\tdocument.getElementById('in_1').focus();\n\t\t//window.resizeTo(480,$LC);\n\t}\n\tfunction keyalert(index)\n\t{\n\t\tvar VK_LEFT = 37;\n\t\tvar VK_UP = 38;\n\t\tvar VK_RIGHT = 39;\n\t\tvar VK_DOWN = 40;\n\t\tvar VK_PAGEUP = 33;\n\t\tvar VK_PAGEDOWN = 34;\n\t\tvar VK_ESC = 27;\n\t\tif (!event.altKey & !event.ctrlKey & !event.shiftKey) {\n\t\tswitch (event.keyCode){\n\t\t\tcase VK_ESC : {\n\t\t\t\t//window.close();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase VK_UP : {\n\t\t\t\tif (index>$COLS) {\n\t\t\t\t\tvar rind = 'in_' + String(index-$COLS)\n\t\t\t\t\tdocument.getElementById(rind).focus();\n\t\t\t\t\tdocument.getElementById(rind).select();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase VK_RIGHT : {\n\t\t\t\tif (index>0) {\n\t\t\t\t\tvar rind = 'in_' + String(index+1)\n\t\t\t\t\tdocument.getElementById(rind).focus();\n\t\t\t\t\tdocument.getElementById(rind).select();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase VK_LEFT : {\n\t\t\t\tif (index>1) {\n\t\t\t\t\tvar rind = 'in_' + String(index-1)\n\t\t\t\t\tdocument.getElementById(rind).focus();\n\t\t\t\t\tdocument.getElementById(rind).select();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase VK_DOWN : {\n\t\t\t\tif (index<document.getElementsByTagName(\"input\").length) {\n\t\t\t\t\tvar rind = 'in_' + String(index+$COLS)\n\t\t\t\t\tdocument.getElementById(rind).focus();\n\t\t\t\t\tdocument.getElementById(rind).select();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t}\n\t}\n</script>\n</head>\n<body>\n<center>\n<div style=\"background-color:white;padding:2mm\">\n<font color=grey><small>matrix:</small></font> <input id=varname size=10 class=var value=\"$VAR\" id=\"var\">\n</div>\n<table border=1 style=\"border-collapse:collapse;\">\n\n\nHTML0\n\ncat \"$RDRAMDISK/r_tmp\" | perl -e '\n$cols=<>;chomp($cols);\n$rows=<>;chomp($rows);\n@rownames=();\n@colnames=();\nfor($i=0;$i<$cols;$i++) {\n\t$item=<>;\n\tchomp($item);\n#\t$item =~ s/ /&nbsp;/g;\n\tpush(@colnames,\"$item\");\n}\nfor($i=0;$i<$rows;$i++) {\n\t$item=<>;\n\tchomp($item);\n#\t$item =~ s/ /&nbsp;/g;\n\tpush(@rownames,\"$item\");\n}\n$rcnt=1;\n$ccnt=0;\n$cnt=1;\nprint \"<tr><td bgcolor=#ECECEC align=right>&nbsp;</td>\";\nfor($i=1;$i<=$rows;$i++) {\n\tprint \"<td bgcolor=#ECECEC align=center><small><input id=col_$i size=8 type=text class=var1 value=\\\"\".$rownames[$i-1].\"\\\"></small></td>\";\n\tif(! ($i % 10)){\n\t\tprint \"<td bgcolor=#ECECEC align=right><small>&nbsp;</small></td>\\n\";\n\t}\n}\nprint \"</tr>\\n\";\n$flag=0;\nwhile(<>){\n\t$LINE=$_;\n\tchomp($LINE);\n\tif( $cnt>1 && (! (($cnt-1) % 10))){\n\t\t$rcnt--;\n\t\tprint \"<td bgcolor=#ECECEC align=center><small><small>\".$colnames[$rcnt-1].\"</small></td>\\n\";\n\t\t$rcnt++;\n\t}\n\tif($cnt==1 || (! (($cnt-1) % ($rows)))){\n\t\tif(! ($rcnt % 20)) {\n\t\tprint \"<tr><td bgcolor=#ECECEC>&nbsp;</td>\";\n\t\tfor($i=1;$i<=$rows;$i++) {\n\t\t\tprint \"<td bgcolor=#ECECEC align=right><small><small>\".$rownames[$i-1].\"</small></td>\";\n\t\t\tif(! ($i % 10)){\n\t\t\t\tprint \"<td bgcolor=#ECECEC align=right><small><small>&nbsp;</small></td>\\n\";\n\t\t\t}\n\t\t}\n\t\tprint \"</tr>\\n\";\n\t\t}\n\t\tprint \"<tr><td bgcolor=#ECECEC align=right><small><input id=row_$rcnt size=8 type=text class=var2 value=\\\"\".$colnames[$rcnt-1].\"\\\"></small></td>\\n\";\n\t\t$rcnt++;\n\t}\n\tprint \"<td><input id=in_$cnt size=8 type=\\\"text\\\" value=\\\"$LINE\\\" onkeyup=keyalert($cnt)></td>\\n\";\n\t$cnt++;\n}\n$rcnt--;\nprint \"<td bgcolor=#ECECEC align=center><small><small>\".$colnames[$rcnt-1].\"</small></td></tr>\\n\";\n'\n\ncat <<HTML5\n</table>\n<div style=\"margin-top:2mm;background-color:lightgrey;padding:2mm\">\n<button onclick=\"saveIt()\">&nbsp;Save&nbsp;</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button onclick=\"window.close()\">Cancel</button>\n</div>\n<script type=\"text/javascript\">window.onload = init;</script>\n</body>\n</html>\nHTML5\n\nexit_show_html\n",
143
+ input: "none",
144
+ name: "Matrix Editor (β)",
145
+ output: "showAsTooltip",
146
+ scope: "source.rd.console",
147
+ uuid: "627438F9-5393-4D64-A0ED-18F58A35F1CA"},
148
+ {beforeRunningCommand: "nop",
149
+ command:
150
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\necho -e \"@|quartz();plot.new()\\n\" > \"$HOME/Library/Application Support/Rdaemon/r_in\"",
151
+ input: "none",
152
+ keyEquivalent: "~@g",
153
+ name: "New Quartz Device",
154
+ output: "showAsTooltip",
155
+ scope: "source.rd.console",
156
+ uuid: "AAA400CC-29E7-44B3-8582-A78B654DEF5B"},
157
+ {beforeRunningCommand: "nop",
158
+ command:
159
+ "C=$(cat \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistcounter.txt)\n[[ \"$C\" == \"1\" ]] && exit_discard\nC=$(($C-1))\n\nL=$(tail -r \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistory.txt | uniq | cat -n | egrep \"^ *$C\t\" | sed 's/^.*\t//' )\n\necho -n $C > \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistcounter.txt\nL=$(echo \"$L\" | sed 's/\\\\/\\\\\\\\/g')\nL=${L//$/\\\\$}\nL=${L//\\`/\\\\\\`}\n\necho -n \"> $L\"",
160
+ fallbackInput: "line",
161
+ input: "selection",
162
+ keyEquivalent: "@",
163
+ name: "Next History Item",
164
+ output: "insertAsSnippet",
165
+ scope: "source.rd.console.prompt",
166
+ uuid: "2CAD539C-0C6C-45E9-AE28-7872204E4627"},
167
+ {beforeRunningCommand: "nop",
168
+ command:
169
+ "RDHOME=\"$HOME/Library/Application Support/Rdaemon\"\nif [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$RDHOME\"\nfi\n\n\nfunction getSig {\n\tWORD=$1\n\t[[ -e \"$RDRAMDISK\"/r_tmp ]] && rm \"$RDRAMDISK\"/r_tmp\n\tTASK=\"@|sink('$RDRAMDISK/r_tmp')\"\n\techo -e \"$TASK\" > \"$RDHOME\"/r_in\n\tTASK=\"@|try(cat(unlist(attributes($WORD)),sep=';'))\"\n\techo -e \"$TASK\" > \"$RDHOME\"/r_in\n\tTASK=\"@|sink(file=NULL)\"\n\techo -e \"$TASK\" > \"$RDHOME\"/r_in\n\n\t#get R's PID\n\tRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\t#check whether Rdaemon runs\n\ttest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\n\twhile [ 1 ]\n\tdo\n\t\tRES=$(tail -c 2 \"$RDRAMDISK\"/r_out)\n\t\t#expect these things from R\n\t\t[[ \"$RES\" == \"> \" ]] && break\n\t\t[[ \"$RES\" == \"+ \" ]] && break\n\t\t[[ \"$RES\" == \": \" ]] && break\n\t\tsleep 0.05\n\tdone\n\texport RES=$(cat \"$RDRAMDISK\"/r_tmp)\n\n}\n\nWORD=$(ruby -- <<-SCR1 \nrequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/current_word.rb\")\nword = Word.current_word('\\w\\.')\nprint word\nSCR1\n)\n\necho -en \"\\$\"\nif [ \"${#WORD}\" -eq 0 ]; then\n\texit_insert_text\nfi\n\nWORDORG=\"$WORD\"\n\ngetSig \"$WORDORG\"\n\nif [ \"${#RES}\" -eq 0 ]; then\n\texit_insert_text\nfi\n#echo -en \"$RES\" && exit_create_new_document\nruby -- <<-SCRIPT 2> /dev/null\nrequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/exit_codes.rb\")\nrequire \"\#{ENV[\"TM_SUPPORT_PATH\"]}/lib/ui\"\nword = \"$WORD\"\nwordorg = \"$WORDORG\"\ntext = ENV['RES']\nfuns = text.split(\";\")\nTextMate.exit_discard if funs.size < 1\n\nif funs.size == 1\n function = funs.first\nelse\n\tidx = TextMate::UI.menu(funs)\n\tTextMate.exit_discard if idx.nil?\n\tfunction = funs[idx]\nend\nTextMate.exit_discard if function.empty?\nprint function\nSCRIPT\n",
170
+ fallbackInput: "none",
171
+ input: "selection",
172
+ name: "Object's Attribute… (β)",
173
+ output: "openAsNewDocument",
174
+ scope: "source.rd.console",
175
+ uuid: "DC7AC092-0A49-4CB0-A0FE-6993963F5BC6"},
176
+ {beforeRunningCommand: "nop",
177
+ command:
178
+ "if [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tcat /tmp/TMRramdisk1/r_out| perl -e '\n\tundef($/); $a=<>;\n\t$a=~s/\\x0D{1,}/\\x0D/sg;\n\twhile($a=~m/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/) { $a=~s/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/$1$2$3/sg; }\n\t$a=~s/\\\\/\\\\\\\\/g;$a=~s/\\`/\\\\\\`/sg;$a=~s/\\$/\\\\\\$/sg;$a=~s/_\\x08//sg;\n\t$a=~s/\\x07//sg;\n\t$a .= \"\\n> \" if ($a!~/> $/ && $a!~/\\+ $/);\n\tprint \"$a\";\n' > \"$HOME/Library/Application Support/Rdaemon\"/r_out.R\n\tmate \"$HOME/Library/Application Support/Rdaemon\"/r_out.R\nelse\n\tcat \"$HOME/Library/Application Support/Rdaemon\"/r_out| perl -e '\n\tundef($/); $a=<>;\n\t$a=~s/\\x0D{1,}/\\x0D/sg;\n\twhile($a=~m/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/) { $a=~s/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/$1$2$3/sg; }\n\t$a=~s/\\\\/\\\\\\\\/g;$a=~s/\\`/\\\\\\`/sg;$a=~s/\\$/\\\\\\$/sg;$a=~s/_\\x08//sg;\n\t$a=~s/\\x07//sg;\n\t$a .= \"\\n> \" if ($a!~/> $/ && $a!~/\\+ $/);\n\tprint \"$a\";\n' > \"$HOME/Library/Application Support/Rdaemon\"/r_out.R\n\tmate \"$HOME/Library/Application Support/Rdaemon\"/r_out.R\nfi",
179
+ input: "none",
180
+ keyEquivalent: "~@t",
181
+ name: "Open Console Logfile r_out",
182
+ output: "showAsTooltip",
183
+ scope: "source.rd.console",
184
+ uuid: "DA39733A-10BB-4526-A0D2-20ECAD9FD965"},
185
+ {beforeRunningCommand: "nop",
186
+ command: "mate \"$HOME/Library/Application Support/Rdaemon/r_res\"",
187
+ input: "none",
188
+ keyEquivalent: "~@t",
189
+ name: "Open Result File r_res",
190
+ output: "showAsTooltip",
191
+ scope: "source.rd.console",
192
+ uuid: "A1B39ABA-7E6E-4023-8AE3-C9474E09B3E1"},
193
+ {beforeRunningCommand: "nop",
194
+ command: "mate \"$HOME/Library/Application Support/Rdaemon\"",
195
+ input: "none",
196
+ keyEquivalent: "~@t",
197
+ name: "Open “Rdaemon” as TM Project",
198
+ output: "showAsTooltip",
199
+ scope: "source.rd.console",
200
+ uuid: "85D5C6E2-0BD4-4F82-A686-42C76CF1CF90"},
201
+ {beforeRunningCommand: "nop",
202
+ command:
203
+ "if [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$HOME/Library/Application Support/Rdaemon\"\nfi\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\nprintframe() {\n\tcat <<-HF\n\t<HTML>\n\t<HEAD>\n\t<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n\t<TITLE>Rdaemon &mdash; Package Manager</TITLE>\n\t</HEAD>\n\t<FRAMESET ROWS=\"*,45%\" FRAMEBORDER=\"5\" FRAMESPACING=\"5\" BORDER=\"7\" FRAMEBORDER=\"YES\">\n\t\t<FRAME SRC=\"tm-file://${TM_BUNDLE_SUPPORT// /%20}/lib/pkman.html\" NAME=\"head\" MARGINWIDTH=\"30\" MARGINHEIGHT=\"0\" SCROLLING=\"YES\">\n\t\t<FRAME SRC=\"tm-file://${TM_BUNDLE_SUPPORT// /%20}/lib/pkdata.html\" NAME=\"data\" MARGINWIDTH=\"30\" MARGINHEIGHT=\"0\" SCROLLING=\"YES\">\n\t</FRAMESET>\n\t</HTML>\nHF\n\n}\n\nHEAD=\"$TM_BUNDLE_SUPPORT/lib/pkman.html\"\nDATA=\"$TM_BUNDLE_SUPPORT/lib/pkdata.html\"\n\n\ncat<<END > \"$HEAD\"\n<html><head><title>Rdaemon &mdash; Package Manager</title>\n<style type=\"text/css\">\n<!--\n.point {\n\tcursor:pointer;\n}\ntr {\n\t-webkit-transition: all 20ms ease-out;\n}\ntr:hover {\n\tbackground-color:lightblue;\n}\n-->\n</style>\n<script type=\"text/javascript\">\n\t\tfunction getR(Rcmd) {\n\t\t var cmd = '\"$HOME/Library/Application Support/Rdaemon/daemon/execRStr.sh\" \"@|'+Rcmd+'\"';\n\t\t document.getElementById(\"main\").innerHTML = \"<pre><font style='font-size:8pt'>\" + TextMate.system(cmd, null).outputString\n\t\t}\n function pkgMan(pkg) {\n\t\t var cmd; var Rcmd;\n\t\t\tif(pkg.checked == true) {\n\t\t\t\tRcmd = 'library(' + pkg.name + ')';\n\t\t\t cmd = '\"$HOME/Library/Application Support/Rdaemon/daemon/execRStr.sh\" \"@|'+Rcmd+'\"';\n\t\t\t myCommand = TextMate.system(cmd, function (task) { });\n\t\t\t} else {\n\t\t\t\tRcmd = 'detach(package:' + pkg.name + ')';\n\t\t\t\tcmd = '\"$HOME/Library/Application Support/Rdaemon/daemon/execRStr.sh\" \"@|'+Rcmd+'\"';\n\t\t\t\tmyCommand = TextMate.system(cmd, function (task) { });\n\t\t\t}\n\t\t}\n\t\tfunction show(arg) {\n\t\t\tparent.data.location.href = arg;\n\t\t}\n\n</script>\n</head>\n<body>\nEND\n\"$HOME/Library/Application Support/Rdaemon/daemon/execRStr.sh\" \"@|sink('$RDRAMDISK/r_tmp');source('~/Library/Application Support/Rdaemon/help/pkgMan.R');sink(file=NULL);\" > /dev/null\ncat \"$RDRAMDISK\"/r_tmp >> \"$HEAD\"\necho \"<html></html>\" > \"$DATA\"\nprintframe\nexit_show_html",
204
+ input: "none",
205
+ keyEquivalent: "~@p",
206
+ name: "Package Manager",
207
+ output: "discard",
208
+ scope: "source.rd.console",
209
+ uuid: "F349C212-E113-47F2-A4E3-95F6BF3C9310"},
210
+ {beforeRunningCommand: "nop",
211
+ command:
212
+ "C=$(cat \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistcounter.txt)\nC=$(($C+1))\n\nHC=$(wc -l \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistory.txt | awk '{print $1}')\n[[ $C -gt $HC ]] && exit_discard\n\nL=$(tail -r \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistory.txt | uniq | cat -n | egrep \"^ *$C\t\" | sed 's/^.*\t//' )\n\necho -n $C > \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistcounter.txt\nL=$(echo \"$L\" | sed 's/\\\\/\\\\\\\\/g')\nL=${L//$/\\\\$}\nL=${L//\\`/\\\\\\`}\n\necho -n \"> $L\"",
213
+ fallbackInput: "line",
214
+ input: "selection",
215
+ keyEquivalent: "@",
216
+ name: "Previous History Item",
217
+ output: "insertAsSnippet",
218
+ scope: "source.rd.console.prompt",
219
+ uuid: "C14369D7-79B8-4D9B-BB90-E91B36C79AF2"},
220
+ {beforeRunningCommand: "nop",
221
+ command:
222
+ "\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\necho -e \"@|q()\\n@|n\\n\" > \"$HOME/Library/Application Support/Rdaemon/r_in\"\n\nif [ ! -e \"$HOME/Library/Application Support/Rdaemon\"/daemon/x11runs ]; then\nosascript <<-AS &>/dev/null\n \ttell application \"X11\"\n \t\tquit\n \tend tell\nAS\nfi\n",
223
+ input: "none",
224
+ keyEquivalent: "~@c",
225
+ name: "Quit and Don't Save",
226
+ output: "showAsTooltip",
227
+ scope: "source.rd.console",
228
+ tabTrigger: "q",
229
+ uuid: "5323D41C-90B6-4CA0-A3D6-69E9AC9A7404"},
230
+ {beforeRunningCommand: "nop",
231
+ command:
232
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\necho -e \"@|q()\\n@|y\\n\" > \"$HOME/Library/Application Support/Rdaemon/r_in\"\n\nif [ ! -e \"$HOME/Library/Application Support/Rdaemon\"/daemon/x11runs ]; then\nosascript <<-AS &>/dev/null\n \ttell application \"X11\"\n \t\tquit\n \tend tell\nAS\nfi\n",
233
+ input: "none",
234
+ keyEquivalent: "~@c",
235
+ name: "Quit and Save",
236
+ output: "showAsTooltip",
237
+ scope: "source.rd.console",
238
+ tabTrigger: "q",
239
+ uuid: "48328ACB-AE0F-44FE-8655-D2043C866751"},
240
+ {beforeRunningCommand: "nop",
241
+ command:
242
+ "osascript &>/dev/null \\\n\t -e 'tell app \"SystemUIServer\" to activate' \\\n\t -e 'tell app \"TextMate\" to activate' &",
243
+ input: "none",
244
+ keyEquivalent: "~@t",
245
+ name: "Rescan Open Files",
246
+ output: "showAsTooltip",
247
+ scope: "source.rd.console",
248
+ uuid: "DD6DBA08-B4F1-491D-90DB-5FDB002112EC"},
249
+ {beforeRunningCommand: "nop",
250
+ command:
251
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\necho \"@|while(sink.number()>0){sink(file=NULL)}\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in\n",
252
+ input: "none",
253
+ keyEquivalent: "~@a",
254
+ name: "Reset Output",
255
+ output: "showAsTooltip",
256
+ scope: "source.rd.console",
257
+ uuid: "F607CDD3-CBED-4E4D-BB17-95B4BB0B8AF5"},
258
+ {beforeRunningCommand: "nop",
259
+ command: "open -a Finder \"$HOME/Library/Application Support/Rdaemon\"",
260
+ input: "none",
261
+ keyEquivalent: "~@t",
262
+ name: "Reveal “Rdaemon” in Finder",
263
+ output: "showAsTooltip",
264
+ scope: "source.rd.console",
265
+ uuid: "0971AC5F-1B24-41F7-9DF2-9E8FDAF96B3D"},
266
+ {beforeRunningCommand: "nop",
267
+ command:
268
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\n\necho \"@|save.image()\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in",
269
+ input: "none",
270
+ keyEquivalent: "~@w",
271
+ name: "Save Default Workspace",
272
+ output: "showAsTooltip",
273
+ scope: "source.rd.console",
274
+ uuid: "48A661E4-4365-4847-BEAB-85555BDBEDD5"},
275
+ {beforeRunningCommand: "nop",
276
+ command:
277
+ "WORD=$(\"$DIALOG\" -m -p 'prompt=\"Search for:\";title=\"Rdaemon History List\";' RequestString | perl -e 'undef($/);$a=<>;$a=~s/\\n|\\t//mg;$a=~m/.*?<key>returnArgument<\\/key><string>(.*?)<\\/string>.*/; print $1 if (length($1))')\n\n[[ -z \"$WORD\" ]] && exit_discard\n\n#show Rhistory as inline menu in reversed order grepped\nL=$(tail -r \"$HOME/Library/Application Support/Rdaemon\"/history/Rhistory.txt | egrep -i \"$WORD\" | grep -v '^----# ' | uniq | ruby -e '\n\trequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/ui.rb\")\n\twords = STDIN.read().split(\"\\n\")\n\tindex=TextMate::UI.menu(words)\n\tif index != nil\n\t\tprint \"> \" + words[index]\n\tend\n')\n\nif [ -n \"$L\" ]; then\n\tL=$(echo \"$L\" | sed 's/\\\\/\\\\\\\\/g')\n\tL=${L//$/\\\\$}\n\tL=${L//\\`/\\\\\\`}\n\techo -n \"$L\"\nelse\n\texit_discard\nfi\n",
278
+ fallbackInput: "line",
279
+ input: "selection",
280
+ keyEquivalent: "^~",
281
+ name: "Search in History List",
282
+ output: "insertAsSnippet",
283
+ scope: "source.rd.console",
284
+ uuid: "DF4A33C2-091E-4DD7-A379-97A7861B83F8"},
285
+ {beforeRunningCommand: "nop",
286
+ command:
287
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\nPATH=$(osascript -e 'tell application \"TextMate\"' -e 'activate' -e 'POSIX path of (choose folder with prompt \"Set the working directory of the current Rdaemon session\")' -e 'end tell' 2>/dev/null)\n\n[[ ! -z $PATH ]] && echo \"@|setwd('$PATH')\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in",
288
+ input: "none",
289
+ keyEquivalent: "@d",
290
+ name: "Set Working Directory",
291
+ output: "showAsTooltip",
292
+ scope: "source.rd.console",
293
+ uuid: "6B398625-7207-4BA6-BD1F-1FD41CF5674F"},
294
+ {beforeRunningCommand: "nop",
295
+ command:
296
+ "if [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\ttail /tmp/TMRramdisk1/r_out| perl -e '\n\tundef($/); $a=<>;\n\t$a=~s/\\x0D{1,}/\\x0D/sg;\n\twhile($a=~m/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/) { $a=~s/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/$1$2$3/sg; }\n\t$a=~s/\\\\/\\\\\\\\/g;$a=~s/\\`/\\\\\\`/sg;$a=~s/\\$/\\\\\\$/sg;$a=~s/_\\x08//sg;\n\t$a=~s/\\x07//sg;\n\t$a .= \"\\n> \" if ($a!~/> $/ && $a!~/\\+ $/);\n\tprint \"$a\";\n'\nelse\n\ttail \"$HOME/Library/Application Support/Rdaemon\"/r_out| perl -e '\n\tundef($/); $a=<>;\n\t$a=~s/\\x0D{1,}/\\x0D/sg;\n\twhile($a=~m/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/) { $a=~s/(.*?)\\x0D<.{50}(.) +\\x08+(.*)/$1$2$3/sg; }\n\t$a=~s/\\\\/\\\\\\\\/g;$a=~s/\\`/\\\\\\`/sg;$a=~s/\\$/\\\\\\$/sg;$a=~s/_\\x08//sg;\n\t$a=~s/\\x07//sg;\n\t$a .= \"\\n> \" if ($a!~/> $/ && $a!~/\\+ $/);\n\tprint \"$a\";\n'\nfi",
297
+ input: "none",
298
+ keyEquivalent: "~@t",
299
+ name: "Show End of r_out",
300
+ output: "showAsTooltip",
301
+ scope: "source.rd.console",
302
+ uuid: "2E40AF2C-A50C-4453-9880-7B67FD7D3599"},
303
+ {beforeRunningCommand: "nop",
304
+ command:
305
+ "#show Rhistory as inline menu in reversed order\n\nRDHOME=\"$HOME/Library/Application Support/Rdaemon\"\n\nL=$(tail -r \"$RDHOME\"/history/Rhistory.txt | uniq | ruby -e '\n\trequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/ui.rb\")\n\twords = STDIN.read().split(\"\\n\")\n\tindex=TextMate::UI.menu(words)\n\tif index != nil\n\t\tprint \"> \" + words[index]\n\tend\n')\nif [ -n \"$L\" ]; then\n\tL=$(echo \"$L\" | sed 's/\\\\/\\\\\\\\/g')\n\tL=${L//$/\\\\$}\n\tL=${L//\\`/\\\\\\`}\n\n\techo -n \"$L\"\nelse\n\texit_discard\nfi\n",
306
+ fallbackInput: "line",
307
+ input: "selection",
308
+ keyEquivalent: "^~",
309
+ name: "Show History List",
310
+ output: "insertAsSnippet",
311
+ scope: "source.rd.console",
312
+ uuid: "84EB83FE-A3FF-4C32-8912-3F5B82A66AAF"},
313
+ {beforeRunningCommand: "nop",
314
+ command:
315
+ "if [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$HOME/Library/Application Support/Rdaemon\"\nfi\n\n\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\necho \"@|sink('$RDRAMDISK/r_tmp');cat(geterrmessage());sink(file=NULL)\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in\nsleep 0.2\nOUT=$(echo -e `cat \"$RDRAMDISK\"/r_tmp`)\n\nif [ -z \"$OUT\" ]; then\n\techo \"No previous error\"\nelse\n\techo \"$OUT\"\nfi",
316
+ input: "none",
317
+ keyEquivalent: "~@a",
318
+ name: "Show Last Error Message",
319
+ output: "showAsTooltip",
320
+ scope: "source.rd.console",
321
+ uuid: "5C4C09CC-BAD9-48CC-A044-F0001156E915"},
322
+ {beforeRunningCommand: "nop",
323
+ command:
324
+ "RUBYRUN=$(ps xw | grep 'Rdaemon\\.rb')\nRRUN=$(ps aw | grep 'Librar.*--TMRdaemon')\nif [ ! ${#RRUN} == 0 -a ! ${#RUBYRUN} == 0 ]; then\n\tRUBYRUN=$(echo -en \"$RUBYRUN\" | awk '{print $1;}')\n\tRRUN=$(echo -en \"$RRUN\" | awk '{print $1;}')\n\techo -en \"Rdaemon: $RUBYRUN\\nR : $RRUN\"\nelse\n\techo -en \"Rdaemon is not running!\"\nfi\n",
325
+ input: "none",
326
+ keyEquivalent: "~@t",
327
+ name: "Show PIDs",
328
+ output: "showAsTooltip",
329
+ scope: "source.rd.console",
330
+ uuid: "1B07309F-2D19-455E-9B39-A1CD1D19F97E"},
331
+ {beforeRunningCommand: "nop",
332
+ command:
333
+ "RPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\nps -eo pcpu,pid | grep \"\\b$RPID\\b\" | awk '{print $1;}'",
334
+ input: "none",
335
+ keyEquivalent: "~@t",
336
+ name: "Show R CPU coverage",
337
+ output: "showAsTooltip",
338
+ scope: "source.rd.console",
339
+ uuid: "DE52C868-EAC5-4A0B-8329-E1F05EFD20B6"},
340
+ {beforeRunningCommand: "nop",
341
+ command:
342
+ "if [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\necho \"RAM drive on '/tmp/TMRramdrive1':\"\nRES=$(df -H | grep TMRramdisk1 | awk '{ print $5 }')\necho -n \" $RES is used of\"\nRES=$(df -H | grep TMRramdisk1 | awk '{ print $2 }')\necho -n \" $RES.\"\nelse\necho \"Rdaemon is not using a RAM drive.\"\nfi",
343
+ input: "none",
344
+ keyEquivalent: "~@t",
345
+ name: "Show RAM disk usage",
346
+ output: "showAsTooltip",
347
+ scope: "source.rd.console",
348
+ uuid: "CADF7EC3-54F3-4AB5-9D77-DEF83CE73EA4"},
349
+ {beforeRunningCommand: "nop",
350
+ command:
351
+ "if [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$HOME/Library/Application Support/Rdaemon\"\nfi\n\n\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\necho \"@|sink('$RDRAMDISK/r_tmp');cat(getwd());sink(file=NULL)\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in\nsleep 0.2\necho -e `cat \"$RDRAMDISK\"/r_tmp`",
352
+ input: "none",
353
+ keyEquivalent: "~@c",
354
+ name: "Show Working Directory",
355
+ output: "showAsTooltip",
356
+ scope: "source.rd.console",
357
+ uuid: "A562212A-C512-46AB-B2A0-EBF9B5E2F3B2"},
358
+ {beforeRunningCommand: "nop",
359
+ command:
360
+ "if [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$HOME/Library/Application Support/Rdaemon\"\nfi\n\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\ncat<<HTML\n<html><head><title>Rdaemon Workspace</title>\n<style type=\"text/css\">\n<!--\n.helpSym {\n\tbackground-color:lightgrey;\n\tcolor:black;\n\tcursor:pointer;\n\tfont-size:8pt;\n}\n.nonVisible {\n\tdisplay:none;\n}\n.selected {\n\tbackground-color:lightblue;\n}\n.unselected {\n\tbackground-color:white;\n}\n#ask {\n position: absolute;\n top: -300;\n left: 60;\n height: 80px;\n\twidth: 200px;\n background: rgba(238,238,238,0.85);\n border-bottom: 1px solid rgb(80, 80, 80);\n padding: 2px 8px;\n\tz-index: 1000;\n}\n-->\n</style>\n<script type=\"text/javascript\">\n\t\tvar item = null;\n\t\tfunction askForRemove(elt) {\n\t\t\titem = elt;\n\t\t\tdocument.getElementById(\"object\").innerHTML = \"<b>Removing of '\" + item + \"'</b>\";\n\t\t\tvar panel=document.getElementById('ask').style;\n\t\t\tpanel.top = window.pageYOffset;\n\t\t\tpanel.left = window.innerWidth/2-100;\n\t\t\tdocument.getElementById(item).className = \"selected\";\n\t\t}\n\t\tfunction askForRemoveHide() {\n\t\t\tdocument.getElementById(item).className = \"unselected\";\n\t\t\tvar panel=document.getElementById('ask').style;\n\t\t\tpanel.top = -300;\n\t\t}\n\t\tfunction exec() {\n\t\t\taskForRemoveHide();\n\t\t\tvar cmd = 'echo \"@|rm('+item+');gc(reset(TRUE))\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in';\n\t\t\tTextMate.system(cmd, null);\n\t\t\tdocument.getElementById(item).className = \"nonVisible\";\n\t\t}\n\t\tfunction edit(item) {\n\t\t\tvar cmd = 'echo \"@|fix('+item+')\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in';\n\t\t\tTextMate.system(cmd, null);\n\t\t\twindow.close();\n\t\t}\n</script>\n</head>\n<body>\n<div id=\"ask\">\n<center>\n<p>\n<span id=\"object\" style=\"font-size:9pt;\"></span><br />\n<span style=\"font-size:7pt;\">Are you sure?</span>\n</p>\n<input onclick=\"askForRemoveHide()\" type=\"button\" value=\"Cancel\">\n&nbsp;&nbsp;\n<input onclick=\"exec()\" type=\"button\" value=\"Yes\">\n</center>\n</div>\n\n<table border=1 cellpadding=\"5\" style='border-collapse:collapse;'>\nHTML\n\n\"$HOME/Library/Application Support/Rdaemon/daemon/execRStr.sh\" \"@|sink('$RDRAMDISK/r_tmp');try({ifelse((length(ls())>0),{for(ü in 1:(length(ls()))){cat('<tr id=\\\"');cat(ls()[ü]);cat('\\\"><td align=right bgcolor=#EEEEEE><b>');cat(ls()[ü]);cat('</b><td>');cat(str(get(ls()[ü])));cat('</td><td><span onclick=\\\"edit(\\'');cat(ls()[ü]);cat('\\')\\\" class=\\\"helpSym\\\">&nbsp;edit&nbsp;</span></td><td><span onclick=\\\"askForRemove(\\'');cat(ls()[ü]);cat('\\')\\\" class=\\\"helpSym\\\">&nbsp;remove&nbsp;</span></td></tr>');rm(ü)}},{cat('Workspace is empty.')})});sink(file=NULL);\" > /dev/null\ncat \"$RDRAMDISK\"/r_tmp | sed 's/\\$/<br><font color=blue>\\$<\\/font>/g'\necho \"</table>\"\n\nexit_show_html",
361
+ input: "none",
362
+ keyEquivalent: "~@w",
363
+ name: "Show Workspace",
364
+ output: "discard",
365
+ scope: "source.rd.console",
366
+ uuid: "7536CA0C-A1ED-41B3-A82B-BF514A1C22A3"},
367
+ {beforeRunningCommand: "nop",
368
+ bundleUUID: "B5A22967-2E6A-4B66-9C71-DA8762C01E27",
369
+ command:
370
+ "\nRDHOME=\"$HOME/Library/Application Support/Rdaemon\"\n\nif [ -f \"$HOME\"/Rdaemon/daemon/startScript.sh ]; then\n\tANS=$(\"$DIALOG\" -e -p '{messageTitle=\"New Rdaemon installation path\"; informativeText=\"Please note that Rdaemon’s installation path was changed to:\\n\\n“~/Library/Application Support/Rdaemon”.\\n\\nIf there are any customizations in “~/Rdaemon/startOptions.R” please copy that file to the new location and remove or rename the old directory\\n“~/Rdaemon”.\"; buttonTitles=(\"OK\");}')\nfi\n\n#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs - if not start it\nif [ -z $RPID ]; then\n\n\tif [ -f \"$RDHOME\"/daemon/startScript.sh ]; then\n\t\trm -rf \"$RDHOME\"/daemon\n\t\trm -rf \"$RDHOME\"/help\n\t\tcp -R \"$TM_BUNDLE_SUPPORT\"/Rdaemon/daemon \"$RDHOME\"\n\t\tcp -R \"$TM_BUNDLE_SUPPORT\"/Rdaemon/help \"$RDHOME\" \n\t\t\"$RDHOME\"/daemon/startScript.sh\n\t\techo -en \"> \"\n\telse\n\t\t[[ -d \"$RDHOME\" ]] && echo -e \"The folder '$RDHOME' already exists! Please remove or rename it first.\" && exit_show_tool_tip\n\t\tcp -R \"$TM_BUNDLE_SUPPORT\"/Rdaemon \"$RDHOME\"\n\t\techo -e \"Rdaemon was installed in:\\n'$RDHOME'\"\n\t\tif [ -f \"$RDHOME\"/daemon/startScript.sh ]; then\n\t\t\t\"$RDHOME\"/daemon/startScript.sh\n\t\t\techo -en \"> \"\n\t\telse\n\t\t\techo \"Error while installing Rdaemon!\"\n\t\t\texit_show_tool_tip\n\t\tfi\n\tfi\n\nelse\n\techo -n \"> \"\nfi",
371
+ fallbackInput: "line",
372
+ input: "selection",
373
+ keyEquivalent: "~@c",
374
+ name: "Start Rdaemon",
375
+ output: "insertAsSnippet",
376
+ scope: "source.rd.console",
377
+ tabTrigger: "start",
378
+ uuid: "DE978737-FAC6-4DAD-ADEE-43172F55BDC5"},
379
+ {beforeRunningCommand: "nop",
380
+ command:
381
+ "OS=$(uname -r | perl -pe 's/(\\d+)\\..*/$1/')\nif [ $OS -eq 8 ]; then\n\texport DISPLAY=:0.0\n\topen -a X11\n\tosascript <<-AS &>/dev/null\n \t\ttell application \"TextMate\"\n \t\t\tactivate\n\t \tend tell\n\tAS\nelse\n\techo \"Only necessary for Mac OSX 10.4.x (Tiger)\"\nfi\n",
382
+ input: "none",
383
+ keyEquivalent: "~@c",
384
+ name: "Start X11",
385
+ output: "showAsTooltip",
386
+ scope: "source.rd.console",
387
+ uuid: "B9DD511C-6147-4ACF-8538-226554F62B81"},
388
+ {beforeRunningCommand: "nop",
389
+ command:
390
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\nkill -s INT $RPID",
391
+ input: "selection",
392
+ keyEquivalent: "~@c",
393
+ name: "Try to interrupt current task",
394
+ output: "showAsTooltip",
395
+ scope: "source.rd.console",
396
+ uuid: "34A37FE6-794D-4AA5-A300-BB446654E0A6"},
397
+ {beforeRunningCommand: "nop",
398
+ bundleUUID: "DA2A7475-3FDF-4D66-A796-1C45F6BBF5B9",
399
+ command:
400
+ "VAR=$(ruby -- <<-SCR1 \n\trequire File.join(ENV[\"TM_SUPPORT_PATH\"], \"lib/current_word.rb\")\n\tword = Word.current_word('\\w\\.')\nprint word\nSCR1\n)\n\n[[ -z $VAR ]] && exit_discard\n\nif [ \"$TM_RdaemonRAMDRIVE\" == \"1\" ]; then\n\tRDRAMDISK=\"/tmp/TMRramdisk1\"\nelse\n\tRDRAMDISK=\"$HOME/Library/Application Support/Rdaemon\"\nfi\n\nTASK=\"@|cat(is.vector($VAR))\"\nRES=$(\"$HOME/Library/Application Support/Rdaemon\"/daemon/execRStr.sh \"$TASK\" | tail -n 1)\n[[ \"$RES\" != \"TRUE> \" ]] && echo \"'$VAR' is not a vector.\" && exit_show_tool_tip\n\nTASK=\"@|sink('$RDRAMDISK/r_tmp');cat($VAR, sep='\\\\\\\\\\\\\\n');sink(file=NULL);\"\n\"$HOME/Library/Application Support/Rdaemon\"/daemon/execRStr.sh \"$TASK\" > /dev/null\n\nRES=$(cat \"$RDRAMDISK/r_tmp\")\n\nLC=$(echo -e \"$RES\" | wc -l)\nLC=$(($LC * 26 + 110))\n[[ $LC -gt 630 ]] && LC=630\ncat <<HTML0 \n<html>\n<head>\n<title>Rdaemon &mdash; Vector Editor</title>\n<style type=\"text/css\">\n<!--\nINPUT {\nborder: #AAAAAA 0px solid;\nbackground-color: #FFFFFF;\ntext-align:right;\nfont-family:Monaco\n}\nBODY {\nfont-family:Monaco;\n}\n.var {\nborder: lightgrey 0px solid;\nbackground-color: white;\ntext-align:left;\ntext-weight:bold;\nfont-size:11pt;\n}\n-->\n</style>\n<script type=\"text/javascript\">\n\tfunction saveIt() {\n\t\tTextMate.isBusy = true;\n\t\tvar inp = document.getElementsByTagName(\"input\");\n//\t\tvar reg = new RegExp(\"(^\\\"?\\-?[0-9]+\\.?[0-9]*\\\"?$)|(^NA$)\");\n\t\tvar reg = new RegExp(\"(^\\\"?\\-?[0-9\\.]+[0-9]*\\\"?$)|(^NA$)\");\n\t\taccu = new Array();\n\t\tfor (var i=1; i<inp.length; i++) {\n\t\t\tif (inp[i].value.length == 0) {\n\t\t\t\taccu.push(\"NA\");\n\t\t\t} else {\n\t\t\t\tif (reg.test(inp[i].value)) {\n\t\t\t\t\taccu.push(inp[i].value);\n\t\t\t\t} else {\n\t\t\t\t\taccu.push(\"as.character(\\\"\"+inp[i].value+\"\\\")\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar cmd = \"echo '\" + inp[0].value +\"<-c(\" + accu.join(\", \") + \")' > \"$HOME/Library/Application Support/Rdaemon\"/r_tmp;echo -e '@|source(\\\"$HOME/Library/Application Support/Rdaemon/r_tmp\\\")' > \"$HOME/Library/Application Support/Rdaemon\"/r_in\";\n\t\tTextMate.system(cmd,null);\n\t\tTextMate.isBusy = false;\n\t\twindow.close();\n\t}\n\tfunction init() {\n\t\tdocument.getElementsByTagName('input')[1].focus();\n\t}\n\tfunction keyalert(index)\n\t{\n\t\tvar VK_LEFT = 37;\n\t\tvar VK_UP = 38;\n\t\tvar VK_RIGHT = 39;\n\t\tvar VK_DOWN = 40;\n\t\tvar VK_PAGEUP = 33;\n\t\tvar VK_PAGEDOWN = 34;\n\t\tvar VK_ESC = 27;\n\t\tswitch (event.keyCode){\n\t\t\tcase VK_ESC : {\n\t\t\t\t//window.close();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase VK_UP : {\n\t\t\t\tif (index>1) {\n\t\t\t\t\tdocument.getElementsByTagName('input')[index-1].focus();\n\t\t\t\t\tdocument.getElementsByTagName('input')[index-1].select();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase VK_DOWN : {\n\t\t\t\tif (index<document.getElementsByTagName(\"input\").length) {\n\t\t\t\t\tdocument.getElementsByTagName('input')[index+1].focus();\n\t\t\t\t\tdocument.getElementsByTagName('input')[index+1].select();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n</script>\n</head>\n<body>\n<center>\n<div style=\"background-color:white;padding:2mm\">\n<font color=grey><small>vector:</small></font> <input size=10 class=var value=\"$VAR\" id=\"var\">\n</div>\n\n<table border=1 style=\"border-collapse:collapse\">\n\nHTML0\nC=1\necho -e \"$RES\" | while read LINE\ndo\n\techo \"<tr><td align=right bgcolor=#ECECEC><small>[$C]</small></td><td><input type='text' value='$LINE' onkeyup=keyalert($C)></td></tr>\"\n\tC=$(($C + 1))\ndone\n\ncat <<HTML5\n</table>\n<div style=\"margin-top:2mm;background-color:lightgrey;padding:2mm\">\n<button onclick=\"saveIt()\">&nbsp;Save&nbsp;</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button onclick=\"window.close()\">Cancel</button>\n</div>\n<script type=\"text/javascript\">window.onload = init;</script>\n</body>\n</html>\nHTML5\n\nexit_show_html\n",
401
+ input: "none",
402
+ name: "Vector Editor (β)",
403
+ output: "discard",
404
+ scope: "source.rd.console",
405
+ uuid: "DDB68BBA-7243-4DCE-B940-B0E82CA9B9AA"},
406
+ {beforeRunningCommand: "nop",
407
+ command:
408
+ "#get R's PID\nRPID=$(ps aw | grep '[0-9] /.*TMRdaemon' | awk '{print $1;}' )\n\n#check whether Rdaemon runs\ntest -z $RPID && echo -en \"Rdaemon is not running.\" && exit 206\n\necho \"@|quartz.save(type='pdf', file='$HOME/Library/Application Support/Rdaemon/plots/RcurrentPlot.pdf')\" > \"$HOME/Library/Application Support/Rdaemon\"/r_in\nsleep 0.5\nopen -a ${TM_RdaemonPDFVIEWER:-Preview} \"file://$HOME/Library/Application Support/Rdaemon/plots/RcurrentPlot.pdf\"\n\n",
409
+ input: "none",
410
+ keyEquivalent: "~@g",
411
+ name: "View Active Graphic Device as PDF",
412
+ output: "showAsTooltip",
413
+ scope: "source.rd.console",
414
+ uuid: "FA204D99-DC57-46C9-A727-8D54AAA59897"}]