Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>asciidoc-productivityNew to Visual Studio Code? Get it now.
asciidoc-productivity

asciidoc-productivity

schletz

|
3 installs
| (0) | Free
Improves AsciiDoc editing features.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AsciiDoc Productivity

1. Insert source code from clipboard (Insert as source block)

Copy any code. Right-click in your AsciiDoc document and select Insert as source block. An input line will open at the top where you can type the programming language (e.g., csharp, java, python). The code will then be inserted as a perfectly formatted AsciiDoc source block.

2. Insert TSV tables (Insert as tsv table)

Copy table-like data (e.g., directly from Excel) to your clipboard. Select Insert as tsv table from the right-click menu. The extension automatically detects the number of columns (based on the tabs) and generates a completed AsciiDoc table block in TSV format.

3. Insert image from local file (Insert image from file)

Do you want to embed an image located on your hard drive? Select Insert image from file. A dialog window opens in the current folder. Select your image. The extension automatically calculates the relative path from your document to the image and inserts the correct image::path/to/image.png[] syntax. Note: To ensure the path matches the .adoc file, you must save the file first.

4. Save image from clipboard (Insert image from clipboard)

Have you taken a screenshot that is currently in your clipboard? Select Insert image from clipboard. A save dialog will open. Give the image a name. The extension saves the image from memory to your hard drive and immediately inserts the code with the relative path into the document. Note: To ensure the path matches the .adoc file, you must save the file first.

5. Download image from the internet (Insert image URL)

Copy the URL of an image (e.g., https://example.com/image.png) to the clipboard. Select Insert image URL. The extension downloads the image from the internet, asks where you would like to save it locally, and then inserts it into the document along with the original source. This ensures that no images are lost if the website later goes offline. Note: To ensure the path matches the .adoc file, you must save the file first.

6. Copy AsciiDoc table as TSV to clipboard

Highlight a table in AsciiDoc including the start and end markers (|===). In the context menu, there is an option Copy AsciiDoc Table as TSV to clipboard. This copies the table as a tab-separated table to the clipboard. This data can then be pasted, for example, into Excel.

7. Import file directly as code block (File Explorer Feature)

This is the most powerful feature for programmers: In the left-hand file tree view of VS Code (File Explorer), go to a code file (e.g., .cs, .java, .py). Right-click on the file and select Insert as source block. The extension reads the entire file, automatically detects the programming language, calculates the relative path, and inserts a clickable link to the file along with the source code into your currently open AsciiDoc document. Note: To ensure the path matches the .adoc file, you must save the file first.

8. Copy files of a directory to the clipboard

Source code is required in the context window, especially for AI prompts. When clicking on a directory in the File Explorer, a menu item Copy sources to clipboard appears. If you want to copy the current folder, you can click the button next to the directory name in the Explorer (see screenshot). When prompting, check whether the entire code was copied. Especially in the Free Plan, the context window is very limited.

9. AI Features: LLM translate and LLM check spelling and grammar

You can translate a selected text or an entire file. LLM: Translate is available in the context menu of the Editor and Explorer. LLM: Check spelling and grammar is available when you select text in a document. An OpenAI compatible endpoint such as LM Studio, Ollama, etc., is required for these features.

Configuration

The following settings can be set in the settings.json file (examples):

"asciidoc-productivity.includeExtensions": "cs|csproj|java|rb|json|js|ts|jsx|tsx|py|txt|xml|adoc|md|cmd|sh|sql|yaml|puml",
"asciidoc-productivity.excludeDirectories": ["bin", "obj", "node_modules", "TestResults"],
"asciidoc-productivity.excludeFiles": ["package-lock.json"],
"asciidoc-productivity.completionsUrl": "http://127.0.0.1:8000/v1/chat/completions",
"asciidoc-productivity.llm": "LilaRest/gemma-4-31B-it-NVFP4-turbo",
"asciidoc-productivity.maxOutputTokens": 4096,

For copy files to clipboard (explorer menu)

The app asks which extensions should be considered. The default is read from the settings.json file (includeExtensions).

An extractor is available for the docx and pdf extensions (mammoth for Word files, pdfreader for PDF files). To copy these files as well, you must add the docx and pdf extensions in the settings or enter them before copying.

Files larger than 10 MB will not be read.

Extending the app and Creating the VSIX File

The source code can be found at https://github.com/Die-Spengergasse/course-pos-csharp_basics/tree/master/07%20Asciidoctor/asciidoc-productivity.

package.json: Defines the menu entries in the contributes key and refers to the methods in the extension.

src/extension.ts: The actual extension. It is loaded at the start. When a menu item is clicked, the corresponding method is called.

src/EditorService.ts: A classic service file used to summarize the editor methods.

src/ConfigurationService.ts: Reads the configuration from the settings.json file and provides it to the application.

src/LLMService.ts: A wrapper for the fetch requests to the OpenAI-compatible endpoint for LLM prompts.

Debugging

If you open the extension directory with Open Folder, you can simply open a VS Code window with F5 or Run -> Start Debugging and test your extension.

Exporting to a VSIX File

To build the extension yourself and install it in Visual Studio Code (VS Code), the global Node.js tool @vscode/vsce is required. You can install it via the console with npm install -g @vscode/vsce. Now go to the extension folder (where the package.json is located). Then execute the following command to generate the finished installation file:

vsce package --allow-missing-repository

After the process, you will find a new file with the extension .vsix (e.g., asciidoc-productivity-1.0.0.vsix) in your folder. You can now install this in VS Code.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft