Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

robole/vscode-markdown-snippets

Repository files navigation




Markdown Snippets

Extended Markdown snippets.

Made for VSCode Visual Studio Marketplace Version Extension file size in bytes Visual Studio Marketplace Rating downloads installs Built with Buy me a coffee

insert table

Activation

The snippets are only active in Markdown files (defined by markdown language identifier).

Snippets

Name Prefix Body
Insert table table Insert a table with 2 rows and 3 columns. You can tab through each cell to edit the text.
Insert 2x1 table 2x1table Insert a table with 2 rows and 1 column. You can tab through each cell to edit the text.
Insert 3x1 table 3x1table Insert a table with 3 rows and 1 column. You can tab through each cell to edit the text.
Insert 4x1 table 4x1table Insert a table with 4 rows and 1 column. You can tab through each cell to edit the text.
Insert 5x1 table 5x1table Insert a table with 5 rows and 1 column. You can tab through each cell to edit the text.
Insert 2x2 table 2x2table Insert a table with 2 rows and 2 columns. You can tab through each cell to edit the text.
Insert 3x2 table 3x2table Insert a table with 3 rows and 2 columns. You can tab through each cell to edit the text.
Insert 4x2 table 4x2table Insert a table with 4 rows and 2 columns. You can tab through each cell to edit the text.
Insert 5x2 table 5x2table Insert a table with 5 rows and 2 columns. You can tab through each cell to edit the text.
Insert 2x3 table 2x3table Insert a table with 2 rows and 3 columns. You can tab through each cell to edit the text.
Insert 3x3 table 3x3table Insert a table with 3 rows and 3 columns. You can tab through each cell to edit the text.
Insert 4x4 table 4x3table Insert a table with 4 rows and 3 columns. You can tab through each cell to edit the text.
Insert 5x5 table 5x5table Insert a table with 5 rows and 5 columns. You can tab through each cell to edit the text.
Insert task list task Insert a task list with 1 task. You can tab through item to set the status (complete/incomplete) and edit the text.
Insert task list 2 task2 Insert a task list with 2 tasks. You can tab through item to set the status (complete/incomplete) and edit the text.
Insert task list 3 task3 Insert a task list with 3 tasks. You can tab through item to set the status (complete/incomplete) and edit the text.
Insert task list 4 task4 Insert a task list with 4 tasks. You can tab through item to set the status (complete/incomplete) and edit the text.
Insert task list 5 task5 Insert a task list with 5 tasks. You can tab through item to set the status (complete/incomplete) and edit the text.

You can install the Snippets Ranger extension to view this list inside VS Code.

Contribute

This extension is considered complete and is closed to contributions. The associated GitHub repository is archived.

FAQ

1) Where do the standard markdown snippets come from?

There is a set of snippets for the standard markdown syntax installed with VS Code as part of the built-in markdown extension. This is the source file.

I recommend installing the Snippets Ranger extension if you want a simple way to view the built-in snippets.

2) How do I use the snippets?

To insert a snippet, you can just type one of the prefixes in a markdown file, and you will be offered a completion suggestion. The setting Editor: Snippet Suggestions controls whether snippets are shown with other suggestions and how they are sorted. By default, they are shown inline.

Alternatively, you can open the Command Palette (Ctrl+Shift+P) and run the command "Insert Snippet", which presents you with a list to choose from.

3) How do I add shortcuts for these snippets?

Run the command Preferences: Open Keyboard Shortcuts (JSON) to open the keyboard shortcuts config (keybindings.json). Add an new object to the array such as this:

[

	{
		"key": "ctrl+t",
		"mac": "cmd+t",
		"command": "editor.action.insertSnippet",
		"when": "!editorReadonly && editorLangId == markdown",
		"args": {
			"langId": "markdown",
			"name": "Insert task list"
		}
	}

]

The args.name property must exactly match the snippet name.

I created the Markdown Shortcuts extension to provide shortcuts for all markdown snippets if this is something you want. You can override my selections if you want, read the extension README for more info.

4) Where can I learn more about snippets?

You can read my comprehensive guide on Snippets on FreeCodeCamp: Visual Studio Code Snippets – the Definitive VS Code Snippet Guide for Beginners. It's not just for beginners! 😉

5) Where can I learn more about keyboard shortcuts?

You can read my article - VS Code keyboard-fu: custom keyboard shortcuts that will boost your productivity.