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
@@ -1,767 +1,1118 @@
1
1
  # Encoding: UTF-8
2
2
 
3
- {"ft" =>
4
- {scope: "text.html.ruby, text.haml",
5
- name: "form_tag",
6
- content:
7
- "${TM_RAILS_TEMPLATE_START_RUBY_INLINE}form_tag(${1::action => \"${5:update}\"}${6:, {:${8:class} => \"${9:form}\"\\}}) do${TM_RAILS_TEMPLATE_END_RUBY_EXPR}\n $0\n${TM_RAILS_TEMPLATE_END_RUBY_BLOCK}"},
8
- "mcol" =>
9
- {scope:
10
- "meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table",
11
- name: "Remove / Add Column",
12
- content:
13
- "remove_column :${1:table}, :${2:column}${3: [press tab twice to generate add_column]}"},
14
- "mccc" =>
15
- {scope: "meta.rails.migration.create_table",
16
- name: "Create Several Columns in Table",
17
- content: "t.column ${1:title}, :${2:string}\nmccc$0"},
18
- "mtab" =>
19
- {scope:
20
- "meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table",
21
- name: "Drop / Create Table",
22
- content:
23
- "drop_table :${1:table}${2: [press tab twice to generate create_table]}"},
24
- "rdb" =>
25
- {scope: "source.ruby.rails",
26
- name: "RAILS_DEFAULT_LOGGER.debug",
27
- content: "RAILS_DEFAULT_LOGGER.debug \"${1:message}\"$0"},
28
- "art" =>
29
- {scope: "source.ruby.rails",
30
- name: "assert_redirected_to",
31
- content: "assert_redirected_to ${2::action => \"${1:index}\"}"},
32
- "asre" =>
33
- {scope: "source.ruby.rails",
34
- name: "assert_response",
35
- content: "assert_response :${1:success}, @response.body$0"},
36
- "bt" =>
37
- {scope: "source.ruby.rails",
38
- name: "belongs_to",
39
- content:
40
- "belongs_to :${1:object}${2:, :class_name => \"${3:${1/[[:alpha:]]+|(_)/(?1::\\u$0)/g}}\", :foreign_key => \"${4:${1}_id}\"}"},
41
- "habtm" =>
42
- {scope: "source.ruby.rails",
43
- name: "has_and_belongs_to_many",
44
- content:
45
- "has_and_belongs_to_many :${1:object}${2:, :join_table => \"${3:table_name}\", :foreign_key => \"${4:${1}_id}\"}"},
46
- "hm" =>
47
- {scope: "source.ruby.rails",
48
- name: "has_many",
49
- content:
50
- "has_many :${1:object}s${2:, :class_name => \"${1}\", :foreign_key => \"${4:reference}_id\"}"},
51
- "ho" =>
52
- {scope: "source.ruby.rails",
53
- name: "has_one",
54
- content:
55
- "has_one :${1:object}${2:, :class_name => \"${3:${1/[[:alpha:]]+|(_)/(?1::\\u$0)/g}}\", :foreign_key => \"${4:${1}_id}\"}"},
56
- "lia" =>
57
- {scope: "text.html.ruby, text.haml",
58
- name: "link_to (action)",
59
- content:
60
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :action => \"${2:index}\"${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
61
- "liai" =>
62
- {scope: "text.html.ruby, text.haml",
63
- name: "link_to (action, id)",
64
- content:
65
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :action => \"${2:edit}\", :id => ${3:@item}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
66
- "lic" =>
67
- {scope: "text.html.ruby, text.haml",
68
- name: "link_to (controller)",
69
- content:
70
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :controller => \"${2:items}\"${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
71
- "lica" =>
72
- {scope: "text.html.ruby, text.haml",
73
- name: "link_to (controller, action)",
74
- content:
75
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :controller => \"${2:items}\", :action => \"${3:index}\"${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
76
- "licai" =>
77
- {scope: "text.html.ruby, text.haml",
78
- name: "link_to (controller, action, id)",
79
- content:
80
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :controller => \"${2:items}\", :action => \"${3:edit}\", :id => ${4:@item}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
81
- "flash" =>
82
- {scope: "source.ruby.rails",
83
- name: "flash[…]",
84
- content: "flash[:${1:notice}] = \"${2:Successfully created...}\"$0"},
85
- nil =>
86
- {scope: "meta.rails.controller",
87
- name: "respond_to (html)",
88
- content:
89
- "respond_to do |wants|\n\twants.html do\n\t\t$TM_SELECTED_TEXT\n\tend\n\twants.${1:js} { $0 }\nend"},
90
- "rea" =>
91
- {scope: "source.ruby.rails",
92
- name: "redirect_to (action)",
93
- content: "redirect_to :action => \"${1:index}\""},
94
- "reai" =>
95
- {scope: "source.ruby.rails",
96
- name: "redirect_to (action, id)",
97
- content: "redirect_to :action => \"${1:show}\", :id => ${0:@item}"},
98
- "rec" =>
99
- {scope: "source.ruby.rails",
100
- name: "redirect_to (controller)",
101
- content: "redirect_to :controller => \"${1:items}\""},
102
- "reca" =>
103
- {scope: "source.ruby.rails",
104
- name: "redirect_to (controller, action)",
105
- content:
106
- "redirect_to :controller => \"${1:items}\", :action => \"${2:list}\""},
107
- "recai" =>
108
- {scope: "source.ruby.rails",
109
- name: "redirect_to (controller, action, id)",
110
- content:
111
- "redirect_to :controller => \"${1:items}\", :action => \"${2:show}\", :id => ${0:@item}"},
112
- "ra" =>
113
- {scope: "source.ruby.rails",
114
- name: "render (action)",
115
- content: "render :action => \"${1:action}\""},
116
- "ral" =>
117
- {scope: "source.ruby.rails",
118
- name: "render (action, layout)",
119
- content:
120
- "render :action => \"${1:action}\", :layout => \"${2:layoutname}\""},
121
- "rf" =>
122
- {scope: "source.ruby.rails",
123
- name: "render (file)",
124
- content: "render :file => \"${1:filepath}\""},
125
- "rfu" =>
126
- {scope: "source.ruby.rails",
127
- name: "render (file, use_full_path)",
128
- content: "render :file => \"${1:filepath}\", :use_full_path => ${2:false}"},
129
- "ri" =>
130
- {scope: "source.ruby.rails",
131
- name: "render (inline)",
132
- content: "render :inline => \"${1:<%= 'hello' %>}\""},
133
- "ril" =>
134
- {scope: "source.ruby.rails",
135
- name: "render (inline, locals)",
136
- content:
137
- "render :inline => \"${1:<%= 'hello' %>}\", :locals => { ${2::name} => \"${3:value}\"$4 }"},
138
- "rit" =>
139
- {scope: "source.ruby.rails",
140
- name: "render (inline, type)",
141
- content: "render :inline => \"${1:<%= 'hello' %>}\", :type => ${2::rxml}"},
142
- "rl" =>
143
- {scope: "source.ruby.rails",
144
- name: "render (layout)",
145
- content: "render :layout => \"${1:layoutname}\""},
146
- "rn" =>
147
- {scope: "source.ruby.rails",
148
- name: "render (nothing)",
149
- content: "render :nothing => ${1:true}"},
150
- "rns" =>
151
- {scope: "source.ruby.rails",
152
- name: "render (nothing, status)",
153
- content: "render :nothing => ${1:true}, :status => ${2:401}"},
154
- "rp" =>
155
- {scope: "source.ruby.rails",
156
- name: "render (partial)",
157
- content: "render :partial => \"${1:item}\""},
158
- "rpc" =>
159
- {scope: "source.ruby.rails",
160
- name: "render (partial, collection)",
161
- content: "render :partial => \"${1:item}\", :collection => ${2:@$1s}"},
162
- "rpl" =>
163
- {scope: "source.ruby.rails",
164
- name: "render (partial, locals)",
165
- content:
166
- "render :partial => \"${1:item}\", :locals => { :${2:$1} => ${3:@$1}$0 }"},
167
- "rpo" =>
168
- {scope: "source.ruby.rails",
169
- name: "render (partial, object)",
170
- content: "render :partial => \"${1:item}\", :object => ${2:@$1}"},
171
- "rps" =>
172
- {scope: "source.ruby.rails",
173
- name: "render (partial, status)",
174
- content: "render :partial => \"${1:item}\", :status => ${2:500}"},
175
- "rt" =>
176
- {scope: "source.ruby.rails",
177
- name: "render (text)",
178
- content: "render :text => \"${1:text to render...}\""},
179
- "rtl" =>
180
- {scope: "source.ruby.rails",
181
- name: "render (text, layout)",
182
- content:
183
- "render :text => \"${1:text to render...}\", :layout => \"${2:layoutname}\""},
184
- "rtlt" =>
185
- {scope: "source.ruby.rails",
186
- name: "render (text, layout => true)",
187
- content:
188
- "render :text => \"${1:text to render...}\", :layout => ${2:true}"},
189
- "rts" =>
190
- {scope: "source.ruby.rails",
191
- name: "render (text, status)",
192
- content: "render :text => \"${1:text to render...}\", :status => ${2:401}"},
193
- "va" =>
194
- {scope: "source.ruby.rails",
195
- name: "validates_associated",
196
- content: "validates_associated :${1:attribute}${2:, :on => :${3:create}}"},
197
- "vaif" =>
198
- {scope: "source.ruby.rails",
199
- name: "validates_associated if",
200
- content:
201
- "validates_associated :${1:attribute}${2:, :on => :${3:create}, :if => proc { |obj| ${5:obj.condition?} }}"},
202
- "vc" =>
203
- {scope: "source.ruby.rails",
204
- name: "validates_confirmation_of",
205
- content:
206
- "validates_confirmation_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:should match confirmation}\"}"},
207
- "vcif" =>
208
- {scope: "source.ruby.rails",
209
- name: "validates_confirmation_of if",
210
- content:
211
- "validates_confirmation_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:should match confirmation}\", :if => proc { |obj| ${5:obj.condition?} }}"},
212
- "ve" =>
213
- {scope: "source.ruby.rails",
214
- name: "validates_exclusion_of",
215
- content:
216
- "validates_exclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not allowed}\"}"},
217
- "veif" =>
218
- {scope: "source.ruby.rails",
219
- name: "validates_exclusion_of if",
220
- content:
221
- "validates_exclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not allowed}\"}, :if => proc { |obj| ${7:obj.condition?} }}"},
222
- "vl" =>
223
- {scope: "source.ruby.rails",
224
- name: "validates_length_of",
225
- content:
226
- "validates_length_of :${1:attribute}, :within => ${2:3..20}${3:, :on => :${4:create}, :message => \"${5:must be present}\"}"},
227
- "vp" =>
228
- {scope: "source.ruby.rails",
229
- name: "validates_presence_of",
230
- content:
231
- "validates_presence_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:can't be blank}\"}"},
232
- "vpif" =>
233
- {scope: "source.ruby.rails",
234
- name: "validates_presence_of if",
235
- content:
236
- "validates_presence_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:can't be blank}\"}, :if => proc { |obj| ${5:obj.condition?} }}"},
237
- "vu" =>
238
- {scope: "source.ruby.rails",
239
- name: "validates_uniqueness_of",
240
- content:
241
- "validates_uniqueness_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:must be unique}\"}"},
242
- "vuif" =>
243
- {scope: "source.ruby.rails",
244
- name: "validates_uniqueness_of if",
245
- content:
246
- "validates_uniqueness_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:must be unique}\", :if => proc { |obj| ${6:obj.condition?} }}"},
247
- "verify" =>
248
- {scope: "source.ruby.rails",
249
- name: "verify — redirect",
250
- content:
251
- "verify :only => [:$1], :session => :user, :params => :id, :redirect_to => {:action => '${2:index}'}\n"},
252
- "$L" => {scope: "source.yaml", name: "$LABEL", content: "\\$LABEL"},
253
- "fi" =>
254
- {scope: "source.yaml",
255
- name: "<%= Fixtures.identify(:symbol) %>",
256
- content:
257
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}Fixtures.identify(:${1:name})${TM_RAILS_TEMPLATE_END_RUBY_EXPR}$0"},
258
- "tcbi" =>
259
- {scope:
260
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
261
- name: "Table column binary",
262
- content: "t.binary :${1:title}${2:, :limit => ${3:2}.megabytes}\n$0"},
263
- "tcb" =>
264
- {scope:
265
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
266
- name: "Table column boolean",
267
- content: "t.boolean :${1:title}\n$0"},
268
- "cla" =>
269
- {scope: "source.ruby",
270
- name: "Create functional test class",
271
- content:
272
- "require File.dirname(__FILE__) + '/../test_helper'\n\nclass ${1:Model}ControllerTest < ActionController::TestCase\n\tdeft$0\nend\n"},
273
- "tcda" =>
274
- {scope:
275
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
276
- name: "Table column date",
277
- content: "t.date :${1:title}\n$0"},
278
- "tcdt" =>
279
- {scope:
280
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
281
- name: "Table column datetime",
282
- content: "t.datetime :${1:title}\n$0"},
283
- "tcd" =>
284
- {scope:
285
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
286
- name: "Table column decimal",
287
- content:
288
- "t.decimal :${1:title}${2:${3:, :precision => ${4:10}}${5:, :scale => ${6:2}}}\n$0"},
289
- "tcf" =>
290
- {scope:
291
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
292
- name: "Table column float",
293
- content: "t.float :${1:title}\n$0"},
294
- "tci" =>
295
- {scope:
296
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
297
- name: "Table column integer",
298
- content: "t.integer :${1:title}\n$0"},
299
- "tcl" =>
300
- {scope:
301
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
302
- name: "Table column lock_version",
303
- content: "t.integer :lock_version, :null => false, :default => 0\n$0"},
304
- "tcr" =>
305
- {scope:
306
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
307
- name: "Table column(s) references",
308
- content:
309
- "t.references :${1:taggable}${2:, :polymorphic => ${3:{ :default => '${4:Photo}' \\}}}\n$0"},
310
- "tcs" =>
311
- {scope:
312
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
313
- name: "Table column string",
314
- content: "t.string :${1:title}\n$0"},
315
- "tct" =>
316
- {scope:
317
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
318
- name: "Table column text",
319
- content: "t.text :${1:title}\n$0"},
320
- "tcti" =>
321
- {scope:
322
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
323
- name: "Table column time",
324
- content: "t.time :${1:title}\n$0"},
325
- "tcts" =>
326
- {scope:
327
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
328
- name: "Table column timestamp",
329
- content: "t.timestamp :${1:title}\n$0"},
330
- "tctss" =>
331
- {scope:
332
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
333
- name: "Table column timestamps",
334
- content: "t.timestamps\n$0"},
335
- "tre" =>
336
- {scope:
337
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
338
- name: "Table column(s) rename",
339
- content: "t.rename(:${1:old_column_name}, :${2:new_column_name})\n$0"},
340
- "aftc" =>
341
- {scope: "source.ruby.rails", name: "after_create", content: "after_create "},
342
- "aftd" =>
343
- {scope: "source.ruby.rails",
344
- name: "after_destroy",
345
- content: "after_destroy "},
346
- "afts" =>
347
- {scope: "source.ruby.rails", name: "after_save", content: "after_save "},
348
- "aftu" =>
349
- {scope: "source.ruby.rails", name: "after_update", content: "after_update "},
350
- "aftv" =>
351
- {scope: "source.ruby.rails",
352
- name: "after_validation",
353
- content: "after_validation "},
354
- "aftvoc" =>
355
- {scope: "source.ruby.rails",
356
- name: "after_validation_on_create",
357
- content: "after_validation_on_create "},
358
- "aftvou" =>
359
- {scope: "source.ruby.rails",
360
- name: "after_validation_on_update",
361
- content: "after_validation_on_update "},
362
- "asg" =>
363
- {scope: "source.ruby",
364
- name: "assert(var = assigns(:var))",
365
- content: "assert(${1:var} = assigns(:${1}), \"Cannot find @${1}\")\n$0"},
366
- "asd" =>
367
- {scope: "source.ruby",
368
- name: "assert_difference",
369
- content:
370
- "assert_difference \"${1:Model}.${2:count}\", ${3:1} do\n $0\nend"},
371
- "asnd" =>
372
- {scope: "source.ruby",
373
- name: "assert_no_difference",
374
- content: "assert_no_difference \"${1:Model}.${2:count}\" do\n $0\nend"},
375
- "artnpp" =>
376
- {scope: "source.ruby.rails",
377
- name: "assert_redirected_to (nested path plural)",
378
- content:
379
- "assert_redirected_to ${10:${2:parent}_${3:child}_path(${4:@}${5:${2}})}"},
380
- "artnp" =>
381
- {scope: "source.ruby.rails",
382
- name: "assert_redirected_to (nested path)",
383
- content:
384
- "assert_redirected_to ${2:${12:parent}_${13:child}_path(${14:@}${15:${12}}, ${16:@}${17:${13}})}"},
385
- "artpp" =>
386
- {scope: "source.ruby.rails",
387
- name: "assert_redirected_to (path plural)",
388
- content: "assert_redirected_to ${10:${2:model}s_path}"},
389
- "artp" =>
390
- {scope: "source.ruby.rails",
391
- name: "assert_redirected_to (path)",
392
- content: "assert_redirected_to ${2:${12:model}_path(${13:@}${14:${12}})}"},
393
- "asrj" =>
394
- {scope: "source.ruby.rails",
395
- name: "assert_rjs",
396
- content: "assert_rjs :${1:replace}, ${2:\"${3:dom id}\"}"},
397
- "ass" =>
398
- {scope: "source.ruby.rails",
399
- name: "assert_select",
400
- content:
401
- "assert_select '${1:path}'${2:, :${3:text} => ${4:'${5:inner_html}'}}${6: do\n\t$0\nend}"},
402
- "befc" =>
403
- {scope: "source.ruby.rails",
404
- name: "before_create",
405
- content: "before_create "},
406
- "befd" =>
407
- {scope: "source.ruby.rails",
408
- name: "before_destroy",
409
- content: "before_destroy "},
410
- "befs" =>
411
- {scope: "source.ruby.rails", name: "before_save", content: "before_save "},
412
- "befu" =>
413
- {scope: "source.ruby.rails",
414
- name: "before_update",
415
- content: "before_update "},
416
- "befv" =>
417
- {scope: "source.ruby.rails",
418
- name: "before_validation",
419
- content: "before_validation "},
420
- "befvoc" =>
421
- {scope: "source.ruby.rails",
422
- name: "before_validation_on_create",
423
- content: "before_validation_on_create "},
424
- "befvou" =>
425
- {scope: "source.ruby.rails",
426
- name: "before_validation_on_update",
427
- content: "before_validation_on_update"},
428
- "crw" =>
429
- {scope: "source.ruby.rails",
430
- name: "cattr_accessor",
431
- content: "cattr_accessor :${0:attr_names}"},
432
- "defcreate" =>
433
- {scope: "meta.rails.controller",
434
- name: "def create - resource",
435
- content:
436
- "def create\n\t@${1:model} = ${2:${1/[[:alpha:]]+|(_)/(?1::\\u$0)/g}}.new(params[:$1])\n\t$0\n\trespond_to do |wants|\n\t\tif @$1.save\n\t\t\tflash[:notice] = '$2 was successfully created.'\n\t\t\twants.html { redirect_to(@$1) }\n\t\t\twants.xml { render :xml => @$1, :status => :created, :location => @$1 }\n\t\telse\n\t\t\twants.html { render :action => \"new\" }\n\t\t\twants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\t\tend\n\tend\nend\n"},
437
- "deftg" =>
438
- {scope: "meta.rails.functional_test",
439
- name: "def test_should_get_action",
440
- content:
441
- "def test_should_get_${1:action}\n\t${2:@${3:model} = ${4:$3s}(:${5:fixture_name})\n\t}get :${1}${6:, :id => @$3.to_param}\n\tassert_response :success\n\t$0\nend"},
442
- "deftp" =>
443
- {scope: "meta.rails.functional_test",
444
- name: "def test_should_post_action",
445
- content:
446
- "def test_should_post_${1:action}\n\t${3:@$2 = ${4:$2s}(:${5:fixture_name})\n\t}post :${1}${6:, :id => @$2.to_param}, :${2:model} => { $0 }\n\tassert_response :redirect\n\nend"},
447
- "end" => {scope: "text.html.ruby", name: "end (ERB)", content: "<% end -%>"},
448
- "fina" =>
449
- {scope: "source.ruby.rails",
450
- name: "find(:all)",
451
- content:
452
- "find(:all${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})"},
453
- "finf" =>
454
- {scope: "source.ruby.rails",
455
- name: "find(:first)",
456
- content:
457
- "find(:first${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})"},
458
- "fini" =>
459
- {scope: "source.ruby.rails", name: "find(id)", content: "find(${1:id})"},
460
- "for" =>
461
- {scope: "text.html.ruby",
462
- name: "for loop in rhtml",
463
- content:
464
- "<% if !${1:list}.blank? %>\n <% for ${2:item} in ${1} %>\n $3\n <% end %>\n<% else %>\n $4\n<% end %>\n"},
465
- "ffcb" =>
466
- {scope: "text.html.ruby, text.haml",
467
- name: "form_for check_box",
468
- content:
469
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.check_box :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
470
- "f." =>
471
- {scope: "text.html.ruby, text.haml",
472
- name: "f.text_field (fftf)",
473
- content:
474
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.text_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
475
- "ffff" =>
476
- {scope: "text.html.ruby, text.haml",
477
- name: "form_for file_field",
478
- content:
479
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.file_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
480
- "ffhf" =>
481
- {scope: "text.html.ruby, text.haml",
482
- name: "form_for hidden_field",
483
- content:
484
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.hidden_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
485
- "ffl" =>
486
- {scope: "text.html.ruby, text.haml",
487
- name: "form_for label",
488
- content:
489
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.label :${1:attribute}${2:, \"${3:${1/[[:alpha:]]+|(_)/(?1: :\\u$0)/g}}\"}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
490
- "ffpf" =>
491
- {scope: "text.html.ruby, text.haml",
492
- name: "form_for password_field",
493
- content:
494
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.password_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
495
- "ffrb" =>
496
- {scope: "text.html.ruby, text.haml",
497
- name: "form_for radio_box",
498
- content:
499
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.radio_box :${1:attribute}, :${2:tag_value}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
500
- "ffs" =>
501
- {scope: "text.html.ruby, text.haml",
502
- name: "form_for submit",
503
- content:
504
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.submit \"${1:Submit}\"${2:, :disable_with => '${3:$1ing...}'}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
505
- "ffta" =>
506
- {scope: "text.html.ruby, text.haml",
507
- name: "form_for text_area",
508
- content:
509
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.text_area :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
510
- "fftf" =>
511
- {scope: "text.html.ruby, text.haml",
512
- name: "form_for text_field",
513
- content:
514
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.text_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
515
- "ffe" =>
516
- {scope: "text.html.ruby, text.haml",
517
- name: "form_for with errors",
518
- content:
519
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}error_messages_for :${1:model}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}\n\n${TM_RAILS_TEMPLATE_START_RUBY_INLINE}form_for @${2:$1} do |f|${TM_RAILS_TEMPLATE_END_RUBY_INLINE}\n $0\n${TM_RAILS_TEMPLATE_END_RUBY_BLOCK}"},
520
- "ff" =>
521
- {scope: "text.html.ruby, text.haml",
522
- name: "form_for",
523
- content:
524
- "${TM_RAILS_TEMPLATE_START_RUBY_INLINE}form_for @${1:model} do |f|${TM_RAILS_TEMPLATE_END_RUBY_INLINE}\n $0\n${TM_RAILS_TEMPLATE_END_RUBY_BLOCK}"},
525
- "hmt" =>
526
- {scope: "source.ruby.rails",
527
- name: "has_many (through)",
528
- content:
529
- "has_many :${1:objects}, :through => :${2:join_association}${3:, :source => :${4:${2}_table_foreign_key_to_${1}_table}}"},
530
- "hmd" =>
531
- {scope: "source.ruby.rails",
532
- name: "has_many :dependent => :destroy",
533
- content:
534
- "has_many :${1:object}s${2:, :class_name => \"${1}\", :foreign_key => \"${4:reference}_id\"}, :dependent => :destroy$0"},
535
- "ist" =>
536
- {scope: "text.html.ruby, text.haml",
537
- name: "image_submit_tag",
538
- content:
539
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}image_submit_tag(\"${1:agree.png}\"${2:${3:, :id => \"${4:${1/^(\\w+)(\\.\\w*)?$/$1/}}\"}${5:, :name => \"${6:${1/^(\\w+)(\\.\\w*)?$/$1/}}\"}${7:, :class => \"${8:${1/^(\\w+)(\\.\\w*)?$/$1/}-button}\"}${9:, :disabled => ${10:false}}})${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
540
- "jit" =>
541
- {scope: "text.html.ruby",
542
- name: "javascript_include_tag",
543
- content:
544
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}javascript_include_tag ${1::all}${2:, :cache => ${3:true}}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
545
- "linpp" =>
546
- {scope: "text.html.ruby, text.haml",
547
- name: "link_to (nested path plural)",
548
- content:
549
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${10:parent}_${11:child}_path(${12:@}${13:${10}})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
550
- "linp" =>
551
- {scope: "text.html.ruby, text.haml",
552
- name: "link_to (nested path)",
553
- content:
554
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${12:parent}_${13:child}_path(${14:@}${15:${12}}, ${16:@}${17:${13}})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
555
- "lipp" =>
556
- {scope: "text.html.ruby, text.haml",
557
- name: "link_to (path plural)",
558
- content:
559
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${4:model}s_path}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
560
- "lip" =>
561
- {scope: "text.html.ruby, text.haml",
562
- name: "link_to (path)",
563
- content:
564
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${12:model}_path(${13:@}${14:${12}})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
565
- "lim" =>
566
- {scope: "text.html.ruby, text.haml",
567
- name: "link_to model",
568
- content:
569
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:model}.${2:name}, ${3:${4:$1}_path(${14:$1})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
570
- "logd" =>
571
- {scope: "source.ruby.rails",
572
- name: "logger.debug",
573
- content: "logger.debug { \"${1:message}\" }$0"},
574
- "loge" =>
575
- {scope: "source.ruby.rails",
576
- name: "logger.error",
577
- content: "logger.error { \"${1:message}\" }$0"},
578
- "logf" =>
579
- {scope: "source.ruby.rails",
580
- name: "logger.fatal",
581
- content: "logger.fatal { \"${1:message}\" }$0"},
582
- "logi" =>
583
- {scope: "source.ruby.rails",
584
- name: "logger.info",
585
- content: "logger.info { \"${1:message}\" }$0"},
586
- "logw" =>
587
- {scope: "source.ruby.rails",
588
- name: "logger.warn",
589
- content: "logger.warn { \"${1:message}\" }$0"},
590
- "mp" =>
591
- {scope: "source.ruby.rails",
592
- name: "map(&:sym_proc)",
593
- content: "map(&:${1:id})"},
594
- "mapca" =>
595
- {scope: "meta.rails.routes",
596
- name: "map.catch_all",
597
- content:
598
- "${1:map}.catch_all \"*${2:anything}\", :controller => \"${3:default}\", :action => \"${4:error}\"\n"},
599
- "map" =>
600
- {scope: "meta.rails.routes",
601
- name: "map.named_route",
602
- content: "${1:map}.${2:connect} '${3::controller/:action/:id}'"},
603
- "mapr" =>
604
- {scope: "meta.rails.routes",
605
- name: "map.resource",
606
- content: "${1:map}.resource :${2:resource}${10: do |${11:$2}|\n $0\nend}"},
607
- "maprs" =>
608
- {scope: "meta.rails.routes",
609
- name: "map.resources",
610
- content:
611
- "${1:map}.resources :${2:resource}${10: do |${11:$2}|\n $0\nend}"},
612
- "mapwo" =>
613
- {scope: "meta.rails.routes",
614
- name: "map.with_options",
615
- content:
616
- "${1:map}.with_options :${2:controller} => '${3:thing}' do |${4:$3}|\n\t$0\nend\n"},
617
- "mrw" =>
618
- {scope: "source.ruby.rails",
619
- name: "mattr_accessor",
620
- content: "mattr_accessor :${0:attr_names}"},
621
- "ncl" =>
622
- {scope: "source.ruby.rails",
623
- name: "named_scope lambda",
624
- content:
625
- "named_scope :name, lambda { |${1:param}| { :conditions => ${3:['${4:${5:field} = ?}', ${6:$1}]} } }\n"},
626
- "nc" =>
627
- {scope: "source.ruby.rails",
628
- name: "named_scope",
629
- content:
630
- "named_scope :name${1:, :joins => :${2:table}}, :conditions => ${3:['${4:${5:field} = ?}', ${6:true}]}\n"},
631
- "hide" =>
632
- {scope: "source.ruby.rails.rjs",
633
- name: "page.hide (*ids)",
634
- content: "page.hide ${1:\"${2:id(s)}\"}"},
635
- "ins" =>
636
- {scope: "source.ruby.rails.rjs",
637
- name: "page.insert_html (position, id, partial)",
638
- content:
639
- "page.insert_html :${1:top}, ${2:\"${3:id}\"}, :${4:partial => \"${5:template}\"}"},
640
- "rep" =>
641
- {scope: "source.ruby.rails",
642
- name: "redirect_to (path)",
643
- content: "redirect_to(${2:${12:model}_path(${13:@}${14:${12}})})"},
644
- "reph" =>
645
- {scope: "source.ruby.rails.rjs",
646
- name: "page.replace_html (id, partial)",
647
- content:
648
- "page.replace_html ${1:\"${2:id}\"}, :${3:partial => \"${4:template}\"}"},
649
- "show" =>
650
- {scope: "source.ruby.rails.rjs",
651
- name: "page.show (*ids)",
652
- content: "page.show ${1:\"${2:id(s)}\"}"},
653
- "tog" =>
654
- {scope: "source.ruby.rails.rjs",
655
- name: "page.toggle (*ids)",
656
- content: "page.toggle ${1:\"${2:id(s)}\"}"},
657
- "vis" =>
658
- {scope: "source.ruby.rails.rjs",
659
- name: "page.visual_effect (effect, id)",
660
- content: "page.visual_effect :${1:toggle_slide}, ${2:\"${3:DOM ID}\"}"},
661
- "renpp" =>
662
- {scope: "source.ruby.rails",
663
- name: "redirect_to (nested path plural)",
664
- content:
665
- "redirect_to(${2:${10:parent}_${11:child}_path(${12:@}${13:${10}})})"},
666
- "renp" =>
667
- {scope: "source.ruby.rails",
668
- name: "redirect_to (nested path)",
669
- content:
670
- "redirect_to(${2:${12:parent}_${13:child}_path(${14:@}${15:${12}}, ${16:@}${17:${13}})})"},
671
- "repp" =>
672
- {scope: "source.ruby.rails",
673
- name: "redirect_to (path plural)",
674
- content: "redirect_to(${2:${10:model}s_path})"},
675
- "ru" =>
676
- {scope: "source.ruby.rails",
677
- name: "render (update)",
678
- content: "render :update do |${2:page}|\n\t$2.$0\nend"},
679
- "rest" =>
680
- {scope: "meta.rails.controller",
681
- name: "respond_to",
682
- content: "respond_to do |wants|\n\twants.${1:html}${2: { $0 \\}}\nend"},
683
- "returning" =>
684
- {scope: "source.ruby.rails",
685
- name: "returning do |variable| … end",
686
- content:
687
- "returning ${1:variable} do${2/(^(?<var>\\s*[a-z_][a-zA-Z0-9_]*\\s*)(,\\g<var>)*,?\\s*$)|.*/(?1: |)/}${2:v}${2/(^(?<var>\\s*[a-z_][a-zA-Z0-9_]*\\s*)(,\\g<var>)*,?\\s*$)|.*/(?1:|)/}\n\t$0\nend"},
688
- "slt" =>
689
- {scope: "text.html.ruby",
690
- name: "stylesheet_link_tag",
691
- content:
692
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}stylesheet_link_tag {1::all}${2:, :cache => ${3:true}}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
693
- "st" =>
694
- {scope: "text.html.ruby, text.haml",
695
- name: "submit_tag",
696
- content:
697
- "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}submit_tag \"${1:Save changes}\"${2:, :id => \"${3:submit}\"}${4:, :name => \"${5:$3}\"}${6:, :class => \"${7:form_$3}\"}${8:, :disabled => ${9:false}}${10:, :disable_with => \"${11:Please wait...}\"}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}"},
698
- "t." =>
699
- {scope:
700
- "meta.rails.migration.create_table, meta.rails.migration.change_table",
701
- name: "t.timestamps (tctss)",
702
- content: "t.timestamps\nt.$0"},
703
- "vaoif" =>
704
- {scope: "source.ruby.rails",
705
- name: "validates_acceptance_of if",
706
- content:
707
- "validates_acceptance_of :${1:terms}${2:${3:, :accept => \"${4:1}\"}${5:, :message => \"${6:You must accept the terms of service}\"}}, :if => proc { |obj| ${7:obj.condition?} }}"},
708
- "vao" =>
709
- {scope: "source.ruby.rails",
710
- name: "validates_acceptance_of",
711
- content:
712
- "validates_acceptance_of :${1:terms}${2:${3:, :accept => \"${4:1}\"}${5:, :message => \"${6:You must accept the terms of service}\"}}"},
713
- "vfif" =>
714
- {scope: "source.ruby.rails",
715
- name: "validates_format_of if",
716
- content:
717
- "validates_format_of :${1:attribute}, :with => /${2:^[${3:\\w\\d}]+\\$}/${4:, :on => :${5:create}, :message => \"${6:is invalid}\"}, :if => proc { |obj| ${7:obj.condition?} }}"},
718
- "vf" =>
719
- {scope: "source.ruby.rails",
720
- name: "validates_format_of",
721
- content:
722
- "validates_format_of :${1:attribute}, :with => /${2:^[${3:\\w\\d}]+\\$}/${4:, :on => :${5:create}, :message => \"${6:is invalid}\"}"},
723
- "viif" =>
724
- {scope: "source.ruby.rails",
725
- name: "validates_inclusion_of if",
726
- content:
727
- "validates_inclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not included in the list}\"}, :if => proc { |obj| ${7:obj.condition?} }}"},
728
- "vi" =>
729
- {scope: "source.ruby.rails",
730
- name: "validates_inclusion_of",
731
- content:
732
- "validates_inclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not included in the list}\"}"},
733
- "vlif" =>
734
- {scope: "source.ruby.rails",
735
- name: "validates_length_of if",
736
- content:
737
- "validates_length_of :${1:attribute}, :within => ${2:3..20}${3:, :on => :${4:create}, :message => \"${5:must be present}\"}, :if => proc { |obj| ${6:obj.condition?} }}"},
738
- "vnif" =>
739
- {scope: "source.ruby.rails",
740
- name: "validates_numericality_of if",
741
- content:
742
- "validates_numericality_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:is not a number}\"}, :if => proc { |obj| ${5:obj.condition?} }}"},
743
- "vn" =>
744
- {scope: "source.ruby.rails",
745
- name: "validates_numericality_of",
746
- content:
747
- "validates_numericality_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:is not a number}\"}"},
748
- "wants" =>
749
- {scope: "meta.rails.controller",
750
- name: "wants.format",
751
- content: "wants.${1:js|xml|html}${2: { $0 \\}}"},
752
- "xdelete" =>
753
- {scope: "source.ruby.rails",
754
- name: "xhr delete",
755
- content: "xhr :delete, :${1:destroy}, :id => ${2:1}$0"},
756
- "xget" =>
757
- {scope: "source.ruby.rails",
758
- name: "xhr get",
759
- content: "xhr :get, :${1:show}${2:, :id => ${3:1}}$0"},
760
- "xpost" =>
761
- {scope: "source.ruby.rails",
762
- name: "xhr post",
763
- content: "xhr :post, :${1:create}, :${2:object} => { $3 }"},
764
- "xput" =>
765
- {scope: "source.ruby.rails",
766
- name: "xhr put",
767
- content: "xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { $4 }$0"}}
3
+ [{content: "\\$LABEL",
4
+ name: "$LABEL",
5
+ scope: "source.yaml",
6
+ tabTrigger: "$L",
7
+ uuid: "786980D8-FA69-4542-85A3-5E48CFAA6814"},
8
+ {content:
9
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}Fixtures.identify(:${1:name})${TM_RAILS_TEMPLATE_END_RUBY_EXPR}$0",
10
+ name: "<%= Fixtures.identify(:symbol) %>",
11
+ scope: "source.yaml",
12
+ tabTrigger: "fi",
13
+ uuid: "9671EB7A-89D6-4C23-914F-88CBEE0D177A"},
14
+ {content: "t.column ${1:title}, :${2:string}\n$0",
15
+ name: "Create Column in Table",
16
+ scope: "meta.rails.migration.create_table",
17
+ tabTrigger: "mcol",
18
+ uuid: "7592CA99-75D7-48B6-9133-00B9F148FF43"},
19
+ {content: "t.column ${1:title}, :${2:string}\nmccc$0",
20
+ name: "Create Several Columns in Table",
21
+ scope: "meta.rails.migration.create_table",
22
+ tabTrigger: "mccc",
23
+ uuid: "67FD2F8F-5F25-45F2-A451-2F39977A9EDE"},
24
+ {content:
25
+ "class ${1:Model}Controller < ApplicationController\n\tbefore_filter :find_${2:model}\n\n\t$0\n\n\tprivate\n\tdef find_${2}\n\t\t@$2 = ${3:$1}.find(params[:id]) if params[:id]\n\tend\nend",
26
+ name: "Create controller class",
27
+ scope: "source.ruby",
28
+ tabTrigger: "cla",
29
+ uuid: "4B3F798E-E3B6-48C8-8C2F-CB8631011638"},
30
+ {content:
31
+ "require File.dirname(__FILE__) + '/../test_helper'\n\nclass ${1:Model}ControllerTest < ActionController::TestCase\n\tdeft$0\nend\n",
32
+ name: "Create functional test class",
33
+ scope: "source.ruby",
34
+ tabTrigger: "cla",
35
+ uuid: "F60D0630-CBF5-4283-9D20-FA46C787A88D"},
36
+ {content:
37
+ "drop_table :${1:table}${2: [press tab twice to generate create_table]}",
38
+ name: "Drop / Create Table",
39
+ scope:
40
+ "meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table",
41
+ tabTrigger: "mtab",
42
+ uuid: "20375601-B13F-4314-B8E4-362706566636"},
43
+ {content: "RAILS_DEFAULT_LOGGER.debug \"${1:message}\"$0",
44
+ name: "RAILS_DEFAULT_LOGGER.debug",
45
+ scope: "source.ruby.rails",
46
+ tabTrigger: "rdb",
47
+ uuid: "7B15B396-1F41-4529-9253-32761E94448C"},
48
+ {content:
49
+ "remove_column :${1:table}, :${2:column}${3: [press tab twice to generate add_column]}",
50
+ name: "Remove / Add Column",
51
+ scope:
52
+ "meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table",
53
+ tabTrigger: "mcol",
54
+ uuid: "16A705EB-10DC-42B5-9FF2-377E206421DC"},
55
+ {content: "t.binary :${1:title}${2:, :limit => ${3:2}.megabytes}\n$0",
56
+ name: "Table column binary",
57
+ scope:
58
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
59
+ tabTrigger: "tcbi",
60
+ uuid: "5E9B8B0E-D532-11DC-BD8E-00112475D960"},
61
+ {content: "t.boolean :${1:title}\n$0",
62
+ name: "Table column boolean",
63
+ scope:
64
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
65
+ tabTrigger: "tcb",
66
+ uuid: "967093B4-D532-11DC-BD8E-00112475D960"},
67
+ {content: "t.date :${1:title}\n$0",
68
+ name: "Table column date",
69
+ scope:
70
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
71
+ tabTrigger: "tcda",
72
+ uuid: "56276686-D532-11DC-BD8E-00112475D960"},
73
+ {content: "t.datetime :${1:title}\n$0",
74
+ name: "Table column datetime",
75
+ scope:
76
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
77
+ tabTrigger: "tcdt",
78
+ uuid: "D6CBCA96-D52F-11DC-BD8E-00112475D960"},
79
+ {content:
80
+ "t.decimal :${1:title}${2:${3:, :precision => ${4:10}}${5:, :scale => ${6:2}}}\n$0",
81
+ name: "Table column decimal",
82
+ scope:
83
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
84
+ tabTrigger: "tcd",
85
+ uuid: "93A16768-D52E-11DC-BD8E-00112475D960"},
86
+ {content: "t.float :${1:title}\n$0",
87
+ name: "Table column float",
88
+ scope:
89
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
90
+ tabTrigger: "tcf",
91
+ uuid: "8AF989C4-D52E-11DC-BD8E-00112475D960"},
92
+ {content: "t.integer :${1:title}\n$0",
93
+ name: "Table column integer",
94
+ scope:
95
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
96
+ tabTrigger: "tci",
97
+ uuid: "729D559E-D52D-11DC-BD8E-00112475D960"},
98
+ {content: "t.integer :lock_version, :null => false, :default => 0\n$0",
99
+ name: "Table column lock_version",
100
+ scope:
101
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
102
+ tabTrigger: "tcl",
103
+ uuid: "FC2523C1-D532-11DC-BD8E-00112475D960"},
104
+ {content: "t.string :${1:title}\n$0",
105
+ name: "Table column string",
106
+ scope:
107
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
108
+ tabTrigger: "tcs",
109
+ uuid: "377BF814-D52D-11DC-BD8E-00112475D960"},
110
+ {content: "t.text :${1:title}\n$0",
111
+ name: "Table column text",
112
+ scope:
113
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
114
+ tabTrigger: "tct",
115
+ uuid: "6A9D4C30-D52D-11DC-BD8E-00112475D960"},
116
+ {content: "t.time :${1:title}\n$0",
117
+ name: "Table column time",
118
+ scope:
119
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
120
+ tabTrigger: "tcti",
121
+ uuid: "4F5DDD37-D532-11DC-BD8E-00112475D960"},
122
+ {content: "t.timestamp :${1:title}\n$0",
123
+ name: "Table column timestamp",
124
+ scope:
125
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
126
+ tabTrigger: "tcts",
127
+ uuid: "4600CE20-D532-11DC-BD8E-00112475D960"},
128
+ {content: "t.timestamps\n$0",
129
+ name: "Table column timestamps",
130
+ scope:
131
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
132
+ tabTrigger: "tctss",
133
+ uuid: "E0C8FDC4-D532-11DC-BD8E-00112475D960"},
134
+ {content:
135
+ "t.references :${1:taggable}${2:, :polymorphic => ${3:{ :default => '${4:Photo}' \\}}}\n$0",
136
+ name: "Table column(s) references",
137
+ scope:
138
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
139
+ tabTrigger: "tcr",
140
+ uuid: "EDA6568B-D533-11DC-BD8E-00112475D960"},
141
+ {content: "t.rename(:${1:old_column_name}, :${2:new_column_name})\n$0",
142
+ name: "Table column(s) rename",
143
+ scope:
144
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
145
+ tabTrigger: "tre",
146
+ uuid: "DF30226E-1111-448A-B669-7CA34EE83909"},
147
+ {content: "after_create ",
148
+ name: "after_create",
149
+ scope: "source.ruby.rails",
150
+ tabTrigger: "aftc",
151
+ uuid: "279D1981-B055-4693-B9AF-5B571A62A6AE"},
152
+ {content: "after_destroy ",
153
+ name: "after_destroy",
154
+ scope: "source.ruby.rails",
155
+ tabTrigger: "aftd",
156
+ uuid: "A2F3E8C1-4216-4890-8491-2F8C7534ED03"},
157
+ {content: "after_save ",
158
+ name: "after_save",
159
+ scope: "source.ruby.rails",
160
+ tabTrigger: "afts",
161
+ uuid: "4D1787E3-1583-4CF3-8D99-CC45D7C35EED"},
162
+ {content: "after_update ",
163
+ name: "after_update",
164
+ scope: "source.ruby.rails",
165
+ tabTrigger: "aftu",
166
+ uuid: "0C9EA1A1-66C5-4E1C-9C30-E1FFE8EC6EAE"},
167
+ {content: "after_validation ",
168
+ name: "after_validation",
169
+ scope: "source.ruby.rails",
170
+ tabTrigger: "aftv",
171
+ uuid: "44FBD811-70A9-462B-AC56-F975ADAD62AF"},
172
+ {content: "after_validation_on_create ",
173
+ name: "after_validation_on_create",
174
+ scope: "source.ruby.rails",
175
+ tabTrigger: "aftvoc",
176
+ uuid: "BA0DE6C7-EAD3-42C9-8ABB-2B9A5F2FE225"},
177
+ {content: "after_validation_on_update ",
178
+ name: "after_validation_on_update",
179
+ scope: "source.ruby.rails",
180
+ tabTrigger: "aftvou",
181
+ uuid: "BCB25D36-2D3F-41E9-B2CF-37D6E883E8D1"},
182
+ {content: "assert(${1:var} = assigns(:${1}), \"Cannot find @${1}\")\n$0",
183
+ name: "assert(var = assigns(:var))",
184
+ scope: "source.ruby",
185
+ tabTrigger: "asg",
186
+ uuid: "FE9C4B4E-860D-49F0-AAF7-5582B98F5F54"},
187
+ {content: "assert_difference \"${1:Model}.${2:count}\", ${3:1} do\n $0\nend",
188
+ name: "assert_difference",
189
+ scope: "source.ruby",
190
+ tabTrigger: "asd",
191
+ uuid: "30BEA6FB-301C-4460-93EC-FA3404688962"},
192
+ {content: "assert_no_difference \"${1:Model}.${2:count}\" do\n $0\nend",
193
+ name: "assert_no_difference",
194
+ scope: "source.ruby",
195
+ tabTrigger: "asnd",
196
+ uuid: "5C6F4462-70E6-40B4-B3F2-F371656E7784"},
197
+ {content: "assert_redirected_to ${2::action => \"${1:index}\"}",
198
+ name: "assert_redirected_to",
199
+ scope: "source.ruby.rails",
200
+ tabTrigger: "art",
201
+ uuid: "CD60F800-850D-47CF-BE32-3DE665DD5C68"},
202
+ {content:
203
+ "assert_redirected_to ${10:${2:parent}_${3:child}_path(${4:@}${5:${2}})}",
204
+ name: "assert_redirected_to (nested path plural)",
205
+ scope: "source.ruby.rails",
206
+ tabTrigger: "artnpp",
207
+ uuid: "4C92C020-7337-4D6E-91EE-7ABF2BFC7F41"},
208
+ {content:
209
+ "assert_redirected_to ${2:${12:parent}_${13:child}_path(${14:@}${15:${12}}, ${16:@}${17:${13}})}",
210
+ name: "assert_redirected_to (nested path)",
211
+ scope: "source.ruby.rails",
212
+ tabTrigger: "artnp",
213
+ uuid: "97021C0D-EB65-4046-B688-01F09B3B1615"},
214
+ {content: "assert_redirected_to ${10:${2:model}s_path}",
215
+ name: "assert_redirected_to (path plural)",
216
+ scope: "source.ruby.rails",
217
+ tabTrigger: "artpp",
218
+ uuid: "0249637E-0720-46DA-A8FD-E176A2CC458B"},
219
+ {content: "assert_redirected_to ${2:${12:model}_path(${13:@}${14:${12}})}",
220
+ name: "assert_redirected_to (path)",
221
+ scope: "source.ruby.rails",
222
+ tabTrigger: "artp",
223
+ uuid: "D33EDCE7-F8AF-48D4-AA7A-852BBF03E31D"},
224
+ {content: "assert_response :${1:success}, @response.body$0",
225
+ name: "assert_response",
226
+ scope: "source.ruby.rails",
227
+ tabTrigger: "asre",
228
+ uuid: "2BD82DCB-1F19-4C8F-BC70-C0BBB06A2138"},
229
+ {content: "assert_rjs :${1:replace}, ${2:\"${3:dom id}\"}",
230
+ name: "assert_rjs",
231
+ scope: "source.ruby.rails",
232
+ tabTrigger: "asrj",
233
+ uuid: "E0F281EC-5311-41F8-ADD9-2E2D059DA651"},
234
+ {content:
235
+ "assert_select '${1:path}'${2:, :${3:text} => ${4:'${5:inner_html}'}}${6: do\n\t$0\nend}",
236
+ name: "assert_select",
237
+ scope: "source.ruby.rails",
238
+ tabTrigger: "ass",
239
+ uuid: "DBE14FE8-B415-4DBC-A316-F8DA63FE9FD7"},
240
+ {content: "before_create ",
241
+ name: "before_create",
242
+ scope: "source.ruby.rails",
243
+ tabTrigger: "befc",
244
+ uuid: "D64D8863-DCB6-4397-B5B0-073E0AE04167"},
245
+ {content: "before_destroy ",
246
+ name: "before_destroy",
247
+ scope: "source.ruby.rails",
248
+ tabTrigger: "befd",
249
+ uuid: "3F4B502B-5F68-4687-88E9-6EF3BDF9677D"},
250
+ {content: "before_save ",
251
+ name: "before_save",
252
+ scope: "source.ruby.rails",
253
+ tabTrigger: "befs",
254
+ uuid: "523BE8A6-0845-493D-A9B6-532F73D21950"},
255
+ {content: "before_update ",
256
+ name: "before_update",
257
+ scope: "source.ruby.rails",
258
+ tabTrigger: "befu",
259
+ uuid: "1C20EEBE-B4BA-48C8-9B33-7B5BB00D958C"},
260
+ {content: "before_validation ",
261
+ name: "before_validation",
262
+ scope: "source.ruby.rails",
263
+ tabTrigger: "befv",
264
+ uuid: "A1776279-5396-4FE9-9218-8BF2C88C5271"},
265
+ {content: "before_validation_on_create ",
266
+ name: "before_validation_on_create",
267
+ scope: "source.ruby.rails",
268
+ tabTrigger: "befvoc",
269
+ uuid: "E2CE2E3B-8A61-4866-9AF5-A12F44CF7233"},
270
+ {content: "before_validation_on_update",
271
+ name: "before_validation_on_update",
272
+ scope: "source.ruby.rails",
273
+ tabTrigger: "befvou",
274
+ uuid: "86CFB156-E72B-440F-9C7D-08A3375C3ADB"},
275
+ {content:
276
+ "belongs_to :${1:object}${2:, :class_name => \"${3:${1/[[:alpha:]]+|(_)/(?1::\\u$0)/g}}\", :foreign_key => \"${4:${1}_id}\"}",
277
+ name: "belongs_to",
278
+ scope: "source.ruby.rails",
279
+ tabTrigger: "bt",
280
+ uuid: "B8F08BD7-6160-482C-8A3D-CBC6BD2079A4"},
281
+ {content: "cattr_accessor :${0:attr_names}",
282
+ name: "cattr_accessor",
283
+ scope: "source.ruby.rails",
284
+ tabTrigger: "crw",
285
+ uuid: "F57522B2-9F5F-4DF9-AE46-9478AF019C63"},
286
+ {content:
287
+ "def create\n\t@${1:model} = ${2:${1/[[:alpha:]]+|(_)/(?1::\\u$0)/g}}.new(params[:$1])\n\t$0\n\trespond_to do |wants|\n\t\tif @$1.save\n\t\t\tflash[:notice] = '$2 was successfully created.'\n\t\t\twants.html { redirect_to(@$1) }\n\t\t\twants.xml { render :xml => @$1, :status => :created, :location => @$1 }\n\t\telse\n\t\t\twants.html { render :action => \"new\" }\n\t\t\twants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\t\tend\n\tend\nend\n",
288
+ name: "def create - resource",
289
+ scope: "meta.rails.controller",
290
+ tabTrigger: "defcreate",
291
+ uuid: "54F61419-001F-4B71-83AC-8DC633694AF0"},
292
+ {content:
293
+ "def test_should_get_${1:action}\n\t${2:@${3:model} = ${4:$3s}(:${5:fixture_name})\n\t}get :${1}${6:, :id => @$3.to_param}\n\tassert_response :success\n\t$0\nend",
294
+ name: "def test_should_get_action",
295
+ scope: "meta.rails.functional_test",
296
+ tabTrigger: "deftg",
297
+ uuid: "1C491A76-751F-44EF-8DFB-0A585C7EEFF6"},
298
+ {content:
299
+ "def test_should_post_${1:action}\n\t${3:@$2 = ${4:$2s}(:${5:fixture_name})\n\t}post :${1}${6:, :id => @$2.to_param}, :${2:model} => { $0 }\n\tassert_response :redirect\n\nend",
300
+ name: "def test_should_post_action",
301
+ scope: "meta.rails.functional_test",
302
+ tabTrigger: "deftp",
303
+ uuid: "8B9CD068-4338-4039-AA06-D839A6C7A9FF"},
304
+ {content: "<% end -%>",
305
+ name: "end (ERB)",
306
+ scope: "text.html.ruby",
307
+ tabTrigger: "end",
308
+ uuid: "AC385ABF-96CD-4FCB-80AD-BF37D6EE79D2"},
309
+ {content:
310
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.check_box :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
311
+ name: "f.check_box (ffcb)",
312
+ scope: "text.html.ruby, text.haml",
313
+ tabTrigger: "f.",
314
+ uuid: "F579F9E7-E072-4BCC-BFF9-C8C5BAE7FFA5"},
315
+ {content:
316
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.file_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
317
+ name: "f.file_field (ffff)",
318
+ scope: "text.html.ruby, text.haml",
319
+ tabTrigger: "f.",
320
+ uuid: "79BC2303-3D9D-4E21-AF85-73B388B7B56D"},
321
+ {content:
322
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.hidden_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
323
+ name: "f.hidden_field (ffhf)",
324
+ scope: "text.html.ruby, text.haml",
325
+ tabTrigger: "f.",
326
+ uuid: "5DBA8F72-DD6C-4CBF-83FD-76301E159BA9"},
327
+ {content:
328
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.label :${1:attribute}${2:, \"${3:${1/[[:alpha:]]+|(_)/(?1: :\\u$0)/g}}\"}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
329
+ name: "f.label (ffl)",
330
+ scope: "text.html.ruby, text.haml",
331
+ tabTrigger: "f.",
332
+ uuid: "402C251E-595B-4A58-8EB9-41989040F280"},
333
+ {content:
334
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.password_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
335
+ name: "f.password_field (ffpf)",
336
+ scope: "text.html.ruby, text.haml",
337
+ tabTrigger: "f.",
338
+ uuid: "42289456-C8D1-498C-AE30-5206544B349F"},
339
+ {content:
340
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.radio_box :${1:attribute}, :${2:tag_value}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
341
+ name: "f.radio_box (ffrb)",
342
+ scope: "text.html.ruby, text.haml",
343
+ tabTrigger: "f.",
344
+ uuid: "A95358D2-C68A-4894-8C36-062C9F45848A"},
345
+ {content:
346
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.submit \"${1:Submit}\"${2:, :disable_with => '${3:$1ing...}'}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
347
+ name: "f.submit (ffs)",
348
+ scope: "text.html.ruby, text.haml",
349
+ tabTrigger: "f.",
350
+ uuid: "C315EC5D-A7F3-49CB-9795-21B78BB42FF4"},
351
+ {content:
352
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.text_area :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
353
+ name: "f.text_area (ffta)",
354
+ scope: "text.html.ruby, text.haml",
355
+ tabTrigger: "f.",
356
+ uuid: "06498926-F84D-466C-8736-B8A0AC586A94"},
357
+ {content:
358
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.text_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
359
+ name: "f.text_field (fftf)",
360
+ scope: "text.html.ruby, text.haml",
361
+ tabTrigger: "f.",
362
+ uuid: "CC1BCD1C-2479-4335-B511-17B880316A75"},
363
+ {content:
364
+ "find(:all${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})",
365
+ name: "find(:all)",
366
+ scope: "source.ruby.rails",
367
+ tabTrigger: "fina",
368
+ uuid: "A017AB39-A875-40DC-8ACF-7E3551057CA0"},
369
+ {content:
370
+ "find(:first${1:, :conditions => ['${2:${3:field} = ?}', ${5:true}]})",
371
+ name: "find(:first)",
372
+ scope: "source.ruby.rails",
373
+ tabTrigger: "finf",
374
+ uuid: "FE430ECD-5D40-4D95-A73B-F064C73992DE"},
375
+ {content: "find(${1:id})",
376
+ name: "find(id)",
377
+ scope: "source.ruby.rails",
378
+ tabTrigger: "fini",
379
+ uuid: "59CD3A41-8164-4FB4-B462-D7ACE86BCDBF"},
380
+ {content: "flash[:${1:notice}] = \"${2:Successfully created...}\"$0",
381
+ name: "flash[…]",
382
+ scope: "source.ruby.rails",
383
+ tabTrigger: "flash",
384
+ uuid: "D864896E-8763-11D9-897C-000393CBCE2E"},
385
+ {content:
386
+ "<% if !${1:list}.blank? %>\n <% for ${2:item} in ${1} %>\n $3\n <% end %>\n<% else %>\n $4\n<% end %>\n",
387
+ name: "for loop in rhtml",
388
+ scope: "text.html.ruby",
389
+ tabTrigger: "for",
390
+ uuid: "F7744F07-306C-4951-AB5A-3D69BA5516B7"},
391
+ {content:
392
+ "${TM_RAILS_TEMPLATE_START_RUBY_INLINE}form_for @${1:model} do |f|${TM_RAILS_TEMPLATE_END_RUBY_INLINE}\n $0\n${TM_RAILS_TEMPLATE_END_RUBY_BLOCK}",
393
+ name: "form_for",
394
+ scope: "text.html.ruby, text.haml",
395
+ tabTrigger: "ff",
396
+ uuid: "7D99041D-C3B7-4940-AE64-6B1758CDB47C"},
397
+ {content:
398
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.check_box :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
399
+ name: "form_for check_box",
400
+ scope: "text.html.ruby, text.haml",
401
+ tabTrigger: "ffcb",
402
+ uuid: "F0DB6886-4FFE-45BA-907F-44326AD8142D"},
403
+ {content:
404
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.file_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
405
+ name: "form_for file_field",
406
+ scope: "text.html.ruby, text.haml",
407
+ tabTrigger: "ffff",
408
+ uuid: "C8BA285D-E12E-4AB8-A941-514C963E8226"},
409
+ {content:
410
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.hidden_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
411
+ name: "form_for hidden_field",
412
+ scope: "text.html.ruby, text.haml",
413
+ tabTrigger: "ffhf",
414
+ uuid: "99FEFD9B-5A07-46E3-950D-5C474E42B695"},
415
+ {content:
416
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.label :${1:attribute}${2:, \"${3:${1/[[:alpha:]]+|(_)/(?1: :\\u$0)/g}}\"}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
417
+ name: "form_for label",
418
+ scope: "text.html.ruby, text.haml",
419
+ tabTrigger: "ffl",
420
+ uuid: "B31822D9-2048-4D16-B2AF-00E0B4E5C368"},
421
+ {content:
422
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.password_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
423
+ name: "form_for password_field",
424
+ scope: "text.html.ruby, text.haml",
425
+ tabTrigger: "ffpf",
426
+ uuid: "3379FB35-C664-4255-96C6-6E4B91F12759"},
427
+ {content:
428
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.radio_box :${1:attribute}, :${2:tag_value}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
429
+ name: "form_for radio_box",
430
+ scope: "text.html.ruby, text.haml",
431
+ tabTrigger: "ffrb",
432
+ uuid: "D4282CE1-4171-4B13-9220-3F2718BC2505"},
433
+ {content:
434
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.submit \"${1:Submit}\"${2:, :disable_with => '${3:$1ing...}'}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
435
+ name: "form_for submit",
436
+ scope: "text.html.ruby, text.haml",
437
+ tabTrigger: "ffs",
438
+ uuid: "3000E569-4E19-4566-B08E-A3FFFAAC9075"},
439
+ {content:
440
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.text_area :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
441
+ name: "form_for text_area",
442
+ scope: "text.html.ruby, text.haml",
443
+ tabTrigger: "ffta",
444
+ uuid: "4C898FA8-D09C-4B28-BE42-14BB4EA4E2B1"},
445
+ {content:
446
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}f.text_field :${1:attribute}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
447
+ name: "form_for text_field",
448
+ scope: "text.html.ruby, text.haml",
449
+ tabTrigger: "fftf",
450
+ uuid: "F46EE8EE-239C-46D7-980B-3F861B7D9111"},
451
+ {content:
452
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}error_messages_for :${1:model}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}\n\n${TM_RAILS_TEMPLATE_START_RUBY_INLINE}form_for @${2:$1} do |f|${TM_RAILS_TEMPLATE_END_RUBY_INLINE}\n $0\n${TM_RAILS_TEMPLATE_END_RUBY_BLOCK}",
453
+ name: "form_for with errors",
454
+ scope: "text.html.ruby, text.haml",
455
+ tabTrigger: "ffe",
456
+ uuid: "15BDD7B6-5C15-4684-93C7-A05E3D2221AC"},
457
+ {content:
458
+ "${TM_RAILS_TEMPLATE_START_RUBY_INLINE}form_tag(${1::action => \"${5:update}\"}${6:, {:${8:class} => \"${9:form}\"\\}}) do${TM_RAILS_TEMPLATE_END_RUBY_EXPR}\n $0\n${TM_RAILS_TEMPLATE_END_RUBY_BLOCK}",
459
+ name: "form_tag",
460
+ scope: "text.html.ruby, text.haml",
461
+ tabTrigger: "ft",
462
+ uuid: "F0F6DACA-6A0B-11D9-BDC2-000D932CD5BA"},
463
+ {content:
464
+ "has_and_belongs_to_many :${1:object}${2:, :join_table => \"${3:table_name}\", :foreign_key => \"${4:${1}_id}\"}",
465
+ name: "has_and_belongs_to_many",
466
+ scope: "source.ruby.rails",
467
+ tabTrigger: "habtm",
468
+ uuid: "2AC3AC1F-743B-4A33-863C-C37885073806"},
469
+ {content:
470
+ "has_many :${1:object}s${2:, :class_name => \"${1}\", :foreign_key => \"${4:reference}_id\"}",
471
+ name: "has_many",
472
+ scope: "source.ruby.rails",
473
+ tabTrigger: "hm",
474
+ uuid: "F396B7BD-8255-48B1-904A-06E7D7CC2741"},
475
+ {content:
476
+ "has_many :${1:objects}, :through => :${2:join_association}${3:, :source => :${4:${2}_table_foreign_key_to_${1}_table}}",
477
+ name: "has_many (through)",
478
+ scope: "source.ruby.rails",
479
+ tabTrigger: "hmt",
480
+ uuid: "9D58B6C9-BA52-48B3-B639-D5CB894AF810"},
481
+ {content:
482
+ "has_many :${1:object}s${2:, :class_name => \"${1}\", :foreign_key => \"${4:reference}_id\"}, :dependent => :destroy$0",
483
+ name: "has_many :dependent => :destroy",
484
+ scope: "source.ruby.rails",
485
+ tabTrigger: "hmd",
486
+ uuid: "3E3AF538-171B-4108-AB92-827AD7E24C77"},
487
+ {content:
488
+ "has_one :${1:object}${2:, :class_name => \"${3:${1/[[:alpha:]]+|(_)/(?1::\\u$0)/g}}\", :foreign_key => \"${4:${1}_id}\"}",
489
+ name: "has_one",
490
+ scope: "source.ruby.rails",
491
+ tabTrigger: "ho",
492
+ uuid: "BD2E4045-54E6-450E-B31B-5E1865CFFBC9"},
493
+ {content:
494
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}image_submit_tag(\"${1:agree.png}\"${2:${3:, :id => \"${4:${1/^(\\w+)(\\.\\w*)?$/$1/}}\"}${5:, :name => \"${6:${1/^(\\w+)(\\.\\w*)?$/$1/}}\"}${7:, :class => \"${8:${1/^(\\w+)(\\.\\w*)?$/$1/}-button}\"}${9:, :disabled => ${10:false}}})${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
495
+ name: "image_submit_tag",
496
+ scope: "text.html.ruby, text.haml",
497
+ tabTrigger: "ist",
498
+ uuid: "9FB9848E-EA5A-11DC-9DE5-00112475D960"},
499
+ {content:
500
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}javascript_include_tag ${1::all}${2:, :cache => ${3:true}}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
501
+ name: "javascript_include_tag",
502
+ scope: "text.html.ruby",
503
+ tabTrigger: "jit",
504
+ uuid: "FEF49C86-9386-405E-A191-684D1C963E3A"},
505
+ {content:
506
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :action => \"${2:index}\"${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
507
+ name: "link_to (action)",
508
+ scope: "text.html.ruby, text.haml",
509
+ tabTrigger: "lia",
510
+ uuid: "9E2B42FE-7BC8-11D9-906A-000D932CD5BA"},
511
+ {content:
512
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :action => \"${2:edit}\", :id => ${3:@item}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
513
+ name: "link_to (action, id)",
514
+ scope: "text.html.ruby, text.haml",
515
+ tabTrigger: "liai",
516
+ uuid: "B4F952F4-7BC8-11D9-906A-000D932CD5BA"},
517
+ {content:
518
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :controller => \"${2:items}\"${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
519
+ name: "link_to (controller)",
520
+ scope: "text.html.ruby, text.haml",
521
+ tabTrigger: "lic",
522
+ uuid: "74590E16-7BCB-11D9-906A-000D932CD5BA"},
523
+ {content:
524
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :controller => \"${2:items}\", :action => \"${3:index}\"${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
525
+ name: "link_to (controller, action)",
526
+ scope: "text.html.ruby, text.haml",
527
+ tabTrigger: "lica",
528
+ uuid: "C11C0BF5-7BC8-11D9-906A-000D932CD5BA"},
529
+ {content:
530
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to \"${1:link text...}\", :controller => \"${2:items}\", :action => \"${3:edit}\", :id => ${4:@item}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
531
+ name: "link_to (controller, action, id)",
532
+ scope: "text.html.ruby, text.haml",
533
+ tabTrigger: "licai",
534
+ uuid: "D21BE958-7BC8-11D9-906A-000D932CD5BA"},
535
+ {content:
536
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${10:parent}_${11:child}_path(${12:@}${13:${10}})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
537
+ name: "link_to (nested path plural)",
538
+ scope: "text.html.ruby, text.haml",
539
+ tabTrigger: "linpp",
540
+ uuid: "866AAD87-E458-4F2D-9E7C-3CE73EFC047B"},
541
+ {content:
542
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${12:parent}_${13:child}_path(${14:@}${15:${12}}, ${16:@}${17:${13}})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
543
+ name: "link_to (nested path)",
544
+ scope: "text.html.ruby, text.haml",
545
+ tabTrigger: "linp",
546
+ uuid: "750DEEF9-18A0-40FC-8E54-574CE5EE5565"},
547
+ {content:
548
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${4:model}s_path}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
549
+ name: "link_to (path plural)",
550
+ scope: "text.html.ruby, text.haml",
551
+ tabTrigger: "lipp",
552
+ uuid: "6BA737F0-63D1-4D82-9381-4331E18B12C5"},
553
+ {content:
554
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:\"${2:link text...}\"}, ${3:${12:model}_path(${13:@}${14:${12}})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
555
+ name: "link_to (path)",
556
+ scope: "text.html.ruby, text.haml",
557
+ tabTrigger: "lip",
558
+ uuid: "326B57A7-B4A9-447B-A3D2-0EA74158E1E1"},
559
+ {content:
560
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}link_to ${1:model}.${2:name}, ${3:${4:$1}_path(${14:$1})}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
561
+ name: "link_to model",
562
+ scope: "text.html.ruby, text.haml",
563
+ tabTrigger: "lim",
564
+ uuid: "E5E08AA0-4EDD-4583-BF07-5D6C49E98410"},
565
+ {content: "logger.debug { \"${1:message}\" }$0",
566
+ name: "logger.debug",
567
+ scope: "source.ruby.rails",
568
+ tabTrigger: "logd",
569
+ uuid: "D975E5C1-42C2-40F1-8960-0DA533B18113"},
570
+ {content: "logger.error { \"${1:message}\" }$0",
571
+ name: "logger.error",
572
+ scope: "source.ruby.rails",
573
+ tabTrigger: "loge",
574
+ uuid: "7053B86A-9B81-4154-AB3C-61B8035C5D33"},
575
+ {content: "logger.fatal { \"${1:message}\" }$0",
576
+ name: "logger.fatal",
577
+ scope: "source.ruby.rails",
578
+ tabTrigger: "logf",
579
+ uuid: "35E95C81-22F7-4C40-8297-ED21086DDA81"},
580
+ {content: "logger.info { \"${1:message}\" }$0",
581
+ name: "logger.info",
582
+ scope: "source.ruby.rails",
583
+ tabTrigger: "logi",
584
+ uuid: "36E2A3EE-E9CC-4B7F-A4CF-AFAF970B8699"},
585
+ {content: "logger.warn { \"${1:message}\" }$0",
586
+ name: "logger.warn",
587
+ scope: "source.ruby.rails",
588
+ tabTrigger: "logw",
589
+ uuid: "38D5CA05-E219-4399-A244-609AF40B1D0B"},
590
+ {content: "map(&:${1:id})",
591
+ name: "map(&:sym_proc)",
592
+ scope: "source.ruby.rails",
593
+ tabTrigger: "mp",
594
+ uuid: "EC605540-C431-4FD0-AD91-D913118DACA7"},
595
+ {content:
596
+ "${1:map}.catch_all \"*${2:anything}\", :controller => \"${3:default}\", :action => \"${4:error}\"\n",
597
+ name: "map.catch_all",
598
+ scope: "meta.rails.routes",
599
+ tabTrigger: "mapca",
600
+ uuid: "F3606586-F905-4A91-92CA-82319239221D"},
601
+ {content: "${1:map}.${2:connect} '${3::controller/:action/:id}'",
602
+ name: "map.named_route",
603
+ scope: "meta.rails.routes",
604
+ tabTrigger: "map",
605
+ uuid: "91C543BF-7BD8-4E3A-B493-AE572C5472A0"},
606
+ {content: "${1:map}.resource :${2:resource}${10: do |${11:$2}|\n $0\nend}",
607
+ name: "map.resource",
608
+ scope: "meta.rails.routes",
609
+ tabTrigger: "mapr",
610
+ uuid: "2183A9A9-17ED-4A4F-ABB6-668EDDD3A6E4"},
611
+ {content: "${1:map}.resources :${2:resource}${10: do |${11:$2}|\n $0\nend}",
612
+ name: "map.resources",
613
+ scope: "meta.rails.routes",
614
+ tabTrigger: "maprs",
615
+ uuid: "0FF86C46-0E01-4D03-8232-72CA5BD55706"},
616
+ {content:
617
+ "${1:map}.with_options :${2:controller} => '${3:thing}' do |${4:$3}|\n\t$0\nend\n",
618
+ name: "map.with_options",
619
+ scope: "meta.rails.routes",
620
+ tabTrigger: "mapwo",
621
+ uuid: "BD4B90F7-2187-4E75-BFFB-77BE67CB8DAE"},
622
+ {content: "mattr_accessor :${0:attr_names}",
623
+ name: "mattr_accessor",
624
+ scope: "source.ruby.rails",
625
+ tabTrigger: "mrw",
626
+ uuid: "B25B7560-FACB-4A9E-A226-B71C796BD1F3"},
627
+ {content:
628
+ "named_scope :name${1:, :joins => :${2:table}}, :conditions => ${3:['${4:${5:field} = ?}', ${6:true}]}\n",
629
+ name: "named_scope",
630
+ scope: "source.ruby.rails",
631
+ tabTrigger: "nc",
632
+ uuid: "1CB65A0D-4FEC-4438-9B4F-8B0BD13FB875"},
633
+ {content:
634
+ "named_scope :name, lambda { |${1:param}| { :conditions => ${3:['${4:${5:field} = ?}', ${6:$1}]} } }\n",
635
+ name: "named_scope lambda",
636
+ scope: "source.ruby.rails",
637
+ tabTrigger: "ncl",
638
+ uuid: "4E286CB4-069E-474C-A970-95216FE7DE95"},
639
+ {content: "page.hide ${1:\"${2:id(s)}\"}",
640
+ name: "page.hide (*ids)",
641
+ scope: "source.ruby.rails.rjs",
642
+ tabTrigger: "hide",
643
+ uuid: "390A447F-0FA3-4F01-A10C-4F35675E0A43"},
644
+ {content:
645
+ "page.insert_html :${1:top}, ${2:\"${3:id}\"}, :${4:partial => \"${5:template}\"}",
646
+ name: "page.insert_html (position, id, partial)",
647
+ scope: "source.ruby.rails.rjs",
648
+ tabTrigger: "ins",
649
+ uuid: "62BEA590-F4EF-4001-B661-764EDFB92811"},
650
+ {content: "page.replace ${1:\"${2:id}\"}, :${3:partial => \"${4:template}\"}",
651
+ name: "page.replace (id, partial)",
652
+ scope: "source.ruby.rails.rjs",
653
+ tabTrigger: "rep",
654
+ uuid: "273E5E76-8D13-4476-9C38-8AF87432CB96"},
655
+ {content:
656
+ "page.replace_html ${1:\"${2:id}\"}, :${3:partial => \"${4:template}\"}",
657
+ name: "page.replace_html (id, partial)",
658
+ scope: "source.ruby.rails.rjs",
659
+ tabTrigger: "reph",
660
+ uuid: "8B914165-9C66-4FA3-9AD6-1DA41B25F8F1"},
661
+ {content: "page.show ${1:\"${2:id(s)}\"}",
662
+ name: "page.show (*ids)",
663
+ scope: "source.ruby.rails.rjs",
664
+ tabTrigger: "show",
665
+ uuid: "5ACBF49D-B5A5-495C-89D8-18AA740D9D02"},
666
+ {content: "page.toggle ${1:\"${2:id(s)}\"}",
667
+ name: "page.toggle (*ids)",
668
+ scope: "source.ruby.rails.rjs",
669
+ tabTrigger: "tog",
670
+ uuid: "028DA0A4-B310-4BEF-8643-2A22993C21C7"},
671
+ {content: "page.visual_effect :${1:toggle_slide}, ${2:\"${3:DOM ID}\"}",
672
+ name: "page.visual_effect (effect, id)",
673
+ scope: "source.ruby.rails.rjs",
674
+ tabTrigger: "vis",
675
+ uuid: "CFDC27A3-58CF-4198-8F93-36360978F0D0"},
676
+ {content: "params[:${1:id}]",
677
+ keyEquivalent: "^p",
678
+ name: "params[…]",
679
+ scope: "source.ruby.rails",
680
+ uuid: "AC8EDA3E-875B-11D9-897C-000393CBCE2E"},
681
+ {content: "redirect_to :action => \"${1:index}\"",
682
+ name: "redirect_to (action)",
683
+ scope: "source.ruby.rails",
684
+ tabTrigger: "rea",
685
+ uuid: "F2F3167C-73B9-11D9-B752-000D932CD5BA"},
686
+ {content: "redirect_to :action => \"${1:show}\", :id => ${0:@item}",
687
+ name: "redirect_to (action, id)",
688
+ scope: "source.ruby.rails",
689
+ tabTrigger: "reai",
690
+ uuid: "2233B484-73BA-11D9-B752-000D932CD5BA"},
691
+ {content: "redirect_to :controller => \"${1:items}\"",
692
+ name: "redirect_to (controller)",
693
+ scope: "source.ruby.rails",
694
+ tabTrigger: "rec",
695
+ uuid: "053490FE-73BA-11D9-B752-000D932CD5BA"},
696
+ {content:
697
+ "redirect_to :controller => \"${1:items}\", :action => \"${2:list}\"",
698
+ name: "redirect_to (controller, action)",
699
+ scope: "source.ruby.rails",
700
+ tabTrigger: "reca",
701
+ uuid: "0C137FBF-73BA-11D9-B752-000D932CD5BA"},
702
+ {content:
703
+ "redirect_to :controller => \"${1:items}\", :action => \"${2:show}\", :id => ${0:@item}",
704
+ name: "redirect_to (controller, action, id)",
705
+ scope: "source.ruby.rails",
706
+ tabTrigger: "recai",
707
+ uuid: "18D3C1C3-73BA-11D9-B752-000D932CD5BA"},
708
+ {content:
709
+ "redirect_to(${2:${10:parent}_${11:child}_path(${12:@}${13:${10}})})",
710
+ name: "redirect_to (nested path plural)",
711
+ scope: "source.ruby.rails",
712
+ tabTrigger: "renpp",
713
+ uuid: "EF527A27-D1D4-4FD8-BD23-71397881C29A"},
714
+ {content:
715
+ "redirect_to(${2:${12:parent}_${13:child}_path(${14:@}${15:${12}}, ${16:@}${17:${13}})})",
716
+ name: "redirect_to (nested path)",
717
+ scope: "source.ruby.rails",
718
+ tabTrigger: "renp",
719
+ uuid: "9D7228B3-A6ED-4598-B096-032B3600864F"},
720
+ {content: "redirect_to(${2:${10:model}s_path})",
721
+ name: "redirect_to (path plural)",
722
+ scope: "source.ruby.rails",
723
+ tabTrigger: "repp",
724
+ uuid: "AFE06B67-CE98-42A6-93D1-8EC8E3B9F83C"},
725
+ {content: "redirect_to(${2:${12:model}_path(${13:@}${14:${12}})})",
726
+ name: "redirect_to (path)",
727
+ scope: "source.ruby.rails",
728
+ tabTrigger: "rep",
729
+ uuid: "A909C4C3-8EFE-4E39-9D96-BA8F0ABE6085"},
730
+ {content: "render :action => \"${1:action}\"",
731
+ name: "render (action)",
732
+ scope: "source.ruby.rails",
733
+ tabTrigger: "ra",
734
+ uuid: "7B03D38B-7580-41AC-BC2B-3766AB074A43"},
735
+ {content: "render :action => \"${1:action}\", :layout => \"${2:layoutname}\"",
736
+ name: "render (action, layout)",
737
+ scope: "source.ruby.rails",
738
+ tabTrigger: "ral",
739
+ uuid: "053F1D6A-B413-43FF-B697-E3120FD0489F"},
740
+ {content: "render :file => \"${1:filepath}\"",
741
+ name: "render (file)",
742
+ scope: "source.ruby.rails",
743
+ tabTrigger: "rf",
744
+ uuid: "7D43B0EA-2C3C-499B-9346-A8E48CBF29CD"},
745
+ {content: "render :file => \"${1:filepath}\", :use_full_path => ${2:false}",
746
+ name: "render (file, use_full_path)",
747
+ scope: "source.ruby.rails",
748
+ tabTrigger: "rfu",
749
+ uuid: "2A8FBE48-E196-4019-AE76-BF3ED4B54F47"},
750
+ {content: "render :inline => \"${1:<%= 'hello' %>}\"",
751
+ name: "render (inline)",
752
+ scope: "source.ruby.rails",
753
+ tabTrigger: "ri",
754
+ uuid: "64E93A71-6E62-48D9-9694-123080AE6723"},
755
+ {content:
756
+ "render :inline => \"${1:<%= 'hello' %>}\", :locals => { ${2::name} => \"${3:value}\"$4 }",
757
+ name: "render (inline, locals)",
758
+ scope: "source.ruby.rails",
759
+ tabTrigger: "ril",
760
+ uuid: "1E5DE984-510C-4992-8AD5-C5FA6D7F2A88"},
761
+ {content: "render :inline => \"${1:<%= 'hello' %>}\", :type => ${2::rxml}",
762
+ name: "render (inline, type)",
763
+ scope: "source.ruby.rails",
764
+ tabTrigger: "rit",
765
+ uuid: "A8AF8B90-94E8-42E1-8057-DDBA57809F6A"},
766
+ {content: "render :layout => \"${1:layoutname}\"",
767
+ name: "render (layout)",
768
+ scope: "source.ruby.rails",
769
+ tabTrigger: "rl",
770
+ uuid: "3F83272F-62D5-4BCB-BAA3-806083078829"},
771
+ {content: "render :nothing => ${1:true}",
772
+ name: "render (nothing)",
773
+ scope: "source.ruby.rails",
774
+ tabTrigger: "rn",
775
+ uuid: "AC8A995F-0034-433C-905D-E5C1F29D6EFF"},
776
+ {content: "render :nothing => ${1:true}, :status => ${2:401}",
777
+ name: "render (nothing, status)",
778
+ scope: "source.ruby.rails",
779
+ tabTrigger: "rns",
780
+ uuid: "724A68C1-A727-46FF-AF59-288E26B09629"},
781
+ {content: "render :partial => \"${1:item}\"",
782
+ name: "render (partial)",
783
+ scope: "source.ruby.rails",
784
+ tabTrigger: "rp",
785
+ uuid: "498168A5-5AF8-4F59-8A2D-B517FAB98CDB"},
786
+ {content: "render :partial => \"${1:item}\", :collection => ${2:@$1s}",
787
+ name: "render (partial, collection)",
788
+ scope: "source.ruby.rails",
789
+ tabTrigger: "rpc",
790
+ uuid: "046FB1B6-9C65-4702-91EC-4AA9878CD949"},
791
+ {content:
792
+ "render :partial => \"${1:item}\", :locals => { :${2:$1} => ${3:@$1}$0 }",
793
+ name: "render (partial, locals)",
794
+ scope: "source.ruby.rails",
795
+ tabTrigger: "rpl",
796
+ uuid: "6F41AFFD-B3A7-42D0-8A84-D6086C118D92"},
797
+ {content: "render :partial => \"${1:item}\", :object => ${2:@$1}",
798
+ name: "render (partial, object)",
799
+ scope: "source.ruby.rails",
800
+ tabTrigger: "rpo",
801
+ uuid: "BFAAC8DA-A043-4684-967B-B3E5DAE08C62"},
802
+ {content: "render :partial => \"${1:item}\", :status => ${2:500}",
803
+ name: "render (partial, status)",
804
+ scope: "source.ruby.rails",
805
+ tabTrigger: "rps",
806
+ uuid: "CBB06A4E-3A82-45F3-91AA-259F02314B9D"},
807
+ {content: "render :text => \"${1:text to render...}\"",
808
+ name: "render (text)",
809
+ scope: "source.ruby.rails",
810
+ tabTrigger: "rt",
811
+ uuid: "67C5082F-5011-434A-8EAA-6B8D3600935F"},
812
+ {content: "render :text => \"${1:text to render...}\", :layout => ${2:true}",
813
+ name: "render (text, layout => true)",
814
+ scope: "source.ruby.rails",
815
+ tabTrigger: "rtlt",
816
+ uuid: "97C0992D-715F-4322-A3E0-DD4D2B7E2FC2"},
817
+ {content:
818
+ "render :text => \"${1:text to render...}\", :layout => \"${2:layoutname}\"",
819
+ name: "render (text, layout)",
820
+ scope: "source.ruby.rails",
821
+ tabTrigger: "rtl",
822
+ uuid: "A3B09AFE-40B5-4623-8B85-E9F369ECE22D"},
823
+ {content: "render :text => \"${1:text to render...}\", :status => ${2:401}",
824
+ name: "render (text, status)",
825
+ scope: "source.ruby.rails",
826
+ tabTrigger: "rts",
827
+ uuid: "4F636977-F7A6-4BF5-B09B-7F087683C3B9"},
828
+ {content: "render :update do |${2:page}|\n\t$2.$0\nend",
829
+ name: "render (update)",
830
+ scope: "source.ruby.rails",
831
+ tabTrigger: "ru",
832
+ uuid: "ECB10C0B-E8B7-4606-ABF5-4A2A26E5AB1A"},
833
+ {content: "respond_to do |wants|\n\twants.${1:html}${2: { $0 \\}}\nend",
834
+ name: "respond_to",
835
+ scope: "meta.rails.controller",
836
+ tabTrigger: "rest",
837
+ uuid: "B41D3164-EA53-4DDC-850E-27B82B24061F"},
838
+ {content:
839
+ "respond_to do |wants|\n\twants.html do\n\t\t$TM_SELECTED_TEXT\n\tend\n\twants.${1:js} { $0 }\nend",
840
+ keyEquivalent: "@H",
841
+ name: "respond_to (html)",
842
+ scope: "meta.rails.controller",
843
+ uuid: "3BDD0D52-443E-4F5F-AE09-ABCC2ABE9A42"},
844
+ {content:
845
+ "returning ${1:variable} do${2/(^(?<var>\\s*[a-z_][a-zA-Z0-9_]*\\s*)(,\\g<var>)*,?\\s*$)|.*/(?1: |)/}${2:v}${2/(^(?<var>\\s*[a-z_][a-zA-Z0-9_]*\\s*)(,\\g<var>)*,?\\s*$)|.*/(?1:|)/}\n\t$0\nend",
846
+ name: "returning do |variable| … end",
847
+ scope: "source.ruby.rails",
848
+ tabTrigger: "returning",
849
+ uuid: "D2783155-23F3-4B90-A317-5BD139471193"},
850
+ {content: "session[:${1:user}]",
851
+ keyEquivalent: "^j",
852
+ name: "session[…]",
853
+ scope: "source.ruby.rails",
854
+ uuid: "7B02ABF8-8763-11D9-897C-000393CBCE2E"},
855
+ {content:
856
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}stylesheet_link_tag {1::all}${2:, :cache => ${3:true}}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
857
+ name: "stylesheet_link_tag",
858
+ scope: "text.html.ruby",
859
+ tabTrigger: "slt",
860
+ uuid: "980C7667-9D60-49FF-AF74-A7B19B379F45"},
861
+ {content:
862
+ "${TM_RAILS_TEMPLATE_START_RUBY_EXPR}submit_tag \"${1:Save changes}\"${2:, :id => \"${3:submit}\"}${4:, :name => \"${5:$3}\"}${6:, :class => \"${7:form_$3}\"}${8:, :disabled => ${9:false}}${10:, :disable_with => \"${11:Please wait...}\"}${TM_RAILS_TEMPLATE_END_RUBY_EXPR}",
863
+ name: "submit_tag",
864
+ scope: "text.html.ruby, text.haml",
865
+ tabTrigger: "st",
866
+ uuid: "D0E29200-E910-11DC-A399-00112475D960"},
867
+ {content: "t.binary :${1:title}${2:, :limit => ${3:2}.megabytes}\nt.$0",
868
+ name: "t.binary (tcbi)",
869
+ scope:
870
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
871
+ tabTrigger: "t.",
872
+ uuid: "7CE57C6C-E4BE-11DC-A11A-00112475D960"},
873
+ {content: "t.boolean :${1:title}\nt.$0",
874
+ name: "t.boolean (tcb)",
875
+ scope:
876
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
877
+ tabTrigger: "t.",
878
+ uuid: "6BE6F315-E4BE-11DC-A11A-00112475D960"},
879
+ {content: "t.date :${1:title}\nt.$0",
880
+ name: "t.date (tcda)",
881
+ scope:
882
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
883
+ tabTrigger: "t.",
884
+ uuid: "61CF5B32-E4BE-11DC-A11A-00112475D960"},
885
+ {content: "t.datetime :${1:title}\nt.$0",
886
+ name: "t.datetime (tcdt)",
887
+ scope:
888
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
889
+ tabTrigger: "t.",
890
+ uuid: "3458B140-E4BE-11DC-A11A-00112475D960"},
891
+ {content:
892
+ "t.decimal :${1:title}${2:${3:, :precision => ${4:10}}${5:, :scale => ${6:2}}}\nt.$0",
893
+ name: "t.decimal (tcd)",
894
+ scope:
895
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
896
+ tabTrigger: "t.",
897
+ uuid: "26C09807-E4BE-11DC-A11A-00112475D960"},
898
+ {content: "t.float :${1:title}\nt.$0",
899
+ name: "t.float (tcf)",
900
+ scope:
901
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
902
+ tabTrigger: "t.",
903
+ uuid: "1BDC463A-E4BE-11DC-A11A-00112475D960"},
904
+ {content: "t.integer :${1:title}\nt.$0",
905
+ name: "t.integer (tci)",
906
+ scope:
907
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
908
+ tabTrigger: "t.",
909
+ uuid: "0E63B7D5-E4BE-11DC-A11A-00112475D960"},
910
+ {content: "t.integer :lock_version, :null => false, :default => 0\nt.$0",
911
+ name: "t.lock_version (tcl)",
912
+ scope:
913
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
914
+ tabTrigger: "t.",
915
+ uuid: "A677FFD4-E4BE-11DC-A11A-00112475D960"},
916
+ {content:
917
+ "t.references :${1:taggable}${2:, :polymorphic => ${3:{ :default => '${4:Photo}' \\}}}\nt.$0",
918
+ name: "t.references (tcr)",
919
+ scope:
920
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
921
+ tabTrigger: "t.",
922
+ uuid: "B6D9225C-E4BE-11DC-A11A-00112475D960"},
923
+ {content: "t.rename(:${1:old_column_name}, :${2:new_column_name})\nt.$0",
924
+ name: "t.rename (tre)",
925
+ scope:
926
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
927
+ tabTrigger: "t.",
928
+ uuid: "9D4E30E2-4A61-4941-B9F3-BEE97552747A"},
929
+ {content: "t.string :${1:title}\nt.$0",
930
+ name: "t.string (tcs)",
931
+ scope:
932
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
933
+ tabTrigger: "t.",
934
+ uuid: "B757F7E5-E4BD-11DC-A11A-00112475D960"},
935
+ {content: "t.text :${1:title}\nt.$0",
936
+ name: "t.text (tct)",
937
+ scope:
938
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
939
+ tabTrigger: "t.",
940
+ uuid: "FFE7B820-E4BD-11DC-A11A-00112475D960"},
941
+ {content: "t.time :${1:title}\nt.$0",
942
+ name: "t.time (tcti)",
943
+ scope:
944
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
945
+ tabTrigger: "t.",
946
+ uuid: "537BDD48-E4BE-11DC-A11A-00112475D960"},
947
+ {content: "t.timestamp :${1:title}\nt.$0",
948
+ name: "t.timestamp (tcts)",
949
+ scope:
950
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
951
+ tabTrigger: "t.",
952
+ uuid: "49643690-E4BE-11DC-A11A-00112475D960"},
953
+ {content: "t.timestamps\nt.$0",
954
+ name: "t.timestamps (tctss)",
955
+ scope:
956
+ "meta.rails.migration.create_table, meta.rails.migration.change_table",
957
+ tabTrigger: "t.",
958
+ uuid: "950B0BF2-E4BE-11DC-A11A-00112475D960"},
959
+ {content:
960
+ "validates_acceptance_of :${1:terms}${2:${3:, :accept => \"${4:1}\"}${5:, :message => \"${6:You must accept the terms of service}\"}}",
961
+ name: "validates_acceptance_of",
962
+ scope: "source.ruby.rails",
963
+ tabTrigger: "vao",
964
+ uuid: "89198999-7E6D-4D97-A20E-45263E1CA993"},
965
+ {content:
966
+ "validates_acceptance_of :${1:terms}${2:${3:, :accept => \"${4:1}\"}${5:, :message => \"${6:You must accept the terms of service}\"}}, :if => proc { |obj| ${7:obj.condition?} }}",
967
+ name: "validates_acceptance_of if",
968
+ scope: "source.ruby.rails",
969
+ tabTrigger: "vaoif",
970
+ uuid: "A2477223-AD5A-4723-8052-943CE9BA634D"},
971
+ {content: "validates_associated :${1:attribute}${2:, :on => :${3:create}}",
972
+ name: "validates_associated",
973
+ scope: "source.ruby.rails",
974
+ tabTrigger: "va",
975
+ uuid: "47944705-F605-4ED4-B4C0-9E823EE25138"},
976
+ {content:
977
+ "validates_associated :${1:attribute}${2:, :on => :${3:create}, :if => proc { |obj| ${5:obj.condition?} }}",
978
+ name: "validates_associated if",
979
+ scope: "source.ruby.rails",
980
+ tabTrigger: "vaif",
981
+ uuid: "85E9264C-5414-4FA0-AC07-F305A798ED46"},
982
+ {content:
983
+ "validates_confirmation_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:should match confirmation}\"}",
984
+ name: "validates_confirmation_of",
985
+ scope: "source.ruby.rails",
986
+ tabTrigger: "vc",
987
+ uuid: "B5893618-D07C-48F1-8867-736D0AAFF0E7"},
988
+ {content:
989
+ "validates_confirmation_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:should match confirmation}\", :if => proc { |obj| ${5:obj.condition?} }}",
990
+ name: "validates_confirmation_of if",
991
+ scope: "source.ruby.rails",
992
+ tabTrigger: "vcif",
993
+ uuid: "1354726C-DA64-4CA6-A099-26626A865D8D"},
994
+ {content:
995
+ "validates_exclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not allowed}\"}",
996
+ name: "validates_exclusion_of",
997
+ scope: "source.ruby.rails",
998
+ tabTrigger: "ve",
999
+ uuid: "4CC98A56-B60B-4A89-80E0-400C5314A050"},
1000
+ {content:
1001
+ "validates_exclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not allowed}\"}, :if => proc { |obj| ${7:obj.condition?} }}",
1002
+ name: "validates_exclusion_of if",
1003
+ scope: "source.ruby.rails",
1004
+ tabTrigger: "veif",
1005
+ uuid: "869AB0B7-12DD-440A-905A-BFB1E0E16E1C"},
1006
+ {content:
1007
+ "validates_format_of :${1:attribute}, :with => /${2:^[${3:\\w\\d}]+\\$}/${4:, :on => :${5:create}, :message => \"${6:is invalid}\"}",
1008
+ name: "validates_format_of",
1009
+ scope: "source.ruby.rails",
1010
+ tabTrigger: "vf",
1011
+ uuid: "EB47FBA1-AFB3-42F9-94A4-552D3175C17A"},
1012
+ {content:
1013
+ "validates_format_of :${1:attribute}, :with => /${2:^[${3:\\w\\d}]+\\$}/${4:, :on => :${5:create}, :message => \"${6:is invalid}\"}, :if => proc { |obj| ${7:obj.condition?} }}",
1014
+ name: "validates_format_of if",
1015
+ scope: "source.ruby.rails",
1016
+ tabTrigger: "vfif",
1017
+ uuid: "14BF0586-F2E8-4AB3-BB4B-E49099384403"},
1018
+ {content:
1019
+ "validates_inclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not included in the list}\"}",
1020
+ name: "validates_inclusion_of",
1021
+ scope: "source.ruby.rails",
1022
+ tabTrigger: "vi",
1023
+ uuid: "4611F02E-E9BF-11DC-8518-00112475D960"},
1024
+ {content:
1025
+ "validates_inclusion_of :${1:attribute}${2:, :in => ${3:%w( ${4:mov avi} )}, :on => :${5:create}, :message => \"${6:extension %s is not included in the list}\"}, :if => proc { |obj| ${7:obj.condition?} }}",
1026
+ name: "validates_inclusion_of if",
1027
+ scope: "source.ruby.rails",
1028
+ tabTrigger: "viif",
1029
+ uuid: "47FF50AF-E9BF-11DC-8518-00112475D960"},
1030
+ {content:
1031
+ "validates_length_of :${1:attribute}, :within => ${2:3..20}${3:, :on => :${4:create}, :message => \"${5:must be present}\"}",
1032
+ name: "validates_length_of",
1033
+ scope: "source.ruby.rails",
1034
+ tabTrigger: "vl",
1035
+ uuid: "5CE8838A-BF2C-497E-B87A-E90C3BC482E0"},
1036
+ {content:
1037
+ "validates_length_of :${1:attribute}, :within => ${2:3..20}${3:, :on => :${4:create}, :message => \"${5:must be present}\"}, :if => proc { |obj| ${6:obj.condition?} }}",
1038
+ name: "validates_length_of if",
1039
+ scope: "source.ruby.rails",
1040
+ tabTrigger: "vlif",
1041
+ uuid: "EC511A43-D3B7-11DC-BA49-00112475D960"},
1042
+ {content:
1043
+ "validates_numericality_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:is not a number}\"}",
1044
+ name: "validates_numericality_of",
1045
+ scope: "source.ruby.rails",
1046
+ tabTrigger: "vn",
1047
+ uuid: "B21BA16D-7C04-4912-8488-425CDCC332A8"},
1048
+ {content:
1049
+ "validates_numericality_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:is not a number}\"}, :if => proc { |obj| ${5:obj.condition?} }}",
1050
+ name: "validates_numericality_of if",
1051
+ scope: "source.ruby.rails",
1052
+ tabTrigger: "vnif",
1053
+ uuid: "CF506019-E964-4172-A3DA-475AE3B65558"},
1054
+ {content:
1055
+ "validates_presence_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:can't be blank}\"}",
1056
+ name: "validates_presence_of",
1057
+ scope: "source.ruby.rails",
1058
+ tabTrigger: "vp",
1059
+ uuid: "5DAC28A7-33C8-4DA7-9E85-56618D6BEC9F"},
1060
+ {content:
1061
+ "validates_presence_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:can't be blank}\"}, :if => proc { |obj| ${5:obj.condition?} }}",
1062
+ name: "validates_presence_of if",
1063
+ scope: "source.ruby.rails",
1064
+ tabTrigger: "vpif",
1065
+ uuid: "F5CBBE16-F5CC-4EDA-8BC6-30281BD7D854"},
1066
+ {content:
1067
+ "validates_uniqueness_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:must be unique}\"}",
1068
+ name: "validates_uniqueness_of",
1069
+ scope: "source.ruby.rails",
1070
+ tabTrigger: "vu",
1071
+ uuid: "F8316545-9AE4-4C7F-87ED-A2C00E6637FA"},
1072
+ {content:
1073
+ "validates_uniqueness_of :${1:attribute}${2:, :on => :${3:create}, :message => \"${4:must be unique}\", :if => proc { |obj| ${6:obj.condition?} }}",
1074
+ name: "validates_uniqueness_of if",
1075
+ scope: "source.ruby.rails",
1076
+ tabTrigger: "vuif",
1077
+ uuid: "43680344-0818-42BF-95B4-58CD2D76545B"},
1078
+ {bundlePath:
1079
+ "/Users/tobi/Library/Application Support/TextMate/Bundles/Custom.tmbundle",
1080
+ content:
1081
+ "verify :only => [:$1], :session => :user, :params => :id, :redirect_to => {:action => '${2:index}'}\n",
1082
+ name: "verify — redirect",
1083
+ scope: "source.ruby.rails",
1084
+ tabTrigger: "verify",
1085
+ uuid: "7BBD3F57-57A5-4CD0-8E79-B931021FC110"},
1086
+ {bundlePath:
1087
+ "/Users/tobi/Library/Application Support/TextMate/Bundles/Custom.tmbundle",
1088
+ content:
1089
+ "verify :only => [:$1], :method => :post, :render => {:status => 500, :text => \"use HTTP-POST\"}\n",
1090
+ name: "verify — render",
1091
+ scope: "source.ruby.rails",
1092
+ tabTrigger: "verify",
1093
+ uuid: "9ECBF20C-003E-41D9-A881-4BAC0656F9DC"},
1094
+ {content: "wants.${1:js|xml|html}${2: { $0 \\}}",
1095
+ name: "wants.format",
1096
+ scope: "meta.rails.controller",
1097
+ tabTrigger: "wants",
1098
+ uuid: "3F26FDB4-ACF9-4856-9312-6A4D78DC8564"},
1099
+ {content: "xhr :delete, :${1:destroy}, :id => ${2:1}$0",
1100
+ name: "xhr delete",
1101
+ scope: "source.ruby.rails",
1102
+ tabTrigger: "xdelete",
1103
+ uuid: "F1BE0C3D-7203-43E9-BEFB-D1A99CDD31C1"},
1104
+ {content: "xhr :get, :${1:show}${2:, :id => ${3:1}}$0",
1105
+ name: "xhr get",
1106
+ scope: "source.ruby.rails",
1107
+ tabTrigger: "xget",
1108
+ uuid: "78FCF992-D01B-404F-BC54-5EE7B91F999A"},
1109
+ {content: "xhr :post, :${1:create}, :${2:object} => { $3 }",
1110
+ name: "xhr post",
1111
+ scope: "source.ruby.rails",
1112
+ tabTrigger: "xpost",
1113
+ uuid: "62C3838B-0790-4FC2-8425-F273A57F5D33"},
1114
+ {content: "xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { $4 }$0",
1115
+ name: "xhr put",
1116
+ scope: "source.ruby.rails",
1117
+ tabTrigger: "xput",
1118
+ uuid: "C12C98A5-74E5-4E70-9ADB-8783455D6539"}]