I’ve been enjoying the features of Visual Studio Code, but there’s one specific behavior that has been counterproductive for me: the automatic pairing of triple backticks (“`) in Markdown files.
To clarify, I’m not looking to disable all auto-pairings—just the triple backticks. Whenever I type a single backtick, VS Code automatically completes it with two additional backticks. This is time-consuming to remove manually each time and disrupts my workflow.
Here’s an example of what happens:
Markdown – VS Code – Triple Backticks
Is there a way to disable this feature? If not, could someone guide me on how to disable this behavior in my own settings?
I’ve seen a similar question but it doesn’t address my specific need to disable only the triple backticks while keeping other auto-pairings intact.
I’ve also created an issue on GitHub to address this, but I’m wondering if there’s a workaround or setting that I’ve missed.
Is there a way to achieve this? If not, could someone guide me on how to modify this behavior in my settings?
I tried searching through the VS Code settings and keybinding options to find a way to disable the automatic pairing of triple backticks specifically, but found no such setting. I expected to find an option that allows me to turn off this particular auto-pairing while keeping others. What actually happens is that every time I type a single backtick, it auto-completes to triple backticks, which I then have to manually remove.
I’ve also created a GitHub issue to address this concern. Additionally, I’ve commented on the commits in the VS Code repository where this feature was recently implemented, but have yet to find a solution or workaround.
I was expecting to find an option within the VS Code settings that would allow me to disable the automatic pairing of triple backticks specifically, while keeping other auto-pairings active.
2
Answers
I’m not 100% sure, but I think the answer might be that you can’t. See the language configuration for the builtin Markdown extension, where
```
is only declared for auto-closing-pairs, but not as a bracket or quote type (makes sense, because it isn’t), so you can’t use theeditor.language.brackets
setting, and theeditor.autoClosingBrackets
has no effect on it. What you’ll need if you want to do this through user configuration (instead of building your own modified VS Code or using a different Markdown extension than the builtin one) probably falls into the category of User settings for language configurations#102574, which I think would allow you to override
autoClosingPairs
.Related Pull-Request which added backticks to auto-closing-pairs: Add
`
as an autoClosingPair in markdown #184532 (release milestone: June 2023 (1.80)). Quoting from the description:You can edit the language configuration file yourself. The only problem is that if it is ever updated by the vscode team you will have to re-do your changes.
On a Windows system, the relevant file is located at:
Here is what the autoClosingPairs key/value looks like for a markdown file:
You might want to make a back-up of that file first.
I wrote an extension, Custom Language Properties, which has a command to show the language configuration file of the active editor:
It will open the relevant file (and the editor tab context menu
Copy Path
has its full path). In the editor which is opened you can edit and save the document. A reload is necessary for the edited language configuration file to take effect.And you will no longer get autoclosing of triple backticks. But there is sone issue, if you type 3 backticks in a row now vscode considers the third bactick to be part of an autoclosingPair itself and adds a fourth backtick…arg @#$.
That can be solved by also deleting the
making sure you don’t leave any hanging commas in the json file.
BTW, I hate the triple backtick completion too.
You should also upvote this issue: LanguageConfiguration interface should expose autoClosingPairs which would also allow my extension and others to fix the problem easily. In fact, this already works but since the api is still proposed so it cannot be published. But in testing it works as expected.
Demo is in a markdown file. Auto-closing works for
{}()[]<>
but not backticks because I excluded them in this extension’s settings.