Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to use vim to take math notes in a game theory class. I checked out digraphs, and they are great for entering math symbols, but there's some things that it doesn't cover.

Is there any easy way to enter things like enter a x with a tilda over or under it and to enter a x with a bar over or under it? I could just put x, x-under-tilda, x-over-tilda, x-under-bar, and x-over-bar as custom digraphs, but then maybe next class I'll need y-under-bar or z-hat or b-over-tilda or something, and I can't enter them all as digraphs.

share|improve this question

migrated from stackoverflow.com Sep 15 '09 at 18:01

This question came from our site for professional and enthusiast programmers.

4 Answers 4

Learn tex (or better latex).

Even if you don't run it through tex to produce the output most people working in maths/physics will understand the tex statements for maths symbols in a plain text email.

There are a bunch of WYSIWYG tex editors, but with a bit of practice you can type it as fast as you could write the equations.

share|improve this answer
I'm not planning on passing my notes in, I just want a little more clarity than "x~^0" for x over tilda bar zero. I could invent my own syntax, I was just wondering if there was something more concise. –  Nate Sep 14 '09 at 15:23
After a while you will see x~^0 and picture it, the advantage of Tex is that everybody else will also picture it AND there is a bunch of software that can picture it. –  Martin Beckett Sep 14 '09 at 15:37
+1: I have to agree: [la]tex is just the right tool for the job. It's a well-defined, extensively used language for writing symbol-ridden text like your notes. And, if you ever want to print those notes out or save them to a pdf, they'll look absolutely great. –  ojrac Sep 14 '09 at 16:48
+1 If you really want the notes to be in a plain text format, post-process them with something to convert x~^0 to the unicode symbol(s) that is/are closest to what you want. However, it's easier to just bung it at latex and let it do the work for you. –  Al. Sep 14 '09 at 19:42
For me, Lyx is faster than plain Tex, even though I'm trained tex typer. This is mainly due to the mental penalty of imagining complex fractions, and counting the parenthesis. Those small mistakes which are easily noticable with Lyx-like editor, will not be visible until you render the whole file to dvi, and will then consume much larger chunk of time to fix. –  Elazar Leibovich Jan 3 '10 at 15:14

Stop banging on that screw with your hammer.

A better tool for the job is Lyx.

Or, since you're in school, you can probably get a really good deal on Mathematica, which is available for most every platform. They even have a version for just one school term, if you don't think you'll use it once you're done with this class.

share|improve this answer
The reason that I am using vim is because I know it quite well and because I don't have a mouse on my laptop while in class. My editing abilities are considerably faster when my hands don't need to use the keyboard. I'm not trying to make something particularly pretty, I'm rather trying to avoid ridiculous syntax like "x~^0" which makes my notes harder to read. –  Nate Sep 14 '09 at 15:38
I also don't have a mouse on my laptop. And, although I love vim, it isn't the best tool for absolutely everything. My suggestion, if you're not going to go with some latex editor (which mostly, also, nowadays, can be used without a mouse) try going with MathType for Word. If you define your keyboard shortcuts, it can be the best yet. –  Thomas Geritzma Sep 15 '09 at 19:50

I don't think it's crazy to take math notes in vim. I do. I use digraphs and I've kept a small list of the most frequent ones I use. I occasionally use the superscript digraphs <ctrl>k0S for the superscript 0 in x^0. As far as when I need to insert an x with a tilde over it, I guess I resort to tex. Although remember you can input characters directly with their unicode value by pressing <ctrl>v in insert mode, try <ctrl>vu0127 to input ħ (h bar). You can look up unicodes for many common letters with accessories like bars and hats then input their values like so.

share|improve this answer
up vote 0 down vote accepted

I think the answer is that there is no way to do this without writing with special syntax and then compiling later into pretty syntax. This is not what I was looking for.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.