Sublime Forum

LaTeX - list of completions

#1

I’m using Latextools and latex-cwl to write latex on sublime. I would like to see the list of completions that the packages use (for example: e completes to \epsilon, a to \alpha, i to \item…)

The documetation Points to a non-existent file on github (that also doesn’t exist on my machine).

Any ideas?

0 Likes

#2

Content of LaTeX.sublime-completions and LaTeX math.sublime-completions has been converted to snippets in order to work around ST4 removing perfect matching completions, which prevented exactly what you ask for. They reside in snippets/ sub directory but remain using same triggers.

So typing i and hitting tab key should automatically expand to \item anywhere in a document.

a -> \alpha, e ->\epsilon are restricted to math environments.

Whether they show up in auto-completions, depends on "auto_complete_include_snippets" and "auto_complete_include_snippets_when_typing" settings.

grafik

Command completions are primarily provided by LaTeX-cwl. They require \ being typed to trigger completions by default.

1 Like

#3

Makes sense! Is there any documentation to make my own snippets?

0 Likes

#4

Completions are stored in Packages/LaTeXTools/snippets folder.

  1. Run Menu > Preferences > Browse Packages...
  2. navigate to LaTeXTools folder and than to snippets.

To create your own snippets, run Menu > Tools > Developer > New Snippet...

Some desciptions about snippets can be found at https://docs.sublimetext.io/guide/extensibility/snippets.html#snippets

0 Likes

#5

May I ask where the snippet (?) that turns \left( into \left(\right) located? I need to make one with the absolute value since it’s not available and I can’t find it.

Thanks in advance.

0 Likes

#6

This specific one is Packages/LaTeXTools/snippets/math/lb.sublime-snippet

Those snippets are lazily named by their trigger. Some use _upr suffix to work around case-insensitive filesystems.

0 Likes

#7

Thanks for your reply :slight_smile:

I wasn’t talking about that particular snippet, (this one turns lb into \left[\right]). I was refering to this one, which turns \left( into \left(\right) without pressing tab.

I think it isn’t a snippet since I don’t need to press the tab key to make it work, and I wasn’t able to find it among the .py files present on my “installed packages” directory.

0 Likes

#8

This is a math-scope-specific key binding.

It can only be disabled by creating a user defined override, currently.

0 Likes