Skip to content

bsmith-n4/asciispec-sublime

 
 

Repository files navigation

AsciiSpec Package for SublimeText 3

Build Status

This package provides more complete and up-to-date syntax highlighting, snippets and other goodies for AsciiDoc editing in SublimeText 3.

Snippets

Name Trigger

Button

btn Tab

Comment Block

// Tab

Definition Block

def Tab

Document Title

h0 Tab

Example Block

== Tab

Footnote Reference

fnr Tab

Footnote

fn Tab

Image

img Tab

Keyboard Shortcut

kbd Tab

Listing Block

 — Tab

Math Block

math Tab

Passthrough Block

++ Tab

Quote Block

__ Tab

Requirement Block

req Tab

Section Title 1–5

h1 Tab, …, h5 Tab

Sidebar block

** Tab

Table

|= Tab

TODO

td Tab

Keymaps

  • Asterisks (strong), underscores (emphasis), backticks (monospaced), English quotation marks, and Czech quotation marks are autopaired and will wrap selected text.

    • If you start an empty pair and hit backspace, both elements are deleted.

    • If you start an empty asterisks pair and hit Space or Tab, the right element is deleted (because you probably wanted to start a list, not a strong text).

  • At the end of a (un)ordered list item, pressing Enter will automatically insert the new list item “bullet.”

    • Pressing Enter on the blank list item will remove it.

    • Pressing Tab on the blank list item, or selected item(s), will increase nesting level and indent it.

    • Pressing Shift Tab on the blank list item, or selected item(s), will decrease nesting level and unindent it.

    • You can disable indentation of list items in your settings file.

  • At the end of a callouts list item, pressing Enter will automatically insert the new list item with incremented number.

    • Pressing Enter on the blank list item will remove it.

Others

  • Displays document and section titles in the local symbol list (Ctrl R / Cmd R) and the global symbol list (Ctrl Shift R / Cmd Shift R).

    • In the local symbol list, titles are nicely indented.

    • In the global symbol list, titles will start with =, so you will know they belong to AsciiDoc files at a glance. Also they will be on top of the list because of the presedence of =.

  • Defines comment markers so you can use default commands to comment and uncomment lines of text.

  • Provides completions for attributes (built-in and locally defined) and cross references (local anchors and titles).

Installation with Package Control

Prerequisite: Package Control

Installing via Package Control will keep this package up-to-date automatically.

Once Package Control is installed, restart Sublime Text.

  1. Open the Command Palette (Ctrl+Shift+P on Windows and Linux. ++P on OS X).

  2. Type "Add" and select "Add Repository".

  3. Paste the repository URL https://github.com/bsmith-n4/asciispec-sublime into the form at the bottom of the window.

  4. Open the Command Palette, type "Install" and select "Package Control: Install Package".

  5. Type "asciispec" and select "asciispec-sublime" from list.

  6. A restart of Sublime Text may be necessary to initialize the plugin.

Manual Installation

Install this plugin manually from GitHub:

  1. Go to your Packages subdirectory under the ST3’s data directory:

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

    • Linux: ~/.config/sublime-text-3/Packages/

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

  2. Clone this repository here into subdirectory asciispec-sublimetext:

    git clone https://github.com/bsmith-n4/asciispec-sublime.git
  3. Restart SublimeText.

Acknowledgement

The syntax definition is based on AsciiDoc-TextMate-2.tmbundle by Matt Neuburg.

Most of the commands, keymaps and some text in this readme are based on (or inspired by) MarkdownEditing package.

Contributing

  1. Fork it

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am 'Add some feature')

  4. Push to the branch (git push origin my-new-feature)

  5. Create new Pull Request

License

This project is licensed under MIT License.
For the full text of the license, see the [LICENSE](LICENSE) file.

About

AsciiSpec Package for SublimeText 3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 92.3%
  • Shell 7.7%