AsciiDoc Package for Sublime Text2
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
.gitignore
Anchor.sublime-snippet
AsciiDoc.tmLanguage
Bold.sublime-snippet
Comment Block.sublime-snippet
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap
Default (Windows).sublime-keymap
Example Block.sublime-snippet
Heading 0 (one-liner).sublime-snippet
Heading 0.sublime-snippet
Heading 1 (one-liner).sublime-snippet
Heading 1.sublime-snippet
Heading 2 (one-liner).sublime-snippet
Heading 2.sublime-snippet
Heading 3 (one-liner).sublime-snippet
Heading 3.sublime-snippet
Heading 4 (one-liner).sublime-snippet
Heading 4.sublime-snippet
Italic.sublime-snippet
LICENSE
Listing Block.sublime-snippet
Literal Block.sublime-snippet
Passthrough Block.sublime-snippet
Quote Block.sublime-snippet
Quoted.sublime-snippet
ReadMe.asciidoc
ReadMe.md
Sidebar Block.sublime-snippet
Subscript.sublime-snippet
Superscript.sublime-snippet
Table.sublime-snippet

ReadMe.asciidoc

AsciiDoc Package for Sublime Text 2

This is an AsciiDoc package for Sublime Text 2 editor.

It adds syntax highlighting and snippets for AsciiDoc language to Sublime Text 2 editor.

My work is based on the Christian Zuckschwerdt’s AsciiDoc TextMate bundle.

Sublime Text 2 is compatible with Textmate editor for OS X snippets, preferences and languages file. However, even though it can recognize the Textmate snippets, some features such as tab completion, shortcut commands do not work out of the box.

My work is to overcome these limitations.

All the files provided here are tested in Windows 7 and OS X Lion.

Installation

To install the package, follow these steps:

  • Download the zip containing src files.

  • Extract the files to AsciiDoc folder (create this folder if not present already) under:

    • Windows: %APPDATA%\Sublime Text 2\Packages\

    • OS X: ~/Library/Application Support/Sublime Text 2/Packages

    • Linux: ~/.config/sublime-text-2

    • Portable Installation: Sublime Text 2/Data

  • Close all instances of Sublime Text 2 editor and relaunch the editor.

If successful, you should see AsciiDoc entry under View > Syntax and under Tools > Snippets.

Note: Snippets may take few seconds to load under Windows.

Usage

  • Create a new file, save it as <filename>.asc or change the syntax to AsciiDoc

  • Start typing AsciiDoc!

Tip

Syntax highlighting works best with Sunburst or Twilight theme. For other themes, you may have to customize them.

Snippets

Snippets can be inserted anywhere by using the menu command Tools > Snippets > AsciiDoc or by typing two initial characters and hitting tab to complete. Few tab completion examples are:

  • Comments (type // TAB)

  • Headings (type h1 TAB to h4 TAB for one-liner versions)

  • Table generation (type |= TAB)

  • Tab expansion for blocks (type == TAB)

  • Sidebar block (type ** TAB)

Keyboard Shortcuts

Keyboard shortcuts let you do some quick formatting such setting the text to bold or italics. Some examples are:

  • Bold (type ctrl+b)

  • Italics (type ctrl+i)

  • Code (type ctrl+shift+c)

  • Double Quotes (type ctrl+shift+')

For a complete list, see Keyboard shortcuts.

Planned Enhancements

Following are planned enhancements for the package:

  • Adding Build system to preview as HTML or PDF.

  • Anything else you wanna see! Just add it to the issues list.

Author & Credits

Created by Hrusikesh Panda.

Copy left or right, as you wish.

Credit goes to Christian Zuckschwerdt for his original work on AsciiDoc TextMate bundle.