Sublime Forum

Snippet fields around parentheses

#1

When I write an open-parenthesis, a closing parenthesis automatically appears. Fine. Brilliant. Now that the caret is between the parentheses, I type a word to be auto-completed

(enum|)
```
pressing [tab] now, however, doesn't auto-complete the enum snippet, instead it skips to the next field, which is outside the parentheses
```
(enum)|
```

Does anyone know how I can either disable the fields around parentheses, so the completion happens? or even better know how I can reorder the priority, so Sublime will complete an entry before it skips to next field?
0 Likes

#2

could it be related to this setting, which defaults to false?

// Controls if auto complete is shown when snippet fields are active.
// Only relevant if auto_complete_commit_on_tab is true.
"auto_complete_with_fields": false

try changing it to true and see what happens :slightly_smiling:

0 Likes

#3

Thanks, indeed it works for auto-complete :smiley: I just realised though the trouble is two-fold… I didn’t realise that auto-complete and tab-complete were two different things. So your tip works for auto-complete, woohoo, but it has no effect on tab-complete :confused: I tried setting "tab_complete_with_fields": true, but seems that has no effect

0 Likes