diff --git a/Makefile.am b/Makefile.am index 4ba03475..df3bc795 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,7 @@ BINDIR=@bindir@ INCDIR=@includedir@/espeak LIBDIR=@libdir@ DATADIR=$(PREFIX)/share/espeak-data +VIMDIR=$(PREFIX)/share/vim pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = espeak-ng.pc @@ -70,6 +71,20 @@ SUFFIXES=.html .md .ronn .ronn.html: ronn --html $< +##### vim: + +vim_registrydir = $(VIMDIR)/registry +vim_registry_DATA = vim/registry/*.yaml +EXTRA_DIST += $(vim_registry_DATA) + +vim_addons_ftdetectdir = $(VIMDIR)/addons/ftdetect +vim_addons_ftdetect_DATA = vim/ftdetect/*.vim +EXTRA_DIST += $(vim_addons_ftdetect_DATA) + +vim_addons_syntaxdir = $(VIMDIR)/addons/syntax +vim_addons_syntax_DATA = vim/syntax/*.vim +EXTRA_DIST += $(vim_addons_syntax_DATA) + ##### documentation: src/espeak-ng.1: src/espeak-ng.1.ronn diff --git a/dictsource/en_list b/dictsource/en_list index 82b6160c..b482ef07 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -804,7 +804,7 @@ adher adh'i@3 adieu a#dju: adieus a#dju:z adieux a#dju:z -adios aDj'o:s +adios adj'oUs adjective $1 ?3 administrative $alt1 admirable adm@r@b@L @@ -1695,10 +1695,10 @@ dieback daIbak diehard daIhA@d dielectric daI@l'EktrIk diesel di:z@L -dieu _^_FR +dieu dj@ ?3 dilate $1 dilatory dIl@t@ri -?3 dilatory dIlato:ri +?3 dilatory dIlato@ri dilemma daIl'Em@ ?3 dilemma dI#l'Em@ digest daIdZEst $noun @@ -2163,7 +2163,7 @@ hiphop $alt4 hiya haIa# hmmm h'@m hmpf h'@mpf -hola _^_ES +hola 'oUla holistic $alt3 holme hoUm holster hoUlst3 @@ -2294,7 +2294,7 @@ interrogatory $3 interstice I2nt3:stIs intestine I2ntEstI#n inventory Inv@ntri -?3 inventory Inv@nto:ri +?3 inventory Inv@nto@ri interface $1 interlude $1 intermin Int'3:mIn // interminable @@ -2543,7 +2543,6 @@ metropolis m@tr0p@lIs // +pl. mausoleum mO:s@'li:@m mayhem meIhEm meant mEnt -meadow mEdoU medallion $alt3 medevac mEdIvak // medevaced mediaeval mEdI'i:v@L @@ -2931,9 +2930,9 @@ pigsty pIgstaI pilau $2 pilot paIl@t pileup paIlVp -piñata pi:n^'ata# -piñatas pi:n^'ata#z -piña pi:n^a# +piñata pi:nj'ata# +piñatas pi:nj'ata#z +piña pi:nja# pineapple p'aInap@L pinged pINd pinot pi:noU @@ -3066,7 +3065,7 @@ purist pjU@Ist purport $2 purportedly $2 puree pjU@reI -puttin pU?n +?3 puttin pU?n pyjama p@dZA:m@ pyrites paIr'aIti:z pythagoras paIT'ag@r@s @@ -3203,7 +3202,7 @@ résistance reIzIst'A~ns restive rEstIv respiration rEspI#r'eIS@n respiratory rI2spIr@t@ri -?3 respiratory rEspr@to:ri +?3 respiratory rEspr@to@ri respite rEspaIt ?3 respite rEspIt rest rEst // for rested @@ -3343,6 +3342,9 @@ semicircle $1 semicolon sEmIk'oUl@n semitone $1 senator sEn@t3 +señor sEnj'O@ +señora sEnj'O@ra# +señorita s,EnjO@r'i:ta# sens sEns // for sensible !?3 sentient sEnti@nt // ?? sepia $alt6 @@ -3377,7 +3379,7 @@ shenanigan SI#nanIg@n shepherd SEp3d sheriff S'ErI2f shew SoU -shiitake Si:t'A:ke: +shiitake Si:t'A:keI shillelagh S,I2l'eIl@ shiver SIv3 shone S0n @@ -3456,7 +3458,7 @@ spoonfed spu:nfEd spraycan spreIkan sproing sprOIN squirrel skwIr@L -?3 squirrel skw3:L +?3 squirrel skw3:l staccato $alt3 stepmom $alt1 stepson stEpsVn @@ -3949,7 +3951,8 @@ Hasting $alt6 Hartlepool hA@tlIpu:l Inverness Inv3n'Es Killeen $2 -Kirkcaldy kIRk'0di +Kirkcaldy k3:k'0di +?7 Kirkcaldy kIRk'0di Lambeth lamb@T Leven li:v@n Lincoln lInk@n @@ -4034,7 +4037,7 @@ Banjarmasin bandZ@m'A:sIn Barbados bA@'beId0s ?3 Barbados bA@'beIdoUs Barents bar@nt|s -Barisal bVrIsVL +Barisal bVrIs@L Bartolome bA@t@l@m'eI Basel bA:z@L Basotho b@su:tu: @@ -4796,7 +4799,7 @@ Micah maIk@ Michaela mI2keIl@ Michele mI2SEl Michelle mI2SEl -Miguel mi:Q'El +Miguel mi:g'El Mikhail mIkaIl Mildred mIldrI2d Mimi mi:mi diff --git a/dictsource/en_rules b/dictsource/en_rules index 120cf148..77620e1d 100644 --- a/dictsource/en_rules +++ b/dictsource/en_rules @@ -239,7 +239,6 @@ abling 'eIblIN ably eIblI _en) ab (l 'eIb -// XC) ab (le eIb _un) ab (le 'eIb _dis) ab (le 'eIb t) ab (leau ab @@ -540,6 +539,7 @@ &) ai (n_$w_alt2 I air e@ @) aire (_ 'e@ + @) airess (_ e@'Es _) ais (li aS _k) ai aI s) ai (d E @@ -680,7 +680,6 @@ @) algia (_ 'aldZ@ al (i_ 'A:l al (ity 'al -// _s) ali (va a#laI p) al (et al qu) al (@ 0l c) all (K O:l @@ -1038,7 +1037,6 @@ calend) ar 3 &) ar (diL06 3 %C) ar (d_ 3 &d) ar (d 3 -// &h) ar (d_ 3 &ch) ar (d 3 &k) ar (d_ 3 ll) ar (d_ A@ @@ -1305,7 +1303,7 @@ _it_separ) ate (_ @t _) ato (n a#toU _) ato (na %eItoU &) atory @t3ri -?3 &) atory (_ @to:ri +?3 &) atory (_ @to@ri _) at (riA eIt _m) at (riar eIt atrices 'eItrI2si:z @@ -2210,7 +2208,17 @@ _it_separ) ate (_ @t _pr) e (au i discr) e (tion E ew ju: + ren) ew (A ju: + AC) ew (A w + Ay) ew (A w + ACC) ew (AlC w + ACC) ew (All w + ACC) ew (Ay w + ACC) ew (ater w + ACC) ew (ein w + ACC) ew (ood w _s) ew u: + ch) ew u: ?3 d) ew u: ?3 n) ew u: ?3 t) ew u: @@ -2221,7 +2229,6 @@ _it_separ) ate (_ @t _s) ew (_ oU eway (_S3 weI j) ewe (l u:@ - e (work @) ez (_ =Ez .group ea @@ -2239,6 +2246,7 @@ _it_separ) ate (_ @t h) ea (dq %E _l) eaded EdI2d l) ea (den E + m) ea (dow E r) ea (dy E r) ea (dily E r) ea (died E @@ -2521,7 +2529,6 @@ _it_separ) ate (_ @t .group en _) en (@ %En en (_$w_alt1 En -// &) en @n &) eness (_S4 n@s &r) en (@ En Ah) en En @@ -3837,6 +3844,7 @@ _it_separ) ate (_ @t ?7 &) io (_ =i:oU io (_ i:oU b) io (logy aI0 + _aud) io I2oU card) io I2oU v) io aI0 io (li_ I2'oU @@ -4046,7 +4054,7 @@ _it_separ) ate (_ @t der) iv (e aIv yd) iv (e aIv _r) iv (er Iv - Cr) iv (er aIv + dr) iv (er aIv r) iv (el Iv r) iv (en Iv r) iv (et Iv @@ -4176,7 +4184,6 @@ multip) ly laI %C) le (y_ l &r) le (_ l legged lEgId -// Ab) le @L C) le (ton_ @L Ab) ler (_ l3 Ab) le (B_ l@ @@ -4716,7 +4723,6 @@ multip) ly laI &s) on (_ @n &t) on (_ @n &tr) on (_ 0n -// hl) on (_ @n nl) on (_ @n &el) on (_ @n &m) on (_ @n @@ -4873,7 +4879,6 @@ multip) ly laI or (amic @r &) or (ate 3r &) or (ative @-r -// @@C) or (_S2de 3 // suffix &) or (_ 3 ?8 @@) or (_S2d o@ // suffix ?8 &) or (_ o@ @@ -4977,7 +4982,7 @@ multip) ly laI w) or (e o@ or (um_ 'o@r &) ory (_ @ri -?3 @@At) ory (_ ,o:ri +?3 @@At) ory (_ ,o@ri ct) ory (_ =@ri ct) orily (_ =@r@li _st) ory o@ri @@ -5334,7 +5339,6 @@ multip) ly laI piece (_S5 pi:s pkg pi:keIdZ'i: // makepkg por (tray p%o@ -// _) post (@@P4 p,oUst // prefix poly (@@ p,0lI poly (@ p0lI pota (t p@teI @@ -5830,7 +5834,6 @@ multip) ly laI &) ships (_S5 SIps &) shipe (_ SIp &) shire (_S5 S3 -//?3 &) shire (_S5 Si@ sia (_ =zi@ C) sia (_ =si@ ?3 sia (_ =Z@ @@ -6024,9 +6027,8 @@ multip) ly laI tt (ia_ t ?3 &) ttan (_ ?n- ?3 &) ten (_ ?n- -//?3 &CC) ten (_ t@n ?3 &) tten (_ ?n- - Xe) ttin (_ ?n // gettin, lettin +?3 Xe) ttin (_ ?n // gettin, lettin ?3 &) tton ?n- _) two (@P3 t'u: ttu (r t@ @@ -6626,8 +6628,8 @@ contin) u ju: XC) y aI CC) y (n_ I y (na_ 'i: -// Cr) y %I _sC) y aI + @st) y (list ,aI _b) y (+ aI y (cin_ 'aI c) y (cl aI @@ -6787,13 +6789,12 @@ contin) u ju: En (atA @n En (dA_ 'En E (ndous E - Ener (_ _n@ - Ening (_ _nI2N + Ener (_ @n@ + Ening (_ @nI2N ?8 Ening (_ EnI2N Ene (_ i:n Ened (_S2 d En (g @n -// E (nt @ E (nC @ E (ning E E (nizA @ @@ -6927,7 +6928,7 @@ contin) u ju: _) é %I ée i: ée (_ 'eI - ê E: + ê e@ ä E ë E ï i: @@ -6944,8 +6945,7 @@ contin) u ju: ž Z þ T ð D -// ñ nj - ñ _^_ES + ñ nj _) ʻ (A ? // arabic diff --git a/vim/ftdetect/espeakfiletype.vim b/vim/ftdetect/espeakfiletype.vim new file mode 100644 index 00000000..af3abc20 --- /dev/null +++ b/vim/ftdetect/espeakfiletype.vim @@ -0,0 +1,3 @@ +au BufRead,BufNewFile *_list set filetype=espeaklist fileencoding=utf-8 fileformat=unix +au BufRead,BufNewFile *_listx set filetype=espeaklist fileencoding=utf-8 fileformat=unix +au BufRead,BufNewFile *_extra set filetype=espeaklist fileencoding=utf-8 fileformat=unix diff --git a/vim/registry/espeak.yaml b/vim/registry/espeak.yaml new file mode 100644 index 00000000..4b6553a7 --- /dev/null +++ b/vim/registry/espeak.yaml @@ -0,0 +1,5 @@ +addon: espeak +description: "allow syntax highlighting for eSpeak and eSpeak NG Text-to-Speech data files (dictionaries, etc.)" +files: + - ftdetect/espeakfiletype.vim + - syntax/espeaklist.vim diff --git a/vim/syntax/espeaklist.vim b/vim/syntax/espeaklist.vim new file mode 100644 index 00000000..0f434be7 --- /dev/null +++ b/vim/syntax/espeaklist.vim @@ -0,0 +1,38 @@ +" Vim syntax file +" Language: eSpeak Dictionary List Files +" Filenames: *_list, *_listx, *_extra +" Maintainer: Reece H. Dunn +" Last Change: 2016 Jun 19 + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn region espeaklistLineComment start="^//" end="$" keepend contains=espeaklistComment +syn match espeaklistLinePhraseEntry "^\(\(//\)\@!\)(.*$" contains=espeaklistEntryPhrase +syn match espeaklistLineEntry "^\(\(//\)\@!\)[^?(].*$" contains=espeaklistEntryWord +syn match espeaklistLineConditionalEntry "^[?!].*$" contains=espeaklistEntryConditional + +syn region espeaklistComment contained start="//" end="$" keepend contains=@Spell + +syn region espeaklistFlag contained start="\$" end="[ \t\r\n]" skipwhite nextgroup=espeaklistFlag,espeaklistComment + +syn region espeaklistEntryConditional contained start="^[?!]" end="[ \t]" skipwhite nextgroup=espeaklistEntryPhrase,espeaklistEntryWord +syn region espeaklistEntryPhrase contained start="^(" end=")" skipwhite nextgroup=espeaklistEntryPronunciation +syn match espeaklistEntryWord contained "[^ \t\r\n]\+" skipwhite nextgroup=espeaklistEntryPronunciation,espeaklistFlag +syn match espeaklistEntryPronunciation contained "[^ \t\r\n/$!][^ \t\r\n]*" skipwhite nextgroup=espeaklistFlag,espeaklistComment + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet + +hi def link espeaklistComment Comment +hi def link espeaklistFlag PreProc +hi def link espeaklistEntryConditional PreProc +hi def link espeaklistEntryPhrase espeaklistEntry +hi def link espeaklistEntryWord espeaklistEntry +hi def link espeaklistEntryPronunciation None +hi def link espeaklistEntry Identifier + +let b:current_syntax = "espeaklist" +" vim: ts=8