Sublime Forum

Autocomplete from tokens in strings/comments too

#1

ST used to use tokens in comments too, so I could autocomplete a word in real code from a word in a comment. For instance all these would be used:

// Use options, not arguments.
$signature = "foo --bar --baz="

to autocomplete

$ba|
$argum|

(pipe is cursor) but in ST 4169 bar, baz, arguments etc aren’t used in autocompleting $ba and $argum. Is that an option, or is that how ST 4 works now? Thanks.

0 Likes

#2

a cursory look didn’t show this as being documented anywhere, but I guess it’s how ST4 works now… at least, I see the same behavior with your example in JavaScript mode.

There is an open issue requesting for comments to be ignored when showing autocompletion suggestions from the buffer, but there’s no indication that SublimeHQ ever looked at it…

0 Likes