-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/SublimeText/AsciiDoc into…
… SublimeText-master Conflicts: Default (Linux).sublime-keymap Default (OSX).sublime-keymap Default (Windows).sublime-keymap ReadMe.md
- Loading branch information
Showing
4 changed files
with
147 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<<<<<<< HEAD | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mrchief
Author
Owner
|
||
[ | ||
{ "keys" : ["ctrl+b"], | ||
"command": "insert_snippet", | ||
|
@@ -63,4 +64,26 @@ | |
{ "key": "selector", "operator": "equal", "operand": "text.html.asciidoc" } | ||
] | ||
} | ||
] | ||
] | ||
======= | ||
[ | ||
{ "keys": ["ctrl+b"], "command": "insert_snippet", "args": {"contents": "*${0:$SELECTION}*"}, "context": | ||
[ | ||
{"key": "selection_empty", "operator": "equal", "operand": false}, | ||
{"key": "selector", "operator": "equal", "operand": "text.html.asciidoc"} | ||
] | ||
}, | ||
{ "keys": ["ctrl+i"], "command": "insert_snippet", "args": {"contents": "_${0:$SELECTION}_"}, "context": | ||
[ | ||
{"key": "selection_empty", "operator": "equal", "operand": false}, | ||
{"key": "selector", "operator": "equal", "operand": "text.html.asciidoc"} | ||
] | ||
}, | ||
{ "keys": ["ctrl+k"], "command": "insert_snippet", "args": {"contents": "+${0:$SELECTION}+"}, "context": | ||
[ | ||
{"key": "selection_empty", "operator": "equal", "operand": false}, | ||
{"key": "selector", "operator": "equal", "operand": "text.html.asciidoc"} | ||
] | ||
} | ||
] | ||
>>>>>>> 2decf5be0d74e3a5b5d5279f2278a2c723f397a5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
AsciiDoc Package for Sublime Text 2 | ||
=================================== | ||
This is an [AsciiDoc](http://www.methods.co.nz/asciidoc/) package for [Sublime Text 2 editor](http://www.sublimetext.com/). | ||
|
||
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](https://github.com/zuckschwerdt/asciidoc.tmbundle). | ||
|
||
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` | ||
|
||
**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: | ||
|
||
- <strike>Add keyboard shortcuts for various commands such bold text, italics, blocks etc.</strike> | ||
- 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. |
I think this was a bad merge