Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote's not automatically being closed in c# files #749

Closed
Nokel81 opened this issue Sep 7, 2016 · 1 comment
Closed

Quote's not automatically being closed in c# files #749

Nokel81 opened this issue Sep 7, 2016 · 1 comment
Assignees
Milestone

Comments

@Nokel81
Copy link

Nokel81 commented Sep 7, 2016

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
RID: osx.10.11-x64

VS Code version: 1.4.0
C# Extension version: (from mono) 4.4.2.11

Steps to reproduce

In a files with the extension ".cs"
Type 'shift+" '

Expected behaviour

"$1", where $1 is the cursor

Actual behaviour

"$1, where $1 is the cursor

In non-cs files (like a js file) this does work and no I do not have the closing-brace option set to false.

@Leopotam
Copy link
Contributor

Leopotam commented Dec 18, 2016

+1
auto closing pairs for " / ' characters should be enabled for "csharp" language in same way, as for js / ts.
how to fix it:
csharp.configuration.json should be edited in this manner:

{
"comments": {
"lineComment": "//",
"blockComment": [ "/", "/" ]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": """, "close": """, "notIn": ["string"] },
{ "open": "/**", "close": " */", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"],
[""", """]
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants