Skip to content

Instantly share code, notes, and snippets.

@alexklapheke
Last active February 18, 2016 23:17
Show Gist options
  • Save alexklapheke/06213d295fbc7ca4cf39 to your computer and use it in GitHub Desktop.
Save alexklapheke/06213d295fbc7ca4cf39 to your computer and use it in GitHub Desktop.
Vim Keymaps
" Vim keymap for Bopomofo. Type standard Pinyin to get its Bopomofo
" equivalent. Use an apostrophe to force the completion of a syllable
" (if not using tone marks). This is necessary for, say re'nao (熱鬧),
" which would be incorrectly rendered as ㄖㄣㄠ (ren'ao).
"
" Maintainer: Alex Klapheke <alexklapheke@gmail.com>
" Last Changed: December 22, 2015
scriptencoding utf-8
let b:keymap_name = "bopomofo"
loadkeymap
" Initials
b ㄅ
p ㄆ
m ㄇ
f ㄈ
d ㄉ
t ㄊ
n ㄋ
l ㄌ
g ㄍ
k ㄎ
h ㄏ
j ㄐ
q ㄑ
x ㄒ
zh ㄓ
zh' ㄓ
ch ㄔ
ch' ㄔ
sh ㄕ
sh' ㄕ
r ㄖ
z ㄗ
z' ㄗ
c ㄘ
c' ㄘ
s ㄙ
s' ㄙ
" Full syllables
zhi ㄓ
chi ㄔ
shi ㄕ
ri ㄖ
zi ㄗ
ci ㄘ
si ㄙ
" Medials & Finals
a ㄚ
a' ㄚ
o ㄛ
o' ㄛ
e ㄜ
e' ㄜ
ai ㄞ
ei ㄟ
ao ㄠ
ou ㄡ
an ㄢ
an' ㄢ
en ㄣ
en' ㄣ
ang ㄤ
eng ㄥ
ong ㄨㄥ
er ㄦ
yi ㄧ
i ㄧ
i' ㄧ
y ㄧ
y' ㄧ
iu ㄧㄡ
in ㄧㄣ
in' ㄧㄣ
ing ㄧㄥ
yin ㄧㄣ
yin' ㄧㄣ
ying ㄧㄥ
wu ㄨ
u ㄨ
u' ㄨ
w ㄨ
ui ㄨㄟ
un ㄨㄣ
un' ㄨㄣ
ü ㄩ
v ㄩ
yu ㄩ
yu' ㄩ
iong ㄩㄥ
yong ㄩㄥ
ie ㄧㄝ
ye ㄧㄝ
ue ㄩㄝ
yue ㄩㄝ
yun ㄩㄣ
" Alveo-palatals
ju ㄐㄩ
ju' ㄐㄩ
qu ㄑㄩ
qu' ㄑㄩ
xu ㄒㄩ
xu' ㄒㄩ
jue ㄐㄩㄝ
que ㄑㄩㄝ
xue ㄒㄩㄝ
jun ㄐㄩㄣ
qun ㄑㄩㄣ
xun ㄒㄩㄣ
" Tones
1 ˉ (Included for consistency)
2 ˊ
3 ˇ
4 ˋ
5 ˙
" Punctuation
. 。
, ,
\\ 、
: :
! !
? ?
( (
) )
[ 「
] 」
" Keymap for typing IPA using X-SAMPA
" Maintainer: Alex Klapheke <alexklapheke@gmail.com>
" Last Changed: December 15, 2015
scriptencoding utf-8
let b:keymap_name = "IPA"
loadkeymap
" Vowels
A ɑ Open back unrounded vowel
Q ɒ Open back rounded vowel
6 ɐ Near-open central vowel
E ɛ Open-mid front unrounded vowel
3 ɜ Open-mid central unrounded vowel
3\\ ɞ Open-mid central rounded vowel
@ ə Schwa
@\\ ɘ Close-mid central unrounded vowel
{ æ Near-open front unrounded vowel
9 œ Open-mid front rounded vowel
& ɶ Open front rounded vowel
I ɪ Near-close near-front unrounded vowel
1 ɨ Close central unrounded vowel
I\\ ᵻ Near-close central unrounded vowel
O ɔ Open-mid back rounded vowel
2 ø Close-mid front rounded vowel
7 ɤ Close-mid back unrounded vowel
8 ɵ Close-mid central rounded vowel
U ʊ Near-close near-back rounded vowel
} ʉ Close central rounded vowel
U\\ ᵿ Near-close central rounded vowel
M ɯ Close back unrounded vowel
V ʌ Open-mid back unrounded vowel
Y ʏ Near-close near-front rounded vowel
" Approximants
P ʋ Labiodental approximant
v\\ ʋ Labiodental approximant
H ɥ Labial-palatal approximant
W ʍ Labial-velar approximant
M\\ ɰ Velar approximant
" Liquids & Trills
4 ɾ Alveolar flap
r\\ ɹ Alveolar approximant
l\\ ɺ Alveolar lateral flap
r` ɽ Retroflex flap
r\` ɻ Retroflex approximant
R\\ ʀ Uvular Trill
K ɬ Voiceless alveolar lateral fricative
K\\ ɮ Voiced alveolar lateral fricative
5 ɫ Velarized alveolar lateral approximant
L ʎ Palatal lateral approximant
L\\ ʟ Velar lateral approximant
l` ɭ Retroflex lateral approximant
B\\ ʙ Bilabial trill
" Nasals
F ɱ Labiodental nasal
J ɲ Palatal nasal
n` ɳ Retroflex nasal
N ŋ Velar nasal
N\\ ɴ Uvular nasal
" Obstruents
B β Voiced bilabial fricative
p\\ ɸ Voiceless bilabial fricative
D ð Voiced dental fricative
T θ Voiceless dental fricative
Z ʒ Voiced postalveolar fricative
S ʃ Voiceless postalveolar fricative
J\\ ɟ Voiced palatal plosive
C ç Voiceless palatal fricative
j\\ ʝ Voiced palatal fricative
s\\ ɕ Voiceless alveolo-palatal fricative
z\\ ʑ Voiced alveolo-palatal fricative
d` ɖ Voiced retroflex plosive
t` ʈ Voiceless retroflex plosive
z` ʐ Voiced retroflex fricative
s` ʂ Voiceless retroflex fricative
g ɡ Voiced velar plosive
G ɣ Voiced velar fricative
G\\ ɢ Voiced uvular plosive
R ʁ Voiced uvular fricative
X χ Voiceless uvular fricative
x\\ ɧ Voiceless palatal-velar fricative
" (Epi)glottals
>\\ ʡ Epiglottal plosive
? ʔ Glottal stop
?\\ ʕ Voiced pharyngeal fricative
X\\ ħ Voiceless pharyngeal fricative
<\\ ʢ Voiced epiglottal fricative
H\\ ʜ Voiceless epiglottal fricative
h\\ ɦ Voiced glottal fricative
" Ejectives
_> ʼ Ejective
" Implosives
b_< ɓ Voiced bilabial implosive
d_< ɗ Voiced alveolar implosive
J\\_< ʄ Voiced palatal implosive
g_< ɠ Voiced velar implosive
G\\_< ʛ Voiced uvular implosive
" Clicks
O\\ ʘ Bilabial click
|\\ ǀ Dental click
|\|\\ ǁ Alveolar lateral click
!\\ ǃ Postalveolar click
=\\ ǂ Palatal click
" Suprasegmentals
\" ˈ Primary stress
% ˌ Secondary stress
: ː Long
:\\ ˑ Half long
-\\ ‿ Linking mark
" Tones
^ ꜛ Upstep
! ꜜ Downstep
_/ ̌ Rising Tone
_\\ ̂ Falling Tone
_T ̋ Extra high
_H ́ High
_M ̄ Mid
_L ̀ Low
_B ̏ Extra low
_R ̌ Rising
_F ̂ Falling
_H_T ́̋ High rising
_B_L ̏̀ Low rising
_R_F ̌̂ Rising-falling
<R> ↗ Global rise
<F> ↘ Global fall
" Diacritics
` ˞ Rhotic hook
_0 ̥ Voiceless
_v ̬ Voiced
_h ʰ Aspirated
_O ̹ More Rounded
_c ̜ Less Rounded
_+ ̟ Advanced
_- ̠ Retracted
_" ̈ Centralized
_x ̽ Mid-Centralized
_= ̩ Syllabic
_^ ̯ Non-Syllabic
_t ̤ Rhoticity
_k ̰ Breathy Voiced
_N ̼ Creaky Voiced
_w ʷ Linguolabial
' ʲ Labialized
_G ˠ Velarized
_?\\ ˤ Pharyngealized
_e ̴ Velarized or Pharyngealized
_r ̝ Raised
_o ̞ Lowered
_A ̘ Advanced Tongue Root
_q ̙ Retracted Tongue Root
_d ̪ Dental
_a ̺ Apical
_m ̻ Laminal
~ ̃ Nasalized
_n ⁿ Nasal Release
_l ˡ Lateral Release
_} ̚ No Audible Release
_X ̆ Extra short
" Pinyin keymap, which adheres to offical spelling rules. Allows
" putting the tone at the end of each syllable.
" Maintainer: Alex Klapheke <alexklapheke@gmail.com>
" Last Changed: December 15, 2015
scriptencoding utf-8
let b:keymap_name = "pinyin"
loadkeymap
" Uppercase
A0 A
A1 Ā
A2 Á
A3 Ǎ
A4 À
O0 O
O1 Ō
O2 Ó
O3 Ǒ
O4 Ò
E0 E
E1 Ē
E2 É
E3 Ě
E4 È
Ai0 Ai
Ai1 Āi
Ai2 Ái
Ai3 Ǎi
Ai4 Ài
Ei0 Ei
Ei1 Ēi
Ei2 Éi
Ei3 Ěi
Ei4 Èi
Ao0 Ao
Ao1 Āo
Ao2 Áo
Ao3 Ǎo
Ao4 Ào
Ou0 Ou
Ou1 Ōu
Ou2 Óu
Ou3 Ǒu
Ou4 Òu
An0 An
An1 Ān
An2 Án
An3 Ǎn
An4 Àn
Ang0 Ang
Ang1 Āng
Ang2 Áng
Ang3 Ǎng
Ang4 Àng
En0 En
En1 Ēn
En2 Én
En3 Ěn
En4 Èn
Eng0 Eng
Eng1 Ēng
Eng2 Éng
Eng3 Ěng
Eng4 Èng
Er0 Er
Er1 Ēr
Er2 Ér
Er3 Ěr
Er4 Èr
" Lowercase
a0 a
a1 ā
a2 á
a3 ǎ
a4 à
o0 o
o1 ō
o2 ó
o3 ǒ
o4 ò
e0 e
e1 ē
e2 é
e3 ě
e4 è
ai0 ai
ai1 āi
ai2 ái
ai3 ǎi
ai4 ài
ei0 ei
ei1 ēi
ei2 éi
ei3 ěi
ei4 èi
ao0 ao
ao1 āo
ao2 áo
ao3 ǎo
ao4 ào
ou0 ou
ou1 ōu
ou2 óu
ou3 ǒu
ou4 òu
an0 an
an1 ān
an2 án
an3 ǎn
an4 àn
ang0 ang
ang1 āng
ang2 áng
ang3 ǎng
ang4 àng
en0 en
en1 ēn
en2 én
en3 ěn
en4 èn
eng0 eng
eng1 ēng
eng2 éng
eng3 ěng
eng4 èng
ong0 ong
ong1 ōng
ong2 óng
ong3 ǒng
ong4 òng
er0 er
er1 ēr
er2 ér
er3 ěr
er4 èr
u0 u
u1 ū
u2 ú
u3 ǔ
u4 ù
un0 un
un1 ūn
un2 ún
un3 ǔn
un4 ùn
i0 i
i1 ī
i2 í
i3 ǐ
i4 ì
in0 in
in1 īn
in2 ín
in3 ǐn
in4 ìn
ing0 ing
ing1 īng
ing2 íng
ing3 ǐng
ing4 ìng
ü0 ü
ü1 ǖ
ü2 ǘ
ü3 ǚ
ü4 ǜ
ün0 ün
ün1 ün
ün2 ün
ün3 ün
ün4 ün
v ü
v0 ü
v1 ǖ
v2 ǘ
v3 ǚ
v4 ǜ
vn0 ün
vn1 ün
vn2 ün
vn3 ün
vn4 ün
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment