Sublime Forum

Stop <?php + enter being converted to <?phpcredits()

#1

I’m using sublime text 4 for PHP, an issue I constantly encounter is if I type the opening tag <?php and press enter it always converts it into <?phpcredits() and I have to delete it. How can I prevent sublime doing this autocorrect?

0 Likes

#2

ST removes a perfect matching candidate from the list of completions to avoid possible duplications. As a negative side effect the next best matching item is commited.

You should be able to work around this issue by just typing php and hitting tab afterwards. This completes to <?php | ?> where | represents the caret.

0 Likes

Autocomplete skipping keyword.other
#3

another possible workaround: ctrl+enter after typing

0 Likes

#4

is there no way to do this without an extra key press? Is there any way to add a rule to stop the completion menu coming up for specific terms?

0 Likes

#5

Completion panel is controlled by auto_complete_selector and auto_complete_triggers settings. In your situation completion panel is already open when started typing <?php. It’s just that the perfect match is removed from completion panel and the next candidate being selected as a consequence.

There’s nothing we can do as end users.

This requires a fix in the core to handle that properly.

The related issue is filed at …

0 Likes