Sublime Forum

Snippets: Press "Tab" then list should open

#1

Description

I have created some working snippets. All have the same tab trigger (“list”).

When I press “list+tab” I would like opening a dropdown menu with all the suggested snippets so that I can choose the right one.

I know you can use the command “strg+space”. But that is cumbersome.

In other words: I want the autocomplete dropdown to appear only as I type “list+tab”.

This command is not the one I am looking for: “auto_complete_selector”: “source, text”.

Currently when I press “list+tab” it just always creates the same snippet immediately. That’s not what I want.

Environment

  • Build: 4126
  • Operating system and version: Windows Version 21H2 (Build 19044.2130)

Kind regards

Chris

0 Likes

#2

If a tabTrigger has been fully typed, the completion panel is displayed only if tab_completion: true is set in ST 4126. It’s one of the quirks with regards to snippets/completions, which still exist in that build.

It is always displayed in ST4140.

The auto_complete_selector just controls when to display the completion panel automatically while typing.

0 Likes

#3

Thanks for your reply.

Could you please give me your code in “Preferences.sublime-settings” for ST4126, cause it does not work.

“auto_complete_selector”: “meta.tag - punctuation.definition.tag.begin, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc”,

“tab_completion”: true,

In ST4140 it works without changing anything … (BUT: I cannot use ST4140, because it has problems with Forward and Inverse Sync. If I double click in SumatraPDF, it opens new ST-files".)

Or is it impossible to get it working in ST4126?

0 Likes

#4

… code in “Preferences.sublime-settings”

I just played around with tab_completion. It’s otherwise empty.

Just realized, I entered Hello (with capital H). Hence completion panel was displayed.

Typing lower case hello doesn’t indeed display the completion panel at all.

… it has problems with Forward and Inverse Sync.

What does it mean?

ST4140 is a candidate for the next stable release.

If you saw any issues, a bug report may probably be useful.

That said: If using the latest build is no option for you, you’ll need to live with the quirks and bugs of the one you are using. There’s nothing we can do for you then.

0 Likes

#5

Thank you!

The bug is: With ctrl+b I build my LaTeX-PDF (SumatraPDF opens). If I double click in SumatraPDF then an new ST-document opens.

0 Likes