ST4 Autocomplete removing "\" before LaTeX commands

#1

Since the update to ST4 whenever I press Tab to autocomplete a LaTeX command, it removes the " \ " at the front of the command.

Ex:

\begin{}

Results if I Tab to autocomplete:

begin{}

Anyway to solve this issue?

3 Likes

#2
1 Like

#3

I am using a different plugin (LaTeXBox) but it had a similar issue. Here is my understanding of the issue: Sublime Text 3 would not replace the tab trigger “\” when completing the snippet, as a result if you type “\” to complete “\begin” you will end up with “\\begin”. As a result, plugins like LaTeXBox wrote their snippets without the “\”.

Since Sublime Text 4 fixed the issue, this had an unfortunate side effect of making the workarounds fail. My workaround is to edit the plugins to fix the behavior.

I think a proper solution would be for plugin authors to offer different versions of the plugin to Sublime Text 3 and Sublime Text 4 (or maybe to detect version in the plugin?).

0 Likes

#4

Just would need to add a version check to return proper format depending on ST version.

So something like if int(sublime.version()) >= 4000 then return with backslash else without

1 Like

#5

This issue solved the problem for me!

1 Like

#6