adding rules to indent from within [], (), {}

This commit is contained in:
Aiday Marlen Kyzy
2024-03-21 17:30:16 +01:00
parent b40321263d
commit d8a989efdd
2 changed files with 29 additions and 2 deletions

View File

@@ -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",
}
},
]
}