Skip to content

kurusugawa-computer/markdown-copilot-vscode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

en ja zh-cn

Markdown Copilot for Visual Studio Code

Version Downloads GitHub Workflow Status GitHub stars GitHub Contributors

Markdown Copilot is an OpenAI ChatGPT API client for VSCode.

Basic Usage

Markdown Copilot enables you to fully replace the OpenAI ChatGPT WebUI, offering superior features such as:

  1. Saving conversation histories in Markdown
  2. Conducting multiple conversations simultaneously
  3. Branching out conversations
  4. Editing previous conversations at any point and continuing the conversation
  5. Nameing files based on conversations
  6. Titling conversations

Note: An OpenAI or Azure OpenAI API key is required to use this extension. For more information, please refer to the OpenAI official FAQ or Azure OpenAI Quickstart.

🌟 Key Features

πŸ”€ Parallel Editing

Execute multiple auto-edits simultaneously, enhancing your productivity by not having to wait for one edit to complete before starting another.

Parallel Editing

πŸŽ› Context Control

Manage conversational contexts hierarchically, using quote indentation and syntax colors for visual context highlighting.

Context Control

πŸ“ Contextual Editing

Markdown Copilot answers to selected text based on context.

To use, select a text range and choose πŸ’‘ Markdown Copilot: Continue from the code action proposals.

Contextual Editing

Or use shortcuts for quick access:

Command Windows / Linux Mac
Trigger suggestion Ctrl+Space or Ctrl+I βŒƒ+Space or ⌘+I

Contextual Editing Shortcut

β™― Context Notation in Markdown

The active context is determined by tracing back the quote indent from the cursor line. Can force a context guard with a line starting with # Copilot Context.

Example: take care

If you select Then say "take care". and choose πŸ’‘ Markdown Copilot: Continue, you will get the following output: hello β†’ good bye β†’ take care.

Example: take care

More complex example: the context continues across take care line.

Example: see you again

Specifying a speaker: You can specify a speaker by placing a special Markdown notation at the beginning of a line.

Markdown Meaning
**User:** User is the speaker
**Copilot:** Markdown Copilot is the speaker
**System(Override):** Overrides system message
**System:** Specifies additional system message

ᝰ Override Options

Customize Markdown Copilot's behavior with override options. This allows you to control settings like response length or the AI model directly within your document.

To use override options, simply include a JSON code block labeled json copilot-options with your desired settings, then select this block along with your text and choose πŸ’‘ Markdown Copilot: Continue from the code action proposals.

Example: Let Markdown Copilot introduce itself with customized response length and model

Introduce yourself.

```json copilot-options
{"max_tokens":50,"model":"gpt-3.5-turbo"}
```

Example: Using the o1-preview model

The o1-preview and o1-mini models do not support system messages, so we will use **System(Override):** to clear the system messages.

**System(Override):**

**User:**
Introduce yourself.

```json copilot-options
{"model":"o1-preview","temperature":1}
```

For more configuration options, please refer to the OpenAI API: Create chat completion.

πŸ“› Name and Save File

Markdown Copilot allows you to name and save a file based on its contents.

To use, select the editor you want to name and save, and use the Markdown Copilot: Name and Save As... command.

Or use shortcuts for quick access:

Windows / Linux Mac
Ctrl+Shift+P > Name and Save As ⌘+⇧+P > Name and Save As

🏷️ Titling the Active Context

Markdown Copilot allows you to title a conversation based on the conversation history. Conversation titles are represented as lines beginning with # Copilot Context: .

To use, move the cursor to the context you want to title and use the Markdown Copilot: Title active context command.

Or use shortcuts for quick access:

Windows / Linux Mac
Ctrl+Shift+P > Title active context ⌘+⇧+P > Title active context

πŸ“₯ Import Other Markdown Files

Markdown Copilot allows you to easily import other Markdown files into your current document. This enables you to reference or reuse content from other documents.

To import another Markdown file, use the @import directive followed by the path to the file you want to import, enclosed in double quotes.

Example with a relative path: Import another-markdown.md located at a relative position from the current file.

@import "path/to/another-markdown.md"

Example with an absolute path: Use an absolute path from the root directory of the workspace to import toplevel-markdown.md.

@import "/toplevel-markdown.md"

When the current document is unsaved and thus lacks a confirmed file path, you must use an absolute path to specify other Markdown files to be imported.

β€· Quote Indentation

Simplify the editing of quote indentation levels with intuitive actions.

Select text and choose πŸ’‘ Markdown Copilot: Indent Quote Line or πŸ’‘ Markdown Copilot: Outdent Quote Line from code action proposals.

Quote Indentation

Or use these shortcuts:

Command Windows / Linux Mac
Indent Quote Line Ctrl+Alt+L ⌘+βŒ₯+L
Outdent Quote Line Ctrl+Alt+Shift+L ⌘+βŒ₯+⇧+L

Quote Indentation Shortcut

πŸ“‹ Prerequisites

πŸ”Œ Enhance Your Markdown Experience

Combine Markdown Copilot with these extensions for an even more powerful Markdown experience:

  • Markdown All in One: Comprehensive Markdown support (keyboard shortcuts, table of contents, auto preview, and more).
  • Snippets: Supercharge your Snippets in VS Code β€” Manage your code snippets without quitting your editor.
  • Markdown Preview Mermaid Support: Adds Mermaid diagram and flowchart support to VS Code's built-in markdown preview.
  • Markdown Preview Enhanceded): Markdown Preview Enhanced is a SUPER POWERFUL markdown extension for Visual Studio Code. The goal of this project is to bring you a wonderful markdown writing experience.
  • Markdown+Math: Enhance your Markdown with LaTeX Math ... including macros and more.

πŸ”„ Changelog

For detailed updates, refer to the CHANGELOG.

🀝 Get Involved