Sublime Forum

Issue with \ Autocompletion in LaTeXTools (Sublime Text 4)

#1

Hi everyone,

I’m using Sublime Text 4 with the LaTeXTools package andI’ve encountered an issue where autocompletions strip the \ from LaTeX commands when I press Tab . For example:

  • When I type \be , Sublime suggests \begin , but pressing Tab results in begin (without the \ ).

Things I’ve tried so far:

  1. Confirmed the issue is located in LaTeXTools package (It fixes itself when said package is disabled)
  2. Removed all snippets from the LaTeXTools package

Interestingly, disabling the LaTeXTools package entirely resolves the issue, so it seems LaTeXTools

How can I prevent LaTeXTools from stripping the \ in autocompletions?

Thanks in advance.

Interestingly, other snippets that I’ve created also break in the same way (for instance, I created a snipped that turned \listaromana into

\begin{enumerate}[label=(\roman*)]

\end{enumerate}

But sometimes (and only sometimes), it also removes the first \ from the snippet.

Video of the issue

0 Likes

#2

This seems a duplicate issue as here.

0 Likes

#3

Although the github issue doesn’t solve this for me, If I decide to follow this issue up I’ll do it over there. Thanks :slight_smile:

0 Likes

#4

I’m using Sublime Text 4 with LaTeXTools, and when I type LaTeX commands like \be and press Tab, it suggests \begin but removes the backslash, leaving just begin. This happens with both built-in and custom snippets. Disabling LaTeXTools fixes it. How can I stop the package from removing the backslash? Interestingly, this doesn’t happen with Spotify-related code.

0 Likes

#5

I can remember some LaTeX snippet related issues in the first few days of ST4, which were related to how it changed treatment of escape sequences and special characters.

I can’t however reproduce issues with expanding \be in recent builds (4152-4188) with only LaTeX tools or none plugin installed.

Animation

Actually related \begin snippet isn’t part of LaTeXTools, but belongs to ST’s default LaTeX package. It was changed by (Packages/PR2855) to fix an issue which caused duplicate backslashes being entered (see: Packages/Issue2730).

0 Likes

#6

All you have to do is to follow the steps that are described here. Below I show how to do it.

0 Likes

#7

Well, those problematic lines are already disabled for all affected ST 4058+ builds.

It however appears they are only part of a 4.0.0-beta release, which is only installed by Package Control, if the package was listed in "install_prereleases" setting.

The fix is hanging around since 2021.

1 Like