microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.67k stars 29.07k forks source link

Support autoClosingPairs for strings like `begin` and `end` #583

Open seanmcbreen opened 8 years ago

seanmcbreen commented 8 years ago

From @Wosi on October 27, 2015 20:23

I'd like to define autoClosingPairs for Pascal like begin <-> end, if <-> then etc. Definitions for closing pairs like these seem to be ignored by VSCode. It looks like auto closing is currently supported for character pairs only.

Please add support for longer auto closing pairs.

Copied from original issue: Microsoft/vscode-extensionbuilders#66

waywardmonkeys commented 8 years ago

This would be useful to me too in vscode-dylan.

Somnium7 commented 7 years ago

Would be useful to me too. Also is related to https://github.com/Microsoft/vscode/issues/26121

fpqc commented 7 years ago

Same here, this is pretty important for LaTeX as well.

msftrncs commented 6 years ago

This issue appears to be implemented in VS Code 1.26+. I have been using an extension that has autoClosingPairs like VAR -- END_VAR and they work, but they are actually very annoying, because VAR and END_VAR are to appear on their own lines, as they would also be considered 'brackets' to which the code inside will be indented. If I attempt to put a \n in the 'close' value, it moves the cursor. I'm suggesting the extension author remove all the related autoClosingPairs due to this, and to use snippets instead because the snippets are more valuable in this application.

Wosi commented 6 years ago

Yes, autoClosingPairs for words still don't work as expected. When I define an autoClosingPair for begin->end I would expect it to be triggered only when I type the word "begin" and hit space, tab or enter. Right now it's being triggered everytime I type "begin", e.g. when typing an identifier name like beginValue or before_begin which is very annoying.

GustavoASC commented 5 years ago

We have the same situation with COBOL keywords like 'IF' and 'END-IF'.

tabakerov commented 5 years ago

This issue happens also with F# 4.6's anonymous record: trying to write {||} I'm getting {||}}

msftrncs commented 5 years ago

@tabakerov, I opened #72177, for similar constructs in IEC 61131-3 Structured Text, (* … *)

vscodebot[bot] commented 4 years ago
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our [documentation](https://aka.ms/vscode-issue-lifecycle). Happy Coding!
rmunn commented 4 years ago

Both this and https://github.com/microsoft/vscode/issues/72177 are in danger of being closed for insufficient upvotes. I have a hard time believing that this is truly affecting fewer than 20 people, which means some people haven't voted for this issue (or for #72177) yet. If that's you, please leave a thumbs-up on this issue and/or #72177 so they don't get autoclosed by the bot in two months.

vscodebot[bot] commented 4 years ago
:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our [documentation](https://aka.ms/vscode-issue-lifecycle). Happy Coding!