atom_editor.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Atom Editor for Wiki Editing :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs-wiki/3.8/atom_editor.html">
  8. <link rel="prev" href="emoji.html">
  9. <link rel="next" href="atom_snippets.html">
  10. <meta name="generator" content="Antora 3.0.1">
  11. <link rel="stylesheet" href="../../_/css/site.css">
  12. <meta property="og:image" content="https://wiki.jmonkeyengine.org/_/img/iconx128.png">
  13. <meta property="og:description" content="Atom Editor for Wiki Editing">
  14. <meta property="og:title" content="jMonkeyEngine Docs">
  15. <link rel="stylesheet" href="../../_/css/site-extra.css">
  16. <link rel="stylesheet" href="../../_/css/vendor/docsearch.min.css">
  17. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css -->
  18. <link rel="icon" href="../../_/img/favicon.ico" type="image/x-icon">
  19. </head>
  20. <body class="article">
  21. <header class="header">
  22. <nav class="navbar">
  23. <div class="navbar-brand">
  24. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
  25. <img alt="" src="../../_/img/jme-logo.png" height="32" type="image/x-icon">
  26. </a>
  27. <div class="navbar-item hide-for-print">
  28. <input id="search-input" type="text" placeholder="Search docs">
  29. </div>
  30. <button class="navbar-burger" data-target="topbar-nav">
  31. <span></span>
  32. <span></span>
  33. <span></span>
  34. </button>
  35. </div>
  36. <div id="topbar-nav" class="navbar-menu">
  37. <div class="navbar-end">
  38. <div class="navbar-item theme-switch-wrapper">
  39. <label class="theme-switch" for="checkbox">
  40. <input type="checkbox" id="checkbox" />
  41. <div class="slider round"></div>
  42. </label>
  43. </div>
  44. <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
  45. </div>
  46. </div>
  47. </nav>
  48. </header>
  49. <div class="body">
  50. <div class="nav-container" data-component="docs-wiki" data-version="3.8">
  51. <aside class="nav">
  52. <div class="panels">
  53. <div class="nav-panel-menu is-active" data-panel="menu">
  54. <nav class="nav-menu">
  55. <h3 class="title"><a href="wiki_contributor.html">Wiki Contribution</a></h3>
  56. <ul class="nav-list">
  57. <li class="nav-item" data-depth="0">
  58. <ul class="nav-list">
  59. <li class="nav-item" data-depth="1">
  60. <a class="nav-link" href="wiki_contributor.html">Contributor</a>
  61. </li>
  62. <li class="nav-item" data-depth="1">
  63. <a class="nav-link" href="wiki_admin.html">Admin</a>
  64. </li>
  65. <li class="nav-item" data-depth="1">
  66. <a class="nav-link" href="emoji.html">Emoji</a>
  67. </li>
  68. <li class="nav-item is-current-page" data-depth="1">
  69. <a class="nav-link" href="atom_editor.html">Atom Editor</a>
  70. </li>
  71. <li class="nav-item" data-depth="1">
  72. <a class="nav-link" href="atom_snippets.html">Atom Snippets</a>
  73. </li>
  74. </ul>
  75. </li>
  76. </ul>
  77. </nav>
  78. </div>
  79. <div class="nav-panel-explore" data-panel="explore">
  80. <div class="context">
  81. <span class="title">Wiki Contribution</span>
  82. <span class="version">3.8</span>
  83. </div>
  84. <ul class="components">
  85. <li class="component">
  86. <span class="title">JME</span>
  87. <ul class="versions">
  88. <li class="version">
  89. <a href="../../docs/3.8/documentation.html">3.8</a>
  90. </li>
  91. <li class="version">
  92. <a href="../../docs/3.4/documentation.html">3.4</a>
  93. </li>
  94. <li class="version">
  95. <a href="../../docs/3.3/documentation.html">3.3</a>
  96. </li>
  97. <li class="version">
  98. <a href="../../docs/3.2/documentation.html">3.2</a>
  99. </li>
  100. </ul>
  101. </li>
  102. <li class="component is-current">
  103. <span class="title">Wiki Contribution</span>
  104. <ul class="versions">
  105. <li class="version is-current">
  106. <a href="wiki_contributor.html">3.8</a>
  107. </li>
  108. </ul>
  109. </li>
  110. <li class="component">
  111. <span class="title">Wiki UI</span>
  112. <ul class="versions">
  113. <li class="version">
  114. <a href="../../wiki-ui/index.html">master</a>
  115. </li>
  116. </ul>
  117. </li>
  118. </ul>
  119. </div>
  120. </div>
  121. </aside>
  122. </div>
  123. <main class="article">
  124. <div class="toolbar" role="navigation">
  125. <button class="nav-toggle"></button>
  126. <nav class="breadcrumbs" aria-label="breadcrumbs">
  127. <ul>
  128. <li><a href="wiki_contributor.html">Wiki Contribution</a></li>
  129. <li><a href="atom_editor.html">Atom Editor</a></li>
  130. </ul>
  131. </nav>
  132. <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/docs-wiki/modules/ROOT/pages/atom_editor.adoc">Edit this Page</a></div>
  133. </div>
  134. <div class="content">
  135. <article class="doc">
  136. <h1 class="page">Atom Editor for Wiki Editing</h1>
  137. <div id="preamble">
  138. <div class="sectionbody">
  139. <div class="paragraph">
  140. <p>Contributing to the Wiki is now easier than it ever has been. Using the Atom editor will give you an easy to use interface that is cross-platform, has code completion, syntax highlighting, instant AsciiDoctor page previewing, with an integrated GitHub client. The only thing it doesn&#8217;t do is write the page for you. You can use it in conjunction with the <a href="https://git-scm.com/">Git</a> command line interface.</p>
  141. </div>
  142. </div>
  143. </div>
  144. <div class="sect1">
  145. <h2 id="definitions"><a class="anchor" href="#definitions"></a>Definitions</h2>
  146. <div class="sectionbody">
  147. <div class="ulist">
  148. <ul>
  149. <li>
  150. <p>(CLI) - Git Command Line Interface</p>
  151. </li>
  152. <li>
  153. <p>(GWI) - GitHub Web Interface</p>
  154. </li>
  155. </ul>
  156. </div>
  157. </div>
  158. </div>
  159. <div class="sect1">
  160. <h2 id="prerequisites"><a class="anchor" href="#prerequisites"></a>Prerequisites</h2>
  161. <div class="sectionbody">
  162. <div class="olist arabic">
  163. <ol class="arabic">
  164. <li>
  165. <p>Have a <a href="https://github.com/">GitHub account</a>.</p>
  166. </li>
  167. <li>
  168. <p>Are a Wiki project member.</p>
  169. </li>
  170. </ol>
  171. </div>
  172. <div class="paragraph">
  173. <p>If you are not a member, you fork the repository into your GitHub account and issue &#8220;pull&#8221; requests to the Wiki repository from there.</p>
  174. </div>
  175. <div class="paragraph">
  176. <p>To fork the Wiki repository into your GitHub Account:</p>
  177. </div>
  178. <div class="olist arabic">
  179. <ol class="arabic">
  180. <li>
  181. <p>Navigate to <a href="https://github.com/jMonkeyEngine/wiki">https://github.com/jMonkeyEngine/wiki</a>.</p>
  182. </li>
  183. <li>
  184. <p>In the menu at the top of the page, select the <span class="icon"><i class="fa fa-code-fork"></i></span><strong>Fork</strong> button.</p>
  185. </li>
  186. </ol>
  187. </div>
  188. </div>
  189. </div>
  190. <div class="sect1">
  191. <h2 id="downloading-the-sources"><a class="anchor" href="#downloading-the-sources"></a>Downloading the Sources</h2>
  192. <div class="sectionbody">
  193. <div class="olist arabic">
  194. <ol class="arabic">
  195. <li>
  196. <p>Install <a href="https://git-scm.com/">Git</a>.</p>
  197. </li>
  198. <li>
  199. <p>Download and install the Atom editor - <a href="https://atom.io/" class="bare">https://atom.io/</a></p>
  200. </li>
  201. <li>
  202. <p>After installation is complete, you can customize the editor by selecting the <code>Choose A Theme</code> panel followed by the <b class="button">Theme Picker</b> button.</p>
  203. </li>
  204. <li>
  205. <p>Once you are satisfied with the customization of the editor, you will need to add several packages to make Atom AsciiDoctor compatible. Package installation is painless.</p>
  206. <div class="olist loweralpha">
  207. <ol class="loweralpha" type="a">
  208. <li>
  209. <p>From the <code>Install A Package</code> panel, select the <b class="button">Open Installer</b> button, or select <code><span class="menuseq"><b class="menu">Packages</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Settings View</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Install Packages/Themes</b></span></code> from the file header.</p>
  210. </li>
  211. <li>
  212. <p>Enter &#8220;asciidoc&#8221; in the search box and press the <b class="button">Packages</b> button.</p>
  213. <div class="ulist">
  214. <div class="title">Add these packages:</div>
  215. <ul>
  216. <li>
  217. <p><strong>language-asciidoc</strong><br></p>
  218. </li>
  219. <li>
  220. <p><strong>asciidoc-preview</strong><br></p>
  221. </li>
  222. <li>
  223. <p><strong>autocomplete-asciidoc</strong></p>
  224. <div class="admonitionblock tip">
  225. <table>
  226. <tr>
  227. <td class="icon">
  228. <i class="fa icon-tip" title="Tip"></i>
  229. </td>
  230. <td class="content">
  231. You can add more GitHub controls to the editor by adding the package <code><strong>git-plus</strong></code>.
  232. </td>
  233. </tr>
  234. </table>
  235. </div>
  236. </li>
  237. </ul>
  238. </div>
  239. </li>
  240. </ol>
  241. </div>
  242. </li>
  243. </ol>
  244. </div>
  245. <div class="paragraph">
  246. <p>To edit the Wiki you will need to clone the wiki repository.</p>
  247. </div>
  248. <div class="olist arabic">
  249. <ol class="arabic">
  250. <li>
  251. <p>From the <code>Command Palette</code> (<kbd>ctrl</kbd>+<kbd>shift</kbd> +<kbd>P</kbd> or <code><span class="menuseq"><b class="menu">Packages</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Command Palette</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Toggle</b></span></code>), enter &#8220;git&#8221; into the search box.</p>
  252. </li>
  253. <li>
  254. <p>Select <b class="button">GitHub: Clone</b>.</p>
  255. <div class="openblock">
  256. <div class="content">
  257. <div class="paragraph">
  258. <div class="title">Members</div>
  259. <p>Paste the wiki the <abbr title="Uniform Resource Locator">URL</abbr> into the <code>Clone from</code> box.</p>
  260. </div>
  261. <div class="listingblock">
  262. <div class="content">
  263. <pre class="highlightjs highlight"><code class="language-none hljs">https://github.com/jMonkeyEngine/wiki</code></pre>
  264. </div>
  265. </div>
  266. <div class="paragraph">
  267. <div class="title">Non-Members</div>
  268. <p>Paste your forks <abbr title="Uniform Resource Locator">URL</abbr> into the <code>Clone from</code> box.</p>
  269. </div>
  270. </div>
  271. </div>
  272. <div class="paragraph">
  273. <p>The <code>To directory</code> will automatically update when you do.</p>
  274. </div>
  275. </li>
  276. <li>
  277. <p>When you&#8217;re ready, press the <b class="button">Clone</b> button.</p>
  278. <div class="paragraph">
  279. <p>The clone will take some time due to the size of the Wiki. Once cloned, a new <code>Project</code> tab will open on the left, and the <code>Git</code> and <code>GitHub Preview</code> tabs will open to the right. If they don&#8217;t, you can open the Git tab using <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>9</kbd> and the GitHub Preview tab using <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>8</kbd>. Alternatively, you can navigate the <code><span class="menuseq"><b class="menu">Packages</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">GitHub</b></span></code> menu. You will also notice in the lower right corner, on the <code>Status Bar</code>, you now have your GitHub control.</p>
  280. </div>
  281. </li>
  282. <li>
  283. <p>Before you can commit any changes to the Wiki, you must configure at least the user.email and user.name variables for Git. You can do this via Git Bash, or manually, by following one of these instructions.</p>
  284. <div class="ulist">
  285. <ul>
  286. <li>
  287. <p>Git Bash: <a href="https://help.github.com/articles/setting-your-commit-email-address-in-git/">Setting your commit email address in Git</a></p>
  288. </li>
  289. <li>
  290. <p>Manually: <a href="https://help.github.com/articles/setting-your-commit-email-address-on-github/">Set your commit email address on GitHub</a></p>
  291. <div class="olist loweralpha">
  292. <ol class="loweralpha" type="a">
  293. <li>
  294. <p>Open your <code>.gitconfig</code> file (located in USER_HOME) and add:</p>
  295. <div class="listingblock">
  296. <div class="content">
  297. <pre class="highlightjs highlight"><code class="language-none hljs">[user]
  298. name = yourname
  299. email = youremail</code></pre>
  300. </div>
  301. </div>
  302. </li>
  303. <li>
  304. <p>To maintain your privacy, setup your email settings in your GitHub account and use the <code>users.noreply.github.com</code> email address.</p>
  305. </li>
  306. </ol>
  307. </div>
  308. </li>
  309. </ul>
  310. </div>
  311. </li>
  312. <li>
  313. <p>Lastly, you will need to create a GitHub token. Follow the directions in the popup to enter the token.</p>
  314. </li>
  315. </ol>
  316. </div>
  317. </div>
  318. </div>
  319. <div class="sect1">
  320. <h2 id="source-structure"><a class="anchor" href="#source-structure"></a>Source Structure</h2>
  321. <div class="sectionbody">
  322. <div class="paragraph">
  323. <p>All documents live in the <code>docs/modules</code> directory. Each <a href="https://docs.antora.org/antora/2.3/named-module-directory/">named</a> and <a href="https://docs.antora.org/antora/2.3/root-module-directory/">ROOT</a> module contain a defined <a href="https://docs.antora.org/antora/2.3/family-directories/">family</a> set of directories that hold all content. Select an appropriate module and family directory to store your new page, image, partial, example or attachement.</p>
  324. </div>
  325. <div class="paragraph">
  326. <p>When you edit a Wiki page, the Git tab will show any unstaged changes. When you&#8217;re done making changes, you stage any or all changes, write your commit message, commit, and then push the changes.</p>
  327. </div>
  328. <div class="paragraph">
  329. <p>You can preview your documents by selecting the document and using the keyboard shortcut <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>A</kbd> or by using the File header menu <span class="menuseq"><b class="menu">Packages</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">AsciiDoc Preview</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Toggle Preview</b></span>.</p>
  330. </div>
  331. </div>
  332. </div>
  333. <div class="sect1">
  334. <h2 id="updating-local-wiki-copies"><a class="anchor" href="#updating-local-wiki-copies"></a>Updating Local Wiki Copies</h2>
  335. <div class="sectionbody">
  336. <div class="paragraph">
  337. <p>It&#8217;s a good idea to update your local copy of the Wiki prior to committing any changes.</p>
  338. </div>
  339. <div class="paragraph">
  340. <div class="title">Members</div>
  341. <p>Update your local copy of the Wiki from the Atom Editor or (CLI) by issuing a <code>pull</code> command prior to Commit/Push.</p>
  342. </div>
  343. <div class="paragraph">
  344. <div class="title">Non-Members</div>
  345. <p>Update your local copy of the Wiki by:</p>
  346. </div>
  347. <div class="olist arabic">
  348. <ol class="arabic">
  349. <li>
  350. <p>Issuing a <code>pull</code> request from your forked repository using the (GWI).</p>
  351. <div class="olist loweralpha">
  352. <ol class="loweralpha" type="a">
  353. <li>
  354. <p>Go to your version of the repository on GitHub.</p>
  355. </li>
  356. <li>
  357. <p>Click the <b class="button">New Pull Request</b> button at the top.</p>
  358. <div class="admonitionblock note">
  359. <table>
  360. <tr>
  361. <td class="icon">
  362. <i class="fa icon-note" title="Note"></i>
  363. </td>
  364. <td class="content">
  365. The Wiki repository will be on the left and your repository will be on the right.
  366. </td>
  367. </tr>
  368. </table>
  369. </div>
  370. </li>
  371. <li>
  372. <p>Click the <b class="button">Base</b> button on the left and from the drop down list select your forked repository.</p>
  373. </li>
  374. <li>
  375. <p>Click the &#8220;compare across forks&#8221; link.</p>
  376. </li>
  377. <li>
  378. <p>Click the <b class="button">Head Fork</b> button and from the drop down list select the Wiki repository.</p>
  379. </li>
  380. <li>
  381. <p>If the repositories are not identical, there will be green button <b class="button">Create pull request</b>. Click it to update your repository.</p>
  382. </li>
  383. </ol>
  384. </div>
  385. </li>
  386. <li>
  387. <p>Update your local copy by doing a <code>pull</code> request in the Atom Editor or (CLI).</p>
  388. </li>
  389. </ol>
  390. </div>
  391. <div class="admonitionblock important">
  392. <table>
  393. <tr>
  394. <td class="icon">
  395. <i class="fa icon-important" title="Important"></i>
  396. </td>
  397. <td class="content">
  398. As a non-member, when there is interaction between the Wiki repository and your fork, you issue commands online. When the interaction is between your forked repository and your local copy, you issue commands from Atom or the (CLI).
  399. </td>
  400. </tr>
  401. </table>
  402. </div>
  403. </div>
  404. </div>
  405. <div class="sect1">
  406. <h2 id="pushing-changes"><a class="anchor" href="#pushing-changes"></a>Pushing Changes</h2>
  407. <div class="sectionbody">
  408. <div class="paragraph">
  409. <div class="title">Members</div>
  410. <p>As a member, issue a <code>push</code> command from the Atom Editor or (CLI).</p>
  411. </div>
  412. <div class="paragraph">
  413. <div class="title">Non-Members</div>
  414. <p>To submit changes to the Wiki repository, after pushing them to your fork, from the (GWI):</p>
  415. </div>
  416. <div class="olist arabic">
  417. <ol class="arabic">
  418. <li>
  419. <p>Go to your version of the Wiki repository on GitHub.</p>
  420. <div class="olist loweralpha">
  421. <ol class="loweralpha" type="a">
  422. <li>
  423. <p>Click the <b class="button">New Pull Request</b> button at the top.</p>
  424. <div class="olist lowerroman">
  425. <ol class="lowerroman" type="i">
  426. <li>
  427. <p>Note that the jMonkeyEngine repository will be on the left and your repository will be on the right.</p>
  428. </li>
  429. </ol>
  430. </div>
  431. </li>
  432. <li>
  433. <p>Click the green button <b class="button">Create pull request</b>. Give a succinct and informative title, in the comment field give a short explanation of the changes and click the green button <b class="button">Create pull request</b> again.</p>
  434. </li>
  435. </ol>
  436. </div>
  437. </li>
  438. </ol>
  439. </div>
  440. <div class="admonitionblock important">
  441. <table>
  442. <tr>
  443. <td class="icon">
  444. <i class="fa icon-important" title="Important"></i>
  445. </td>
  446. <td class="content">
  447. As a non-member, when there is interaction between the Wiki repository and your fork, you issue commands online. When the interaction is between your forked repository and your local copy, you issue commands from Atom or the (CLI).
  448. </td>
  449. </tr>
  450. </table>
  451. </div>
  452. </div>
  453. </div>
  454. <div class="sect1">
  455. <h2 id="creating-pages"><a class="anchor" href="#creating-pages"></a>Creating pages</h2>
  456. <div class="sectionbody">
  457. <div class="paragraph">
  458. <p>You create <a href="https://docs.antora.org/antora/2.3/page/standard-page/">pages</a> by saving a file with the <code>.adoc</code> extension. The first line of a page must contain a title.</p>
  459. </div>
  460. <div class="listingblock">
  461. <div class="content">
  462. <pre class="highlightjs highlight"><code class="language-none hljs">= My Title Goes here</code></pre>
  463. </div>
  464. </div>
  465. <div class="paragraph">
  466. <p>Everything after the title line, up to the first empty new line, is called the <code>header</code> of the document. This is where you set optional <a href="https://docs.antora.org/antora/2.3/page/attributes/">attributes</a> for your documents.</p>
  467. </div>
  468. <div class="paragraph">
  469. <p>The Antora manual has a very quick to read <a href="https://docs.antora.org/antora/2.3/asciidoc/asciidoc/">Primer</a> that will get you up to speed on writing pages fast.</p>
  470. </div>
  471. <div class="paragraph">
  472. <p>Documents rely heavily on using <code>References</code> to link to other content in the same or different modules. This is a critical part of writing your documents. Knowing how to link to other content. There are two types of &#8220;references&#8221;, <a href="https://docs.antora.org/antora/2.3/page/page-id/">Cross References</a> and <a href="https://docs.antora.org/antora/2.3/asciidoc/in-page-xref/">Internal Cross Reference</a>. A <code>Cross References</code> links to a <a href="https://docs.antora.org/antora/2.3/page/module-and-page-xrefs/"><strong>page</strong></a> in the same or different module, an <code>Internal Cross Reference</code> links to <strong>elements</strong> inside a document located either in the same page, same module or a different module.</p>
  473. </div>
  474. <div class="paragraph">
  475. <p>The snippets page contains various forms these <code>Cross References</code> that make linking easier.</p>
  476. </div>
  477. <div class="paragraph">
  478. <p>See also:</p>
  479. </div>
  480. <div class="ulist">
  481. <ul>
  482. <li>
  483. <p><a href="https://asciidoctor.org/docs/user-manual/">Asciidoctor User Manual</a></p>
  484. </li>
  485. <li>
  486. <p><a href="emoji.html#how-to-use-emoji-in-the-wiki" class="xref page">How to use emoji in the wiki</a></p>
  487. </li>
  488. </ul>
  489. </div>
  490. </div>
  491. </div>
  492. <div class="sect1">
  493. <h2 id="atom-snippets"><a class="anchor" href="#atom-snippets"></a>Atom Snippets</h2>
  494. <div class="sectionbody">
  495. <div class="quoteblock">
  496. <blockquote>
  497. Snippets are an incredibly powerful way to quickly generate commonly needed code syntax from a shortcut.
  498. </blockquote>
  499. <div class="attribution">
  500. &#8212; Atom Flight Manual: Snippets
  501. </div>
  502. </div>
  503. <div class="paragraph">
  504. <p>One advantage of using Atom as an editor for the Wiki comes from the use of <a href="http://flight-manual.atom.io/using-atom/sections/snippets/">Snippets</a>. You can see a list of available snippets for your document by using the <code>Command Palette</code> (<kbd>ctrl</kbd>+<kbd>shift</kbd> +<kbd>P</kbd> or <code><span class="menuseq"><b class="menu">Packages</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="submenu">Command Palette</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Toggle</b></span></code>). Enter &#8220;snippets&#8221; into the search box and select <b class="button">Snippets: Available</b>.</p>
  505. </div>
  506. <div class="paragraph">
  507. <p>The Atom AsciiDoc packages add great functionality to the editor, but they do not cover everything that&#8217;s possible when using AsciiDoctor syntax. You can customize the editor even further by adding your own snippets. I will get you started with your first snippet. Simply copy and paste the code below into your &#8220;snippets.cson&#8221; file and save. You can locate the file under <span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Snippets</b></span>.</p>
  508. </div>
  509. <div class="listingblock">
  510. <div class="content">
  511. <pre class="highlightjs highlight"><code class="language-none hljs">'.source.asciidoc':
  512. 'Cross reference internal element, same page':
  513. 'prefix': 'xrefI'
  514. 'body': '&lt;&lt;${1:reference-a-section-in-the-same-page},${2:custom label text}&gt;&gt;'</code></pre>
  515. </div>
  516. </div>
  517. <div class="paragraph">
  518. <p>Thereafter, just start typing <code>xrefI</code> and select it from the popup menu or hit <kbd>Tab</kbd> with it highlighted in the menu, to insert an <code>Internal Cross Reference</code> link. You can then use the <kbd>Tab</kbd> key to cycle through each tab stop and enter the appropriate data for that link.</p>
  519. </div>
  520. <div class="admonitionblock tip">
  521. <table>
  522. <tr>
  523. <td class="icon">
  524. <i class="fa icon-tip" title="Tip"></i>
  525. </td>
  526. <td class="content">
  527. A <kbd>Tab</kbd> key in the above code is set by wraping any text to be tabbed with the <code>${1:}</code> syntax, where the integer represents the tab order. When cycling through tabs, you can backspace them to remove multiple choice tab content or just enter the text for single selection content.
  528. </td>
  529. </tr>
  530. </table>
  531. </div>
  532. <div class="paragraph">
  533. <p>You can help the jMonkey community by adding new snippets. Use your editor and edit the <a href="atom_snippets.html" class="xref page">Atom Snippets</a> document. Make sure to announce any proposed changes on the <a href="https://hub.jmonkeyengine.org/">jMonkeyEngine Forum</a> under the topic &#8220;Documentation&#8221; first so others are aware and can test out your proposed change.</p>
  534. </div>
  535. <hr>
  536. <div class="paragraph">
  537. <p>Next steps,</p>
  538. </div>
  539. <div class="ulist">
  540. <ul>
  541. <li>
  542. <p>Read the Wiki <a href="https://github.com/jMonkeyEngine/wiki">README</a> page.</p>
  543. </li>
  544. <li>
  545. <p>Add <a href="https://asciidoctor.org/docs/user-manual/">Asciidoctor User Manual</a> to your favorites.</p>
  546. </li>
  547. <li>
  548. <p>Add <a href="https://docs.antora.org">Antora Docs</a> to your favorites.</p>
  549. </li>
  550. <li>
  551. <p>Add the <a href="https://atom.io/docs">Atom Docs</a> to your favorites.</p>
  552. </li>
  553. <li>
  554. <p>Add the <a href="http://flight-manual.atom.io/">Atom Flight Manual</a> to your favorites.</p>
  555. </li>
  556. <li>
  557. <p>Add the <a href="http://rogerdudler.github.io/git-guide/">git - the simple guide</a> to your favorites.</p>
  558. </li>
  559. <li>
  560. <p>Start contributing.</p>
  561. </li>
  562. </ul>
  563. </div>
  564. </div>
  565. </div>
  566. <nav class="pagination">
  567. <span class="prev"><a href="emoji.html">Emoji</a></span>
  568. <span class="next"><a href="atom_snippets.html">Atom Snippets</a></span>
  569. </nav>
  570. </article>
  571. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  572. <div class="toc-menu"></div>
  573. </aside>
  574. </div>
  575. </main>
  576. </div>
  577. <footer class="footer">
  578. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  579. </footer>
  580. <script src="../../_/js/vendor/docsearch.min.js"></script>
  581. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js -->
  582. <script>
  583. var search = docsearch({
  584. apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
  585. indexName: 'jmonkeyengine',
  586. inputSelector: '#search-input',
  587. autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] },
  588. algoliaOptions: { hitsPerPage: 10 }
  589. }).autocomplete
  590. search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
  591. function focusSearchInput () { document.querySelector('#search-input').focus() }
  592. if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
  593. </script>
  594. <script src="../../_/js/site.js"></script>
  595. <script async src="../../_/js/vendor/highlight.js"></script>
  596. </body>
  597. </html>