mathmenu.txtDrChip's Math Keymap and MenuJan13,2011
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
Copyright: (c) 2009-2011 by Charles E. Campbell, Jr. mathmenu-copyright
NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK.
The VIM LICENSE applies to keytab/math.vim,
plugin/mathmenuPlugin.vim, autoload/mathmenu.vim, and
doc/mathmenu.txt (see copyright) except use "mathmenu"
instead of "Vim".
You may find the following map helpful to handle folds such as are in this
help file: > nno <silent> <space> :exe 'sil! norm! '.((foldclosed('.')>0)? 'zMzx' : 'zc')<cr>
(just hit the space bar in normal mode and the fold will alternate between
being open and closed)
==============================================================================1. Contentsmathmenumathmenu-contents{{{1
1. Contents..........................................mathmenu-contents
2. Installation......................................mathmenu-install
3. Usage.............................................mathmenu-usage
Superscripting and Subscripting Maps..............mathmenu-maps
Greekify Map......................................mathmenu-mathify
The Menu..........................................mathmenu-menu
capitals........................................mathmenu-capitals
lowercase.......................................mathmenu-lowercase
superscripts....................................mathmenu-superscripts
subscripts......................................mathmenu-subscripts
fractions.......................................mathmenu-fractions
arrows..........................................mathmenu-arrows
grouping........................................mathmenu-grouping
misc............................................mathmenu-misc
operators.......................................mathmenu-operators
relationals.....................................mathmenu-relationals
sets............................................mathmenu-sets
box characters..................................mathmenu-box
The Keymap........................................mathmenu-keymap
4. History...........................................mathmenu-history==============================================================================2. Installationmathmenu-install{{{1
To install the plugin, type > vim math.vba.gz :so % :q<
If you're on Windows, your o/s doesn't come with a utility designed to
decompress gzip files. See vimball-windows for some ideas on how to get a
Windows tool to decompress gzip files.
==============================================================================3. Usagemathmenu-usage{{{1
This plugin provides three ways to help you select a math glyph:
* via a keymap (see mathmenu-keymap, keymap) > :set kmp=math< With the math keymap provided one may type ^0, for example, and get
a superscripted 0 (⁰). When I use this mode I use a map to toggle
between the math keymap and normal typing; that map is given in
mathmenu-keymap. To see the tables for all the keymapped
character sequences, see mathmenu-menu below.
* via menu with gvim (see mathmenu-menu)
These menus are active when one is in gvim's insert mode; then one
may choose a glyph from the menus. By default, its
DrChip.Mathkeys.[some category].[glyph] . One may change "DrChip",
the top level menu label; see mathmenu-options.
* via "mathify" maps (see mathmenu-mathify). This method is the one
that I myself most often use. With it one types characters such as
01234abc, selects it with visual mode (typically v or ctrl-v),
and then types ^ (for superscripting), _ (for subscripting), or
& (for substitute). The result for 01234 and ^ is ⁰¹²³⁴ and
for abc is αβψ.
The mathmenu plugin's glyphs are intended to be used with utf-8 encoding (try
typing :echo &enc; the result should be "utf-8"; see 'encoding') . If the
symbols herein don't appear correctly, and your encoding is utf-8, then it may
be that your font doesn't support the mathematical glyphs - I suggest that you
then try other fonts. I haven't found a good Windows font yet (ie. one that
supports _all_ the characters in the tables below) -- please let me know if
you know of one and how to install it if necessary, and I'll include that
information in future versions of this help file. I myself am using
"Luxi Mono Bold" with Linux. > set guifont=Luxi\ Mono\ Bold\ 10
('guifont')
SUPERSCRIPTINGANDSUBSCRIPTINGMAPSmathmenu-maps{{{2
There are two maps which take visually selected text and converts supported
characters to superscripts or subscripts, respectively. > Superscripting: ^ Subscripting : _<
For example: type > 1
and then visually select it (using V, v, or ctrl-v) and then type: > ^
The result should be a superscript version of "1": ¹
MATHIFYMAPmathmenu-mathify{{{2mathmenu-mathstart
The "&" key transforms visually selected roman characters (a-z and A-Z),
converting them to associated Greek characters. The "mathify",
superscripting, and subscripting maps are enabled with > :MathStart<
For example: type > abc
and then visually select it (using V, v, or ctrl-v) and then type: > &
The result should be a "math-ified" version of "abc": αβψ
If you would prefer to have mathmenu start up with visual-mode math maps
available, put MathStart into a ~/.vim/after/plugin/mathmenu.vim file.
In addition to the transformations into Greek characters, the following
characters are also transformed as shown in the table below: > +------+---+------+---+------+---+ | From |To | From |To | From |To | +------+---+------+---+------+---+ | | | + | ∑ | . | ⡀ | | - | ― | * | ∏ | q | ⠂ | | | | │ | . | ∙ | Q | ⠁ | | 2 | ½ | $ | √ | v| | ⋮ | | 3 | ⅓ | !>= | ≱ | v- | ⋯ | | 4 | ¼ | !<= | ≰ | v\ | ⋱ | | 5 | ⅕ | != | ≠ | v/ | ⋰ | | 6 | ⅙ | !> | ≯ | | | | 8 | ∞ | !< | ≮ | | | +------+---+------+---+------+---+<THEMENUmathmenu-menu{{{2
With mathmenuPlugin.vim in your plugin directory, a minimalist menu appears
as > DrChip.MathKeys.Enable
You may change the top-level menu label (ie. "DrChip");
see mathmenu-g:DrChipTopLvlMenu.
Once enabled, there are eleven subcategories (and a Disable). These
subcategories are only active when vim is insert, replace, or
ex- modes.
Capitals Fractions Operators
LowerCase Arrows Relationals
Superscripts Grouping Sets
Subscripts Misc
Each category contains a number of symbols which you may select with the
mouse. See mathmenu-keymap to learn how to use the keymap shorthand.
GREEKCAPITALSmathmenu-capitals{{{2
Name Keymap Character Name Keymap Character
Alpha GA Α Mu GM Μ
Beta GB Β Nu GN Ν
Psi GC Ψ Omikron GO Ο
Delta GD Δ Pi GP Π
Epsilon GE Ε Rho GR Ρ
Phi GF Φ Sigma GS Σ
Gamma GG Γ Tau GT Τ
Eta GH Η Theta GU Θ
Iota GI Ι Omega GV Ω
Xi GJ Ξ Chi GX Χ
Kappa GK Κ Upsilon GY Υ
Lambda GL Λ Zeta GZ Ζ
GREEKLOWERCASEmathmenu-lowercase{{{2
Name Keymap Character Name Keymap Character
alpha a α xi j ξ
beta b β omicron o ο
gamma g γ pi p π
delta d δ varpi vp ϖ
epsilon e ϵ rho r ρ
varepsilon ve ε varrho vr ϱ
zeta z ζ sigma s σ
eta h η varsigma vs ς
theta u θ tau t τ
vartheta vu ϑ upsilon y υ
iota i ι phi f φ
kappa k κ varphi vf ϕ
lambda l λ chi x χ
mu m μ psi c ψ
nu n ν omega w ω
SUPERSCRIPTSmathmenu-superscripts{{{2
Keymap Character Keymap Character Keymap Character
^0 ⁰ ^d ᵈ ^A ᴬ
^1 ¹ ^e ᵉ ^B ᴮ
^2 ² ^f ᶠ ^D ᴰ
^3 ³ ^g ᵍ ^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︵
U) ⎞ V) ︶
M) ⎟ V[ ︹
B) ⎠ V] ︺
U[ ⎡ V{ ︷
M[ ⎢ V} ︸
B[ ⎣ V< ︿
U] ⎤ V> ﹀
MISCELLANEOUSmathmenu-misc{{{2
Keymap Character Keymap Character
ARC ⌒ RC ⌉
QED ∎ LF ⌊
QED ‣ RF ⌋
INF ∞ __ ⎯
ANG ∡ -- ─
|... ⋮ == ═
... ⋯ HB ―
/... ⋰ VB ┃
\... ⋱ BB ‖
DU ⠁ SH ℋ
DM ⠂ SI ℑ
DD ⡀ SL ℒ
LC ⌈ SR ℜ
OPERATORSmathmenu-operators{{{2
Keymap Character Keymap Character Keymap Character
O\. ⨀ Scw ∲ P2 ″
O+ ⨁ Sccw ∳ P3 ‴
Ox ⨂ PD ∂
U\. ⨃ JN ⨝
U+ ⨄ TF ∴
IN ∩ BC ∵
UN ∪ PAR ∥
CAP ∩ NPAR ∦
CUP ∪ SUM ∑
SQCAP ⨅ USUM ⎲
SQCUP ⨆ BSUM ⎳
X ⨉ PRD ∏
MUL × RING ∘
1S ∫ BU ∙
2S ∬ AST ∗
3S ∭ LA ⁎
4S ⨌ SQRT √
US ⌠ CUBR ∛
MS ⎮ FORR ∜
BS ⌡ DEL ∆
S- ⨍ GRAD ∇
S= ⨎ NAB ∇
S/ ⨏ DIAM ⋄
So ∮ R/ ∕
SSo ∯ L/ ∖
SSSo ∰ P1 ′
RELATIONALSYMBOLSmathmenu-relationals{{{2
Keymap Character Keymap Character
<= ≤ >< ≷
\>= ≥ != ≠
<~ ⪝ ID ≡
>~ ⪞ EQV ≍
<< ⟪ JOIN ⋈
>> ⟫ NID ≢
~ ∼ O+ ⊕
N~ ≁ O- ⊖
R~ ∽ Ox ⊗
-~ ≂ O/ ⊘
~- ≃ O\. ⊙
=~ ≅ Oo ⊚
!~- ≄ +- ±
~~ ≈ -+ ∓
=\. ≐ PERP ⊥
EST ≙ PROP ∝
!~~ ≉ PREC ≺
<> ≶ SUCC ≻
SETSmathmenu-sets{{{2
Keymap Character Keymap Character
SUB ⊂ EMP ∅
NSUB ⊄ EL ∈
ESUB ⊆ NEL ∉
NESUB ⊈ C ℂ
SUP ⊃ H ℍ
NSUP ⊅ N ℕ
ESUP ⊇ R ℝ
NESUP ⊉ Q ℚ
LAND ∧ Z ℤ
LOR ∨ ALL ∀
EX ∃ * ∗
NEX ∄
BOXCHARACTERSmathmenu-box{{{2
Keymap Character Keymap Character
B- ─ HD| ┇
B| │ HBUL ┏
DSH- ┄ HBDL ┗
DSH| ┆ HBUR ┓
BUL ┌ HBDR ┛
BDL └ HC+ ╋
BUR ┐ HCl ┫
BDR ┘ HCr ┣
C+ ┼ HCd ┳
Cl ┤ HCu ┻
Cr ├ D- ═
Cd ┬ D| ║
Cu ┴ DUL ╔
HB- ━ DDL ╚
HB| ┃ DUR ╗
HD- ┅ DDR ╝
THEKEYMAPmathmenu-keymap{{{2
Each symbol is associated with a shorthand sequence of keys which are
supported by the math keymap. You may use these sequences after
enabling them with: > :set kmp=math
You may find the following two maps of use: > imap <silent> <c-F6> <c-o>:if &kmp == ""<bar> \set kmp=math<bar> \else<bar> \set kmp=<bar> \endif<bar> \echo "kmp<".&kmp.">"<cr> nmap <silent> <c-F6> :if &kmp == ""<bar> \set kmp=math<bar> \else<bar> \set kmp=<bar> \endif<bar> \echo "kmp<".&kmp.">"<cr>
These set the ctrl-F6 key to toggle between the math keymap and no keymap;
if you're accustomed to another keymap, just modify the maps above where
they say "set kmp=<bar>" to "set kmp=YOUR-PREFERRED-KEYMAP".
OPTIONSmathmenu-options{{{2mathmenu-g:DrChipTopLvlMenu
The variable g:DrChipTopLvlMenu = "DrChip." by default. You may
change this variable in your .vimrc so that the menus reside under
a different top-level name.
==============================================================================4. Historymathmenu-history{{{1
3 : Mar 04, 2010 * more symbols and maps
Aug 29, 2010 * included g:DrChipTopLvlMenu default value
2 : Nov 06, 2009 * more symbols and ex-mode support
Dec 02, 2009 * :MathStart command now starts mathmode
1 : Jul 28, 2009 * initial release
==============================================================================
Modelines: {{{1
vim:tw=78:ts=8:ft=help:fdm=marker:nomod: