I do a lot of work in plain TeX and XeTeX, editing the documents in vim, and have a variety of templates which I use to make the process more efficient. As you might expect, these use quite a lot of variables which are defined once and then reused.
At the moment, to save typing, I put the most common values for each variable into the template, using the TeX comment delineator (a “%”) to control which one is selected. For example, the template might say:
\def\location{%London
%Paris
%New York
}
Then, when I am working on a document, I might de-comment the relevant line to define \location as “Paris”:
\def\location{%London
Paris
%New York
}
Whilst this works, it annoys me because I find having one option per line makes the templates unnecessarily long and hard to work my way through. I also can’t re-use the list of options when more than one variable might have a value chosen from the same list (e.g. in the example above, for “\newlocation”, I’d have to copy the list) and it just feels inefficient and the Wrong Way.
In an ideal world, I was wondering if there could be something like a drop-down list of options which I could call up and select. However, I have had a look at vim’s default options, and many of the templates / skeleton / snippet plugins and haven’t really been able to see anything that is obviously suitable for something as simple as this.
I am sure this is just me missing the obvious and was therefore wondering if someone could help point me in the right direction?
Thanks!
Jacob