mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
adding rules to indent from within [], (), {}
This commit is contained in:
@@ -218,6 +218,33 @@
|
||||
"action": {
|
||||
"indent": "outdent"
|
||||
}
|
||||
}
|
||||
},
|
||||
// Indent when pressing enter from inside ()
|
||||
{
|
||||
"beforeText": "^.*\\([^\\)]*$",
|
||||
"afterText": "^[^\\(]*\\).*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
}
|
||||
},
|
||||
// Indent when pressing enter from inside {}
|
||||
{
|
||||
"beforeText": "^.*\\{[^\\}]*$",
|
||||
"afterText": "^[^\\{]*\\}.*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
}
|
||||
},
|
||||
// Indent when pressing enter from inside []
|
||||
{
|
||||
"beforeText": "^.*\\[[^\\]]*$",
|
||||
"afterText": "^[^\\[]*\\].*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user