File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 119
119
// e.g. * ...| or */| or *-----*/|
120
120
"unIndentedLinePattern" : {
121
121
"pattern" : " ^(\\ t|[ ])*[ ]\\ *[^/]*\\ */\\ s*$|^(\\ t|[ ])*[ ]\\ */\\ s*$|^(\\ t|[ ])*[ ]\\ *([ ]([^\\ *]|\\ *(?!/))*)?$"
122
+ },
123
+ "indentNextLinePattern" : {
124
+ "pattern" : " ^((.*=>\\ s*)|((.*[^\\ w]+|\\ s*)(if|while|for)\\ s*\\ (.*\\ )\\ s*))$"
122
125
}
123
126
},
124
127
"onEnterRules" : [
197
200
"action" : {
198
201
"indent" : " outdent"
199
202
}
200
- }
203
+ },
204
+ // Indent when pressing enter from inside ()
205
+ {
206
+ "beforeText" : " ^.*\\ ([^\\ )]*$" ,
207
+ "afterText" : " ^\\ s*\\ ).*$" ,
208
+ "action" : {
209
+ "indent" : " indentOutdent" ,
210
+ "appendText" : " \t " ,
211
+ }
212
+ },
213
+ // Indent when pressing enter from inside {}
214
+ {
215
+ "beforeText" : " ^.*\\ {[^\\ }]*$" ,
216
+ "afterText" : " ^\\ s*\\ }.*$" ,
217
+ "action" : {
218
+ "indent" : " indentOutdent" ,
219
+ "appendText" : " \t " ,
220
+ }
221
+ },
222
+ // Indent when pressing enter from inside [ ]
223
+ {
224
+ "beforeText" : " ^.*\\ [[^\\ ]]*$" ,
225
+ "afterText" : " ^\\ s*\\ ].*$" ,
226
+ "action" : {
227
+ "indent" : " indentOutdent" ,
228
+ "appendText" : " \t " ,
229
+ }
230
+ },
201
231
]
202
232
}
You can’t perform that action at this time.
0 commit comments