Giter Club home page Giter Club logo

asciidoc's Introduction

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/Packages
    • 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.

asciidoc's People

Contributors

fichtefoll avatar gamussa avatar mrchief avatar neontapir avatar nickboldt avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.