English 中文(简体)
• 如何在保存其他汽车时,在Markdown案卷中对VS法典中三重背书进行可分的自动配对?
原标题:How to disable automatic pairing of triple backticks in VS Code in Markdown files while keeping other auto-pairings?

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.

我也创建了

是否有办法实现这一目标? 否则,有人会指导我如何在我的环境下改变这种行为?


我试图通过《安全法》的环境和关键的约束性选择进行搜索,以找到一种办法,具体地消除三重背书的自动配对,但并未发现这种情形。 我预计会找到一种办法,使我能够放弃这一特殊的汽车停机,同时把其他人保留下来。 实际发生的情况是,每当我打一个单一的背书时,它就自动填写三重背书,然后我不得不人工删除。

我也创建了一个Gite Hub问题,以解决这一关切。 此外,》,但尚未找到解决办法或工作。

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.

问题回答

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 the editor.language.brackets setting, and the editor.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:

Fixes #183489

Will test this out to see if it s helpful or too annoying

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.

在Windows系统中,相关档案位于:

C:UsersMarkAppDataLocalProgramsMicrosoft VS Code
esourcesappextensionsmarkdown-basicslanguage-configuration.json

Here is what the autoClosingPairs key/value looks like for a markdown file:

  "autoClosingPairs": [
    {
      "open": "{",
      "close": "}"
    },
    {
      "open": "[",
      "close": "]"
    },
    {
      "open": "(",
      "close": ")"
    },
    {
      "open": "<",
      "close": ">",
      "notIn": [
        "string"
      ]
    },
    {
      "open": "`",       // consider deleting this as well
      "close": "`"
    },
    {
      "open": "```",    // delete this {} entry and save
      "close": "```"
    }
  ],

你不妨首先支持这一档案。

I wrote an extension, Custom Language Properties, which has a command to show the language configuration file of the active editor:

Custom Language Properties: Show language configuration for current 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

    {
      "open": "`",       // consider deleting this as well
      "close": "`"
    },

确保你不要在json案卷中留下任何hang。

BTW,我也对完成三重标准表示仇恨。

您也应当进一步阐述这一问题:LanguageConfiguration界面应当揭露汽车的“,这还将使本人和其他人能够轻易解决问题。 事实上,这已经奏效,但是由于仍然有人提议,无法出版。 但是,在测试过程中,它按预期发挥作用。





相关问题
Citing the author of a blockquote using Markdown syntax

I am using the Symfony CMS and it uses Markdown for article writing. I need to do a blockquote of a quote from Benjamin Franklin and would like to have the quote followed by a citation beneath it, but ...

What markup language to store in a DB?

Related: How to store lightweight formatting (Textile, Markdown) in database? I want to store comment formatting in some markup language in our DB. However, we want to allow multiple formatting ...

Markdown vs. HTML in a CMS

I m working on a fairly large CMS-like app that includes a forum, wiki pages, etc. What whould you chose between Markdown and HTML? I m concerned about usability and the fact non-techie people will ...

PHP Markdown Question

I m using http://michelf.com/projects/php-markdown/ for my markdown library and my question is that if i edit and remove the functionality would this work Because the users that i have, are ...

markdown to HTML with customised WMD editor

For my application I customized slightly the way WMD behaves so when user enters empty lines, these are reflected in HTML output as <br /> s. Now I came to a point when I should store it ...

Python Markdown: Markdown Inside HTML Blocks

Is there an extra for Python Markdown that supports Markdown inside HTML block elements, e.g. div, p i.e. is there a way to convert this: <div id="content"> [Google](http://www.google.com) ...

热门标签