Create a gist now

Instantly share code, notes, and snippets.

LaTeX indentation rules for Sublime Text. See usage in comments below.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Indentation Rules</string>
<string>text.tex, sources.bib</string>
| ^\s*\\\].*$
| ^\s*\}.*
| ^\s*\%.*\(end\).*$
| ^.*\\\[\s*$
| ^.*\\(.+)\{$
| ^\s*\\((sub)[0,2])?section(\*)?\{.*\}.*$

LaTeX Indentation Rules for Sublime Text


Download/paste & save as LaTeX/Indentation Rules.tmPreferences in your user profile folder
(i.e. C:/Users/<username>/AppData/Roaming/Sublime Text 2/Packages/LaTeX.

You can find your Packages folder through Sublime's Preferences > Browse Packages... menu item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment