Closed phlippieb closed 6 years ago
No, that's not something done by this package.
I believe latex-autocomplete
might do it though.
Cool, thanks for the lead. I have latex-autocomplete installed and it does not currently do that, but I'll see if they'd be interested in adding it.
@phlippieb If you don't mind a manually activated autocomplete, my own autocomplete-latex
offers custom completions and some common default ones. Using it, you could type $
+ tab
to expand to \(\)
, with the cursor between the brackets. Alternatively, you could define your own prefix to do this.
Alright, I'll give a shot. Thanks!
That actually works very nicely!
You can also override what it expands into (e.g., you might want to add spaces like this: \( \)
to make the contents easier to read). Same goes for any other default completion.
Don't know if this necessary falls within the scope of this package, but here goes. As someone writing a document with many mathematical formulas, I would love it if, when I type
\(
or\[
, atom would add\)
or\]
after my cursor, similarly to how a simple(
is often auto-closed with a)
after the cursor in other languages.