Skip to content

Auto Closing Brackets: Cpp error #127944

@ghost

Description

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.57.1 (Universal)
  • OS Version: macOS Big Sur 11.4

Steps to Reproduce:

  1. create a new markdown file, eg: test.md

  2. in vscode, insert a c++ code snippet into the file (Already have cpp extension installed)
    eg:

#include <iostream>
using namespace std;
int main() {
    cout << >> "Hello"; //you can see, the editor recognized it as a closing bracket.
}
  1. close the Auto Closing Bracket, problem saved but not convenient at all
    eg:
    step a: press "cmd+shift+P" and input "auto closing bracket"
    step b: switch the "Editor: Auto Closing Brackets" from :【languageDefined】 to 【never】
    step c: back to test.md file and input the following snippets:
#include <iostream>
using namespace std;
int main() {
   cout << "Hello";  // the problem "<<>>" saved, 
           //but closing bracket of { no longer exists this line.
  1. Compare to Typora application, that app does a good job.
    when typing cpp code snippets in typora, it recognizes it and will not make the < signal a closing bracket.
    Because << is used to describe out stream in C++.

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions