| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="Asciidoctor 1.5.4"><meta name="author" content="mitm"><title>Atom Editor for Wiki Editing</title><link rel="stylesheet" href="./asciidoctor.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="./coderay-asciidoctor.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"></head><body class="article toc2 toc-left"><div id="header"><div id="toolbar"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc/wiki/atom_editor.adoc"><i class="fa fa-pencil-square" aria-hidden="true"></i></a><a href="https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc/wiki/"><i class="fa fa-plus-square" aria-hidden="true"></i></a><input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search"><i class="fa fa-navicon" aria-hidden="true"></i></div><h1>Atom Editor for Wiki Editing</h1><div class="details"><span class="author" id="author">mitm</span><br><span id="revnumber">version ,</span> <span id="revdate">2017-09-08T23:24:11.262Z</span></div><div id="toc" class="toc2"><div id="toctitle">Table of Contents</div><ul class="sectlevel1"><li><a href="#atom-editor-setup">Atom Editor Setup</a></li><li><a href="#wiki-template">Wiki Template</a></li><li><a href="#atom-snippets">Atom Snippets</a></li></ul></div></div><div id="content"><div id="preamble"><div class="sectionbody"><div class="paragraph"><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’t do is write the page for you.</p></div></div></div>
- <div class="sect1"><h2 id="atom-editor-setup">Atom Editor Setup</h2><div class="sectionbody"><div class="olist arabic"><ol class="arabic"><li><p>Download and install the Atom editor - <a class="bare" href="https://atom.io/">https://atom.io/</a></p></li><li><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></li><li><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><div class="ulist"><ul><li><p>From the <code>Install A Package</code> panel, select the <b class="button">Open Installer</b> button, or select <code><span class="menuseq"><span class="menu">Packages</span> ▸ <span class="submenu">Settings View</span> ▸ <span class="menuitem">Install Packages/Themes</span></span></code> from the file header.</p></li><li><p>Enter “asciidoc” in the search box and press the <b class="button">Packages</b> button.</p></li><li><p>Add these packages:</p><div class="paragraph"><p><strong>language-asciidoc</strong><br>
- <strong>asciidoc-preview</strong><br>
- <strong>autocomplete-asciidoc</strong> <br></p></div></li></ul></div></li><li><p>To edit the Wiki you will need to clone the wiki repository.</p><div class="ulist"><ul><li><p>From the <code>Command Palette</code> (<kbd>ctrl</kbd>+<kbd>shift</kbd> +<kbd>P</kbd> or <code><span class="menuseq"><span class="menu">Packages</span> ▸ <span class="submenu">Command Palette</span> ▸ <span class="menuitem">Toggle</span></span></code>), enter “git” into the search box.</p></li><li><p>Select <b class="button">GitHub: Clone</b>.</p></li><li><p>Paste <code>https://github.com/jMonkeyEngine/wiki</code> into the <code>Clone from</code> box. The <code>To directory</code> will automatically update when you do.</p></li><li><p>When you’re ready, press the <b class="button">Clone</b> button.</p><div class="paragraph"><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’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"><span class="menu">Packages</span> ▸ <span class="menuitem">GitHub</span></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></div></li></ul></div></li></ol></div>
- <div class="paragraph"><p>All Wiki documents live in the <code>asciidoc</code> folder, images in the <code>images</code> folder, and resources for your documents in the <code>resources</code> folder. Select an appropriate folder under each to store your new document, image or resource.</p></div>
- <div class="paragraph"><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 these instructions.</p></div>
- <div class="ulist"><ul><li><p><a href="https://help.github.com/articles/setting-your-commit-email-address-in-git/">Setting your commit email address in Git</a></p></li><li><p>Manually - Open your <code>.gitconfig</code> file and add,</p><div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>[user]
- name = yourname
- email = youremail</code></pre></div></div>
- <div class="paragraph"><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></div></li></ul></div>
- <div class="paragraph"><p>Lastly, you will need to create a GitHub token. Follow the directions in the popup to enter the token.</p></div>
- <div class="paragraph"><p>When you edit a Wiki page, the Git tab will show any unstaged changes. When you’re done making changes, you stage any or all changes, write your commit message, commit, and then push the changes.</p></div>
- <div class="paragraph"><p>You can add more GitHub controls to the editor by adding the package <code><strong>git-plus</strong></code>.</p></div>
- <div class="paragraph"><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"><span class="menu">Packages</span> ▸ <span class="submenu">AsciiDoc Preview</span> ▸ <span class="menuitem">Toggle Preview</span></span>.</p></div></div></div>
- <div class="sect1"><h2 id="wiki-template">Wiki Template</h2><div class="sectionbody"><div class="paragraph"><p>To make things even easier, you can create your own Wiki template for page creation. You must first have the <code><strong>file-templates</strong></code> package installed. You can find this package by selecting <code><span class="menuseq"><span class="menu">File</span> ▸ <span class="submenu">Settings</span> ▸ <span class="menuitem">Install</span></span></code> and typing “template” into the search box.</p></div>
- <div class="ulist"><ul><li><p>Once installed, from the <code>Command Palette</code> (<kbd>ctrl</kbd>+<kbd>shift</kbd> +<kbd>P</kbd> or <code><span class="menuseq"><span class="menu">Packages</span> ▸ <span class="submenu">Command Palette</span> ▸ <span class="menuitem">Toggle</span></span></code>) enter “file” into the search box.</p></li><li><p>Select <b class="button">File Templates: New Template</b>.</p></li><li><p>For <code>Template Name</code>, use <code>Jme3 Wiki Template</code>, and when ready select <b class="button">Create</b>.</p></li><li><p>From the <code>Command Palette</code>, enter “file” and select <b class="button">File Templates: Update Template</b>.</p></li><li><p>If this is the first template it will open automatically. If not, then select the <code>Jme3 Wiki Template</code> you just created and press the <b class="button">Edit Template</b> button.</p></li><li><p>Copy and paste the text below into the head of the document.</p><div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>= Enter Document Title Here
- :author: @author@
- :revnumber:
- :revdate: @timestamp@
- :relfileprefix: Enter path to asciidoc folder ../../
- :imagesdir: Enter path to images folder ../..
- :experimental:
- ifdef::env-github,env-browser[:outfilesuffix: .adoc]</code></pre></div></div></li><li><p>When done, close the document and when it asks you if you want to save it select <b class="button">Yes</b> .</p></li></ul></div>
- <div class="paragraph"><p>You can now use your template when creating new Wiki documents by opening the <code>Command Palette</code>, entering “file” into the search box, and selecting <b class="button">File Templates: New File</b>.</p></div>
- <div class="admonitionblock tip"><table><tr><td class="icon"><i class="fa icon-tip" title="Tip"></i></td><td class="content"><div class="paragraph"><p>To edit the template, from the <code>Command Palette</code> (<kbd>ctrl</kbd>+<kbd>shift</kbd> +<kbd>P</kbd>) type “file” into the search box and select:<br>
- <code>File Templates: Update Template → Jme3 Wiki Page → Edit Template</code></p></div>
- <div class="paragraph"><p>Save the edit when finished.</p></div></td></tr></table></div>
- <div class="paragraph"><p>See also:</p></div>
- <div class="paragraph"><p><a href="../wiki/wiki_header.html">Anatomy of a Wiki Header</a></p></div></div></div>
- <div class="sect1"><h2 id="atom-snippets">Atom Snippets</h2><div class="sectionbody"><div class="quoteblock"><blockquote>Snippets are an incredibly powerful way to quickly generate commonly needed code syntax from a shortcut.</blockquote><div class="attribution">— Atom Flight Manual: Snippets</div></div>
- <div class="paragraph"><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"><span class="menu">Packages</span> ▸ <span class="submenu">Command Palette</span> ▸ <span class="menuitem">Toggle</span></span></code>). Enter “snippets” into the search box and select <b class="button">Snippets: Available</b>.</p></div>
- <div class="paragraph"><p>The Atom AsciiDoc packages add great functionality to the editor, but they do not cover everything that’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 “snippets.cson” file and save. You can locate the file under <span class="menuseq"><span class="menu">File</span> ▸ <span class="menuitem">Snippets</span></span>.</p></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>'.source.asciidoc':
- 'Inter-Doc Cross Reference':
- 'prefix': 'xref'
- 'body': '<<${1:path/to/wiki/page}#,${2:custom label text}>>'</code></pre></div></div>
- <div class="paragraph"><p>Thereafter just type <kbd>xref</kbd> and hit <kbd>Tab</kbd> to insert an Inter-Document Cross Reference link. You can then use the <kbd>Tab</kbd> key to cycle through each tab stop when your ready.</p></div>
- <div class="paragraph"><p>You can help the jMonkey community by adding new snippets. Use your editor and edit the <a href="../wiki/atom_snippets.html">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 “Documentation” first so others are aware and can test out your proposed change.</p></div>
- <hr>
- <div class="paragraph"><p>Next steps,</p></div>
- <div class="ulist"><ul><li><p>Read the Wiki <a href="https://github.com/jMonkeyEngine/wiki">README</a> page.</p></li><li><p>Add <a href="http://asciidoctor.org/docs/user-manual/#introduction-to-asciidoctor">Introduction to Asciidoctor</a> to your favorites, you will refer to it often.</p></li><li><p>Add the <a href="https://atom.io/docs">Atom Docs</a> to your favorites.</p></li><li><p>Add the <a href="http://flight-manual.atom.io/">Atom Flight Manual</a> to your favorites.</p></li><li><p>Add the <a href="http://rogerdudler.github.io/git-guide/">git - the simple guide</a> to your favorites.</p></li><li><p>Start contributing.</p></li></ul></div></div></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2017-10-09 23:30:27 +00:00</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
- apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
- indexName: 'jmonkeyengine',
- inputSelector: '#doc-search',
- debug: false // Set debug to true if you want to inspect the dropdown
- });</script></body></html>
|