From eebf02ada1db8a0f296279c45b3cd073857c8a3f Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 20 May 2018 10:06:39 -0700 Subject: [PATCH] deadkeys and ipa update --- .vim/luke/deadkeys.vim | 124 +++++++++++++++++++ .vim/luke/ipa.vim | 267 +++++++++++++++-------------------------- 2 files changed, 222 insertions(+), 169 deletions(-) diff --git a/.vim/luke/deadkeys.vim b/.vim/luke/deadkeys.vim index 87ca321..a419b3f 100644 --- a/.vim/luke/deadkeys.vim +++ b/.vim/luke/deadkeys.vim @@ -1,3 +1,10 @@ + +" Installation +" Source the file wherever you put it: +" so ~/.vim/luke/deadkeys.vim +" Map ToggleDeadKeys to whatever you want: +" nm :call ToggleDeadKeys() + let g:DeadKeysOn=0 function! ToggleDeadKeys() @@ -69,8 +76,68 @@ function! DeadKeys() imap 'u ú imap 'U Ú imap ' ' + + " under dot + imap .D Ḍ + imap .d ḍ + imap .H Ḥ + imap .h ḥ + imap .L Ḹ + imap .l ḹ + imap .M Ṃ + imap .m ṃ + imap .N Ṇ + imap .n ṇ + imap .R Ṛ + imap .r ṛ + imap .G Ṝ + imap .g ṝ + imap .S Ṣ + imap .s ṣ + imap .T Ṭ + imap .t ṭ + + " tilde + imap ~a ã + imap ~A à + imap ~e ẽ + imap ~E Ẽ + imap ~i ĩ + imap ~I Ĩ + imap ~o õ + imap ~O Õ + imap ~u ũ + imap ~U Ũ + imap ~n ñ + imap ~N Ñ + + " caron + imap >A Ǎ + imap >a ǎ + imap >C Č + imap >c č + imap >E Ě + imap >e ě + imap >G Ǧ + imap >g ǧ + imap >I Ǐ + imap >i ǐ + imap >O Ǒ + imap >o ǒ + imap >R Ř + imap >r ř + imap >S Ṧ + imap >s ṧ + imap >U Ǔ + imap >u ǔ + imap >V Ǚ + imap >v ǚ + imap >Z Ž + imap >z ž + endfunction "deadkeys() + function! DeadKeysOff() echo "Dead Keys: Off" let g:DeadKeysOn=0 @@ -133,4 +200,61 @@ function! DeadKeysOff() iunmap 'u iunmap 'U iunmap ' + " under dot + iunmap .D + iunmap .d + iunmap .H + iunmap .h + iunmap .L + iunmap .l + iunmap .M + iunmap .m + iunmap .N + iunmap .n + iunmap .R + iunmap .r + iunmap .G + iunmap .g + iunmap .S + iunmap .s + iunmap .T + iunmap .t + + "tilde + iunmap ~a + iunmap ~A + iunmap ~e + iunmap ~E + iunmap ~i + iunmap ~I + iunmap ~o + iunmap ~O + iunmap ~u + iunmap ~U + iunmap ~n + + " caron + iunmap >A + iunmap >a + iunmap >C + iunmap >c + iunmap >E + iunmap >e + iunmap >G + iunmap >g + iunmap >I + iunmap >i + iunmap >O + iunmap >o + iunmap >R + iunmap >r + iunmap >S + iunmap >s + iunmap >U + iunmap >u + iunmap >V + iunmap >v + iunmap >Z + iunmap >z + endfunction diff --git a/.vim/luke/ipa.vim b/.vim/luke/ipa.vim index c6cb509..038d574 100644 --- a/.vim/luke/ipa.vim +++ b/.vim/luke/ipa.vim @@ -1,257 +1,186 @@ -"m̥ +let g:IPAOn=0 -"ɱ +function! ToggleIPA() + if !g:IPAOn + call IPA() + else + cal IPAOff() + endif +endfunction -"n̼ +function! IPA() + echo "IPA macros activated" + let g:IPAOn=1 + imap ;nn ɲ̊ + imap ;gn ɲ + imap ;ng ŋ + imap ;' ʔ + imap ;sh ʃ + imap ;zh ʒ + imap ;xi ɕ + imap ;zi ʑ + imap ;ph ɸ + imap ;bh β + imap ;th θ + imap ;dh ð + imap ;cc ç + imap ;jj ʝ + imap ;gh ɣ + imap ;xx χ + imap ;fr ʁ + imap ;HH ħ + imap ;hh ɦ + imap ;vv ʋ + imap ;er ɹ + imap ;fl ɾ + imap ;bb ʙ + imap ;ih ɨ + imap ;ii ɪ + imap ;eu ɯ̽ + imap ;uu ʊ + imap ;uh ə + imap ;eh ɛ + imap ;oe œ + imap ;au ɔ + imap ;ae æ + imap ;aa ɐ + imap ;OE ɶ + imap ;ah ɑ + imap ;ba ɒ +endfunction -"n̥ - -"ɳ̊ - -"ɳ - -inoremap ;nn ɲ̊ - -inoremap ;gn ɲ - -"ŋ̊ - -inoremap ;ng ŋ - -"ɴ - -"p̪ +function! IPAOff() + echo "IPA macros off." + let g:IPAOn=0 + iunmap ;nn + iunmap ;gn + iunmap ;ng + iunmap ;' + iunmap ;sh + iunmap ;zh + iunmap ;xi + iunmap ;zi + iunmap ;ph + iunmap ;bh + iunmap ;th + iunmap ;dh + iunmap ;cc + iunmap ;jj + iunmap ;gh + iunmap ;xx + iunmap ;fr + iunmap ;HH + iunmap ;hh + iunmap ;vv + iunmap ;er + iunmap ;fl + iunmap ;bb + iunmap ;ih + iunmap ;ii + iunmap ;eu + iunmap ;uu + iunmap ;uh + iunmap ;eh + iunmap ;oe + iunmap ;au + iunmap ;ae + iunmap ;aa + iunmap ;OE + iunmap ;ah + iunmap ;ba +endfunction +" As of yet unimplemented: "b̪ - "t̼ - "d̼ - "ʈ - "ɖ - "ɟ - "ɡ - "ɢ - "ʡ - -inoremap ;' ʔ - -inoremap ;sh ʃ - -inoremap ;zh ʒ - "ʂ - "ʐ - -inoremap ;xi ɕ - -inoremap ;zi ʑ - -inoremap ;ph ɸ - -inoremap ;bh β - "θ̼ - "ð̼ - -inoremap ;th θ - -inoremap ;dh ð - "θ̠ - "ð̠ - "ɹ̠̊ - "ɹ̠ - "ɻ - -inoremap ;cc ç - -inoremap ;jj ʝ - -inoremap ;gh ɣ - -inoremap ;xx χ - -inoremap ;fr ʁ - -inoremap ;HH ħ - "ʕ - "ʢ - -inoremap ;hh ɦ - "ʋ̥ - -inoremap ;vv ʋ - "ɹ̥ - -inoremap ;er ɹ - "ɻ̊ - "ɻ - "j̊ - "ɰ̊ - "ɰ - "ʔ̞ - "ⱱ̟ - "ⱱ - "ɾ̼ - "ɾ̥ - -inoremap ;fl ɾ - "ɽ̊ - "ɽ - "ɢ̆ - "ʡ̮ - "ʙ̥ - -inoremap ;bb ʙ - "r̼ - "r̥ - "ɽ̊ - "ɽ - "ʀ̥ - "ʀ - "ʜ - "ʢ - "ɬ - "ɮ - "ɭ̊ - "ʎ̥ - "ʎ̝ - "ʟ̝̊ - "ʟ̝ - "l̥ - "ɭ̊ - "ɭ - "ʎ̥ - "ʎ - "ʟ̥ - "ʟ - "ʟ̠ - "ɺ - "ɺ̢ - "ʎ̮ - "ʟ̆ - -inoremap ;ih ɨ - "ʉ - "ɯ - -inoremap ;ii ɪ - "ʏ - "ɪ̈ - "ʊ̈ - -inoremap ;eu ɯ̽ - -inoremap ;uu ʊ - "ø - "ɘ - "ɵ - "ɤ - "e̞ - "ø̞ - -inoremap ;uh ə - "ɵ̞ - "ɤ̞ - "o̞ - -inoremap ;eh ɛ - -inoremap ;oe œ - "ɜ - "ɞ - "ʌ - -inoremap ;au ɔ - -inoremap ;ae æ - -inoremap ;aa ɐ - "ɞ̞ - -inoremap ;OE ɶ - "ä - "ɒ̈ - -inoremap ;ah ɑ - -inoremap ;ba ɒ +"m̥ +"ɱ +"n̼ +"n̥ +"ɳ̊ +"ɳ +"ŋ̊ +"ɴ +"p̪