LaTeX concealer for sublime-text-3
This is a personal project to replicate some of vim's conceal features in sublime text 3. The current version uses a combination of syntax fold, manipulating the color of the fold icon, and phantom objects in sublime to conceal code. Working on making it real-time, and adding more LaTeX substitutions.
- Download and put the files in
~/.config/sublime-text-3/Packages/User
. - Edit the user defined keybindings file and add
{ "keys": ["ctrl+shift+d"], "command": "texconceal" }
- Now edit your TeX file, and use the keybinding in the line you want to conceal.
In order to make folding distraction free, try looking up the background color in your color scheme and change the fold icon to have the same color. This makes it coalesce with the background.
If you want to edit the files as your own, here is a brief explanation of the files:
latexparser.py
is a DFA that takes in a latex command and separates it into commands and argumentslatex2utf.py
takes in a latex command and translates it into UTF-8TeXconceal.py
is the plugin that defines the text commandtexconceal
behindFold.py
is an additional plugin that prevents folded text from being deletedLaTeX substitutions.json
contains a dictionary of commands and substitutions
- No real-time sync
- I haven't hardcoded behviour of
\text{}, \frac{}{}, \dfrac{}{}
yet