atom_snippets.adoc 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. = Atom Snippets
  2. ```
  3. # Your snippets
  4. #
  5. # Atom snippets allow you to enter a simple prefix in the editor and hit tab to
  6. # expand the prefix into a larger code block with templated values.
  7. #
  8. # You can create a new snippet in this file by typing "snip" and then hitting
  9. # tab.
  10. #
  11. # An example CoffeeScript snippet to expand log to console.log:
  12. #
  13. # '.source.coffee':
  14. # 'Console log':
  15. # 'prefix': 'log'
  16. # 'body': 'console.log $1'
  17. #
  18. # Each scope (e.g. '.source.coffee' above) can only be declared once.
  19. #
  20. # This file uses CoffeeScript Object Notation (CSON).
  21. # If you are unfamiliar with CSON, you can read more about it in the
  22. # Atom Flight Manual:
  23. # http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
  24. '.source.asciidoc':
  25. 'Cross reference internal element, same page':
  26. 'prefix': 'xrefI'
  27. 'body': '<<${1:reference-a-section-in-the-same-page},${2:custom label text}>>'
  28. 'Cross reference internal element, same module':
  29. 'prefix': 'xrefIsm'
  30. 'body': '<<${1:target-page-filename}.adoc#${2:reference-section},${3:custom label text}>>'
  31. 'Cross reference internal element, named module':
  32. 'prefix': 'xrefInm'
  33. 'body': 'xref:${1:module-name}:${2:target-page-filename}.adoc#${3:reference-section}[${4:label text}]'
  34. 'Cross reference page, same module':
  35. 'prefix': 'xrefPsm'
  36. 'body': 'xref:${1:target-page-filename}.adoc[${2:link text}]'
  37. 'Cross reference page, named module':
  38. 'prefix': 'xrefPnm'
  39. 'body': 'xref:${1:module-name}:${2:target-page-filename}.adoc[${3:link text}]'
  40. 'Cross reference page, ROOT module':
  41. 'prefix': 'xrefPrm'
  42. 'body': 'xref:ROOT:${1:target-page-filename}.adoc[${2:link text}]'
  43. 'Admonition Block':
  44. 'prefix': 'admonB'
  45. 'body': """
  46. [${1:NOTE}${2:TIP}${3:IMPORTANT}${4:CAUTION}${5:WARNING}]
  47. ====
  48. $6
  49. ====
  50. $7
  51. """
  52. 'Admonition Block with Title':
  53. 'prefix': 'admonBwT'
  54. 'body': """
  55. [${1:NOTE}${2:TIP}${3:IMPORTANT}${4:CAUTION}${5:WARNING}]
  56. .${6:Optional Title}
  57. ====
  58. $7
  59. ====
  60. $8
  61. """
  62. 'Admonition Paragraph':
  63. 'prefix': 'admonP'
  64. 'body': """
  65. ${1:NOTE}${2:TIP}${3:IMPORTANT}${4:CAUTION}${5:WARNING}: $6
  66. """
  67. 'Admonition Paragraph with Title':
  68. 'prefix': 'admonPwT'
  69. 'body': """
  70. .${1:Optional Title}
  71. ${2:NOTE}${3:TIP}${4:IMPORTANT}${5:CAUTION}${6:WARNING}: $7
  72. """
  73. 'Include partial same module':
  74. 'prefix': 'part'
  75. 'body': 'include::partial$${1:partial-filename}.adoc[${3:line=}${4:tag=}${5:tags=}]'
  76. 'Include partial different module':
  77. 'prefix': 'partM'
  78. 'body': 'include::${1:module}:partial$${2:partial-filename}.adoc[${3:line=}${4:tag=}${5:tags=}]'
  79. 'Include partial ROOT':
  80. 'prefix': 'partR'
  81. 'body': 'include::ROOT:partial$${1:partial-filename}.adoc[${2:line=}${3:tag=}${4:tags=}]'
  82. 'Module inline image':
  83. 'prefix': 'imgM'
  84. 'body': 'image:${1:module}:${2:target-resource-filename.ext}[${3:}]'
  85. 'Module block image':
  86. 'prefix': 'imageM'
  87. 'body': 'image::${1:module}:${2:target-resource-filename.ext}[${3:}]'
  88. 'ROOT inline image':
  89. 'prefix': 'imgMR'
  90. 'body': 'image:ROOT:${1:target-resource-filename.ext}[${2:}]'
  91. 'ROOT block image':
  92. 'prefix': 'imageMR'
  93. 'body': 'image::ROOT:${1:target-resource-filename.ext}[${2:}]'
  94. ```