Also for vim users who aren't aware of this: vim has a convenient way
to enter common special characters in the form of [1]digraphs which you
can enter by pressing ctrl-k in insert mode. You have to learn the
digraph for the symbol, but they are pretty mnemonic in their
assignment (e.g 'C(' -> ⊂, 'm*' -> μ, 's*' -> σ, 'Fm' -> ♀), and
honestly, you wouldn't be using vim if you weren't into maximizing
efficiency by learning short cryptic commands.





On Thu, May 22, 2014, at 12:03 PM, Miguel Bazdresch wrote:

In vim, you can do something like

imap \alpha<TAB> <C-V>u03b1

to reproduce this behavior.

-- mb



On Thu, May 22, 2014 at 1:27 PM, Steven G. Johnson
<[2]stevenj....@gmail.com> wrote:

A quick update for people who haven't been tracking git closely:

The Julia REPL (#6911), IJulia, and (soon) Emacs julia-mode (#6920) now
allows you to type many mathematical Unicode characters simply by
typing the LaTeX symbol and hitting TAB.

e.g. you can type \alpha<TAB> and get α, or x\hat<TAB> and get x̂.

There are currently 736 supported symbols (though not all of them are
valid in Julia identifiers).   This should provide a consistent,
cross-platform Julian idiom for entering Unicode math.

Hopefully this can also be added to other popular editors at some
point, e.g. presumably vim can be programmed to do this, and there is a
somewhat similar mode for Sublime
([3]https://github.com/mvoidex/UnicodeMath).  (Less-programmable
editors might need source-level patches, but it doesn't seem like an
unreasonable patch to suggest.)

References

1. http://vimdoc.sourceforge.net/htmldoc/digraph.html
2. mailto:stevenj....@gmail.com
3. https://github.com/mvoidex/UnicodeMath

Reply via email to