egoexpress
2/27/2018 - 2:01 PM

AsciiDoc snippets for Visual Studio Code

AsciiDoc snippets for Visual Studio Code

{
  "Shell Code": {
      "prefix": "shell",
      "body": [
        "[source,shell,subs=\"attributes\"]",
        "----",
        "$1",
        "----",
        "$0"
      ],
      "description": "Create a shell code example"
  },

  "Heading 1": {
    "prefix": "h1",
    "body": [
      "= ${1:heading}",
      "",
      "$0"
    ],
    "description": "Heading 1"
  },

  "Heading 2": {
    "prefix": "h2",
    "body": [
      "== ${1:heading}",
      "",
      "$0"
    ],
    "description": "Heading 2"
  },

  "Heading 3": {
    "prefix": "h3",
    "body": [
      "=== ${1:heading}",
      "",
      "$0"
    ],
    "description": "Heading 3"
  },

  "Heading 4": {
    "prefix": "h4",
    "body": [
      "==== ${1:heading}",
      "",
      "$0"
    ],
    "description": "Heading 4"
  },

  "Glossary Entry": {
    "prefix": "glos",
    "body": [
      "[[${1:label}]]${2:Name}::",
      "  $3",
      "$0"
    ],
    "description": "Glossary entry"
  },

  "New Asciidoc Book": {
    "prefix": "book",
    "body": [
      ":doctype: book",
      ":encoding: utf-8",
      ":lang: de",
      ":toc: left",
      ":numbered:",
      ":autofit:",
      ":source-highlighter: rouge",
      ":pdf-stylesdir: themes/",
      ":pdf-style: konsens",
      ":chapter-label:",
      ":toc-title: Inhalt",
      ":appendix-caption:",
      "$0"
    ]
  },

  "Include": {
    "prefix": "inc",
    "body": [
      "include::$1.adoc[]",
      "$0"
    ],
    "description": "Include file"
  },

  "Reference": {
    "prefix": "ref",
    "body": [
      "* [[[${1:label}]]] ${2:Description}:",
      "  ${3:link}",
      "$0"
    ],
    "description": "URL reference"
  },

  "Inline Link": {
    "prefix": "<",
    "body": "<<${1:name},${2}>>$0",
    "description": "Create an inline link"
  },

  "Inline Code": {
    "prefix": "`",
    "body": "`$1` $0",
    "description": "Create an inline code part"
  },

  "Italic Text": {
    "prefix": "i",
    "body": "_$1_ $0",
    "description": "Write italic text"
  },

  "Bold Text": {
    "prefix": "b",
    "body": "*$1* $0",
    "description": "Write bold text"
  },
  
  "URL": {
    "prefix": "url",
    "body": "${1:url}[${2:text}] $0",
    "description": "Add external URL reference"
  }
}