Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

AsciiDoc Package for Sublime Text2

branch: master

This branch is 0 commits ahead and 0 commits behind master

Merge pull request #1 from mauriciorcruz/patch-1

Correct mapping for OSX shortcuts
latest commit 5d3b40257d
Hrusikesh Panda mrchief authored
Octocat-spinner-32 Anchor.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 AsciiDoc.tmLanguage Fixing incorrect xml tag June 01, 2012
Octocat-spinner-32 Bold.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Comment Block.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Default (Linux).sublime-keymap Added more keyboard shortcuts, removed conflicting keyboard shortcut … June 01, 2012
Octocat-spinner-32 Default (OSX).sublime-keymap Correct mapping for OSX shortcuts June 04, 2013
Octocat-spinner-32 Default (Windows).sublime-keymap Added more keyboard shortcuts, removed conflicting keyboard shortcut … June 01, 2012
Octocat-spinner-32 Example Block.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Heading 0 (one-liner).sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Heading 0.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Heading 1 (one-liner).sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Heading 1.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Heading 2 (one-liner).sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Heading 2.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Heading 3 (one-liner).sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Heading 3.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Heading 4 (one-liner).sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Heading 4.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Italic.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Listing Block.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Literal Block.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Passthrough Block.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Quote Block.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Quoted.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 ReadMe.md Added more keyboard shortcuts, removed conflicting keyboard shortcut … June 01, 2012
Octocat-spinner-32 Sidebar Block.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Subscript.sublime-snippet Added language and snippets December 10, 2011
Octocat-spinner-32 Superscript.sublime-snippet Corrected tab trigger settings December 11, 2011
Octocat-spinner-32 Table.sublime-snippet Added language and snippets December 10, 2011
ReadMe.md

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
  • Start typing AsciiDoc!

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

Basic support for some handy shortcuts are now available:

  • Bold selection: Select some text and then press ctrl+b
  • _Italic_ize selection: Select some text and then press ctrl+i
  • Mark selection as Code literal: Select some text and then press ctrl+k, ctrl+k
  • Mark selection as filename: Select some text and then press ctrl+k, ctrl+f

Note: ctrl+b overrides the standard key binding of Tools > Build System. If this bothers you, you can edit the .sublime-keymap files (based on your OS) under Packages\AsciiDoc folder.

Time permitting, I'll add more shortcuts but meanwhile if you come upon something useful, feel free to submit a patch!

Enhancements

Following are planned enhancements for the package:

  • Add keyboard shortcuts for various commands such bold text, italics, blocks etc.
  • Adding Build system to preview as HTML or PDF.

Your suggestions are welcome.

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.

Something went wrong with that request. Please try again.