gregdan3's avatar: a floating yellow star with red bowtie, yellow gloves, and chalk in hand

gregdan3.dev

I've been using vim as my primary editor for the better part of two years now. My .vimrc has gone through a great many changes in that time, but I think I hit a point early on where many of the features and plugins I had chosen were set in stone. It won't be a perfect fit for everyone, but you might find some useful pieces and ideas for your .vimrc.

This is not so much a guide to setting up vim for first time use, as it is a place to explore options and features you may not already be aware of as a newer but experienced user.

What I care about in my vimrc

I value the responsiveness of vim over nearly any other feature. Even in the context of a remote session, I can barely notice the delay in operations which is caused by the network. This is something vim accomplishes without help from the user doing any configuration,


For writing LaTeX docs, I use listings over algorithmic or any other algorithm writing package for LaTeX. It's more convenient to handle syntax and whitespace when writing another language in-line. The usual packages use their own functions to handle whitespace, and everything else; writing another language in-line will render exactly what you type.

Algorithmic for LaTeX

I often see the algorithmic package recommended for demonstrating algorithms inside of LaTeX documents.

Like many LaTeX packages, this comes with its own sizable set of docs made up of a large quantity of commands which I might expect to exist already, but the exact syntax for which are anywhere between mildly frustrating and utterly arcane.

As a less-than-optimal idea of what this might look like in practice, here's a short (and possibly incorrect) algorithm I drafted which takes in a binary tree of integers and a sum, checking for a contiguous, non-backtracking path from any node to another (so only between parent and child nodes, no