May 15, 2026 · latex · tools
My LaTeX setup
After some time using Overleaf to write LaTeX, I sought something more intuitive. I stumbled upon a method pioneered by the late Gilles Castel, which does a great job turning LaTeX from a rigid final layer into something more responsive. It's fast, flexible, fun, and much better explained by him than I could do here. Nonetheless, here's an overview of how I adapted my own skeleton structure.
Editor
Neovim is a highly-customizable keyboard-based text editor. Using Neovim, or something like it, is critical for the fine user customization via plugins and configuration files required to make the setup lightning-fast. You can spend an unbounded amount of time customizing your own setup, but simply following a tutorial can yield a sufficient start. Some helper plugins I appreciate are:
- lualine: a customized statusline displaying editing mode, current file, file length, etc.
- WhichKey: a popup display showing available shortcut completions, which is especially helpful when familiarizing with Neovim
- nvim-autopairs: closes your brackets for you
- UltiSnips: this shortcut (or 'snippet') engine is what makes it all possible
Compiler
I compile with latexmk, generally using the default options provided in examples you can find online.
Here are two options worth noting:
vim.g.vimtex_view_method = 'skim'
vim.g.vimtex_view_skim_activate = 0
The first must be customized to your pdf viewer. The second stops Skim (my pdf viewer for macOS) from being 'focused,'
or brought to the foreground during forwards search, which is useful to avoid having to switch back.
PDF viewer
Skim is the equivalent of Zathura for macOS. It auto-reloads on recompile and supports SyncTeX for jumping between source and PDF. It's not perfect, but more than good enough.
Directory structure
I keep one repo per course notes in the style detailed below, which is generalizable to other project types:
preamble.tex // all packages and macros, shared across the directory
ECE203/ // a given course has its own sub-directory
main.tex // root file which just inputs everything
lec_1.tex // all lectures get their own file
lec_2.tex
...
figures/ // a directory for any figures built or imported What I'd recommend
Using a setup this deep in the weeds takes some adjusting to. For the Neovim setup, I'd recommend following a tutorial, but keeping things as simple as possible. Try to trim away the clutter so that you know the boundaries of your setup and how to change it. You probably need less than you think.
For VimTeX, if you haven't worked with LaTeX before, I'd start in Overleaf with this great resource by Tobias Oetiker.
As per the most efficient way to familiarize yourself with UltiSnips, I would recommend downloading Gilles' snippets files and combining them into one .txt file, not
a .snippets file. When you feel you are doing something repetitively AND inefficiently, then I would look through the text file, find an appropriate snippet (if it exists) and only then
add it to your .snippets file.
This will save you the time of having to create each snippet yourself when someone else has already taken the time to create one with an efficient bind. However,
it will also ensure that all the snippets in your config are in your repertoire. Of course, if a snippet doesn't exist, add it yourself! It's good practice.