Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Multi-cursor, multi-line snippets have indents eaten when certain characters are input #283

Open
1 task done
rhinopotamus opened this issue Nov 16, 2018 · 2 comments
Open
1 task done

Comments

@rhinopotamus
Copy link

Prerequisites

Description

Okay, so this is weird.
I have a multi-line snippet with a multi-cursor tab stop:

'\\begin{}...\\end{}':
    'prefix': '\\begin'
    'body': '\\\\begin{${1:env}}$2\n\t$0\n\\\\end{${1:env}}'

This works fine and properly inserts the snippet with proper indentation of the last line. However, if the next character I type is any of c d e m n o t u (and no other letters!), the indentation on the last line gets eaten.

Here's a little video that I hope will help clarify the actual behavior:
bug

Steps to Reproduce

Expected behavior: Should preserve the indentation on the last line.

Actual behavior: The weird thing described above.

Reproduces how often: 100%

Versions

Atom version 1.32.2, Mac OS X 10.14.1.

@Aerijo
Copy link
Contributor

Aerijo commented Apr 20, 2019

Well that was weird. Turns out it's the auto indent going wonky. Try it with Settings > Editor > Auto Indent disabled.

Also turns out I suck at Jumble, because I only worked out the 'broken letters' spell document after the fact. Not sure why that's actually relevant, as the indentation regex is supposed to look for the whole word document, but seems definitely related.

Which Latex language package are you using?

@rhinopotamus
Copy link
Author

I'm actually using your latex2e https://github.com/Aerijo/language-latex2e (version 0.18.0).

Good Jumble-ing! I wonder if it has to do with the fact that \begin{document} is somehow special.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants