ÿØÿà JFIF    ÿÛ „ !.%+&8&+/1555$;@;4?.451 4,$,44444444444414444444444444444444444444444444444444ÿÀ  á á" ÿÄ     ÿÄ ?    !1AQaq"2‘¡±ÁðBRbrÑá#‚’¢²3S CñÿÄ   ÿÄ !    !1QAa‘2ÿÚ   ? 5˜Z¯V¦cø)›t/? z¨±>Õ5€¶‹Á¤·¼z¼Ü¬+ñ®v¤¨_ˆR­BFn©—˜ý®ç̝P8gýt·ÉSTŦˆìät?þé¼íìN/Þa)ì–í6ô… Ï¿øÃj´¿KÇü]ÿ ªô¹-eKànëÕHTx}ýSÜ›ÿ ”7Ø×&µ<¦  ¥ÑO¶[Ù¯ä¨ÞÃÿ PZ-¬;#õ|•oaÿ ©CìÞz3˜öː/¤­ñTûIØ}š^ mÓ%ªxˆ¥ÉŸu=Z+ISe¿45™¼u;ú&WØ÷€æßQ™®{|íx*TC“#ZŠìZ§²‹ 6pv…³¿¡äª*áZÐ%ÒOáˆo"x«OHk w±æ+¬V(kMúŸ5Vö«$ ÁrÏbàb57/luR ¸ÑÛj Òµì`Мq­û žICÀÊ•©4€Âcà¨Ï€O´<èÐ:›ù(Ë^L8þ‘ÍÌ#¸Ð_Ì©ÙK(Öz 4¬û+¸;ü’V’84‘¬ÃŽ:[â‡ÔÌáõp¢~§ªlæ£ö{®G>J¼"°‡7¯ÆÉèßû ‹É‹§ÁòÃýâßî ^ƾÙõ‹×óH#«LP½ïX=xÑÍ$|W?•~• îëÔ©ª‹ {ÝT…Kÿ ”hûâá)J*ö˜–ÔU;iÇ€/ ÆþjóZ\ýwØ=Ìm ºèËL9 ýèÆð/¨’¥öo=nË.%Îì ŽÕ¯È|{Oj²ƒE6e/ßdÄõ²Ìâ1O®ò×TsəԸhOMýíMˆ¿¼H˜l²,7Â¥#MF/Úf°Ö½± ¸–dr‹NýÊ íjqx{œÉ ä-È ¦ øÄër¨q°ð †nцýÑÄÆ’mä…n<0È™;ÁÝá¯ÁZƒ7FÀmì­ É&9ˆîéi¶ùN§Y• ÃZãAâ?•‡©‰ , ó¾IŸŠc1 4â&y­&pŠ­6;M À 0¹qç»p.á …ŸÅáK@%6·y6ƒ‰3?”úºŽ‰éX5ªPT §µ!=Mž«Ú½‹ÅgÂSâÉaþÓoö–¯ÁÔìR>5éÿ üs¶ÆUcÌ kÇR ]ÿ ù¬¼«VŽ;Â|‡~¢¦”ÏŰæ {L™Õ°Óv¹ò¸írޡעCÃ!íVÕ {¶»sŒNPg/ "uÕbkm²“$ďå¿é¹§°½æz¯6 †s¿!s–wÚÝ“™Œ °.ûj>·+™Òa…©Œ&rÝÎtÛë긪Ît’LAVp%c Úý[ÄzJ¾ÇàXXç@˜ó<êL]·T˜¾¥1Ó©V‡g´æ½¦Ý@¹óø!_@´ÞâSÁ —S3™•& ]@JHÚý©ZŽ €×æÔr»Áf!‡yÞ4Mv*èÓã_{‘åóUuљØ«Oïé*®EvÑ Œ÷‡U \"㪒ÍK+À 4“M¡ï:0¥5í!'<@î´”>Ç»&Z–ïCCV˜Ì5Šo&îhè.žû |ÓK©h$s6KìŒëã)¹hI¦GïOåóI;ììü#É$Š0…Ææ¥TØ.5­¾gn´ “ÂÖ\:hœ89G)J@„}œ:’Ò{/Š"¦_Æ×7Æ3VÇŠÊa]ÚŒÙ€Ä–=®uÁßâACZƒ§§£ Qnâ:«,×{tyø¬iÛcœÜÄ€H½ÄÍCk´÷šß .W'b¤Íåh]÷€=,Žv×cÚEÚHXJX¶îo¨FÒtèöŸ>ªª6[J®Fµ£sGÁeqõfe\íjÒÐïÄÐGˆe1Ø‹.Ø”‘Ëuø Y­ˆÜ ŽG|zùªüMpDnQWÄ”%JŠ™)â*p@Örš«ÕT2Ð%ˆG#ª„ ·¤!°ŸOTÂT¸aÚ%4&h™LµšØüÐ.F¿²ÐÞ_Ç‚¾ÅÃaÜ÷09Æ q€öy˜v‡85õN÷]¬äѼóS{°_MެúÔ#°Ç¸0åÞè2ëôPcvÆw9®ií1Ä8F™˜à‰´+‰Ik1òÝ7“Ñ×ÒsÝ\x‚h`ÞÑ`ó"|µEcý£n˜h`}GÞ !±ù²Ápü²ß6 0ïi󜵩SÈÇ7˜-ÕURO˜¦´f$ªž-Í6(œ}<„ éc øs]ŽŽ„*—¾ ìdŽ„)méª\¿êÎIg¾ØÞ~I#C/¼¼´EÁÈŽi8“©õådô·>euä ƒ'Ê×लR1ÉJE1ÐAát`t;ÇР%Ý<‡¥„ÍÆ`×Oyó)õiI€ñQaŸ4Ûù\áàaÃÔ¹HÃu¹*k€¦<„e S‡&õÏ B!ŽhüÞ`yj}mªf×\¿ Ç~æ­9‡û\՞Ǖg²1Žû5V7 !àöšm° c`ܬøÇìµÒ'P"?…´Ö,"§^•õލsÔ)6˜sæéÍR¼ ò|Sl”‹7 nPW Gòú÷½§O¯‡„l¡kSÞŒr½PÊ@æ¢pŽ-mÿ #Ÿ˜Àº¶Áä¦;ïÔæ$1££`“Õ>„—·ž)ßð³ñ#Ï Ô$¶œ‰ÊE‹À;÷º ¯«P:Ñ”8–IÊtpÞ3ª“>ê“þës4ò2OÏÕ­±zô†Õ§‰.÷ä¸;¿˜“'œ›žª}«Œ{ª±Ì 9ÔóÞÕ‡0 $íWV3Üì¬ —@kÝ4@¿r¼±½¬™›?øØæ´'Áé®CË3-g$˜ö‡×auÚi´Žp/êÛ æF›Ú2v‹ã¿¿,nB1̨ƃqÞa5͝@&Æû“él÷ \C²½UÍc ¯k×¢U ÖéQå™—-r wô ÞÏ<Ò=&=ÿ Ôê Òêˈt,i—;LîÜ á¸*ÚÃ1$êL•LÍ <É)ýÐà’ ;F™{ƒ™˜€&'}‚ãÄK`¡ÞT@I;®žZóè‚s’7®°›+§O­Åq©é»²9<Ô J ¼9O’HL»Ùïì¸rk¼Ž_ý‘TŸu[²ßÚŒ·ü÷B%¯E ŸÔX5êO´ Ç•€’I0 ÉJX` ñ¹õ%;µŸD‘«´€àwÒ™U ûئžÖö\×®×´8 ½‡ºÐÆÓ§?Àkmœ=;d5*@-ì0F Rªýš[Ü6âö̃ڸr*KA9· u*µæ£?U¸Âêí†8@¦X4 e-ò„0s{ HâUpU?¼mñRa°®a%Ð'tÉ×’\¾ÊÉ]t›h>·(Ë@R¼¡Ãt h}’O÷au<+nT…Ö…MӐ??Óe95 q>í/;&JSû °¯ÊéÞ øƒ*Ã2½Ài&:nôUl=¾¿5eˆ3”ñc|Ú2V”>„»&eE;«ÚäC p¢Û úy 9š[ŒÌx¼擼A&DåÒ¯ˆ¤ÀÌ;"˜ ÏQä¸åhÊ}Ûq«Û0WžÒ|»€ø®öCm5•\ÇÀ§Pe3£]0ÃàLDÉ‰1øªxjgwT‚÷¿LΨK‹›ùs—xˆÜ±µ kæ¸f‰‰ÜGk/LÛØ6d9ò¶ùA{ƒA3š/¬D¬khÓk‰`˜"㯒r¿±Óã jx‡°e}<Ñø\3y:'À•/h½Í€Ç4~g ?Û(¼]v‘ªlKÎâ~?O‚W%{Ì:“'©úNq¾›úo(X’¥¯ˆ nFê{Ç€ü?º'ë ø‹ì Þ09ŒÌç9Æ —ËC`j@ÓÄ(+a‹un¸#ÂꟋ{K`‘ÑÍÍ'à´»/Û,KW;Þ4²þð ï Nm|~fGÏ(…³Ã)«1ö­Õ ¥‡¨©ƒÃ™ü-s=à=U66Ï«Ýc蓦W¹íž®›nÔ%êÇìŒ<#Ü×84ån®Ð ÒåOC` ñânÑs‡¢ç 1õ%Îhì½Ã½® e:ݼUZo™`  ÅZŸŒÊ«ê1ÏÄo$q¹Þ€©ˆhÐÉä¯ñ[!…Ú˜àJ:x2$Íß&PåT£6ç— ‡Í*4Ýšçjÿ ‰É nófÐ ó(L5C•åÆ\rMÒ@ò }y-W}™üýVù—ú¢=Ù”c®‘< M ž ´Phr ¦©TD ‘ù.$´÷O‡‘V2Æò.=IUŒ=ž‡â¬i™aþÓåÙ?òUø'ØÖ•.~* šTŒ!•-×áºTâ®ä#õü'´ eýlYÅÓeÕKÂrT"CÚ@u!Óxƒ{š3€}1¿(r}%«nËamjÑ%ÑNEò v ˜à  σöK³,*º.àzù¨™Ó ÚçâU¦*¿ 9{%Ö¹ njûdaXöb) kÛÆ±ûÓ\°M7ˆÂ=û›ç¿Ã‚­V»Cg–8ÙêE- j)k$º`Ã-ùEýeBÆÇ]c¡°ñty&Òd0nõ'¡W+ƒ*|–øµFa\GQªEAÔp5\Ǽ·¼Ç8·õ -â§Ú[ ‡ uZeÖ 3}×d'+¹:ð+K†Û®s!Ï$úe€<Û”x)1»a­¡LC]¸µík…ÚàA»AYº{†ªS[¦5HÒ7ù --,ísòDØ€èk ÞÀîÜ ò@â( ËNˆë›4ô½•/¦o‡€Û7 ê•ÆêòðÜy'Án½µ á˜ݦ ndeo…[ì¶Ê,¥R³Ä=À±—–ß;£™´ñSâ*g§”ïaið‘Jå~™ÓÞ ß³Õ¢»8x埒²52>AÊb&-÷\7´éÄù€T˜,w;3{ï˜k…à¹ÄqÀ«œ{€\ ˆ¾[´¨јr &Úé„Ívˆ±8†¿]|¬ņ4I×pÞS1ÈÖz‰#Ìv‡G!YNògñ:màTz¢Ý1ô©^O=~ë|5Bã™ç•¼µõ•bÆ@úÕS¬ÈŒ#¬zünrŸ û” Z²•èðV"ÁHÚý©wÝ €7¼Ìu1hÑa3Éä û f$o¿É ™Ú›ÝçnpÒ3äÌ3†Í§,Äï]$‰/pê †«À¼¸e9­Æê_C]žƒ·ý·frÁN«, E=›Çq -‰öŒ:aÏ¿±í&£Í:-} 84‘ÿ eƒQÑeëSsuiA ³g㟥ú£?ÿ ʼn*”“÷aühe:ÊWa@ÒÞk±eØ] F Ô—r.åä˜ @ö¥ªZoÐýYL·¥S²G/‡ñ <~*ZÆ´è>JlòàÛÆ½ÿ 窘ìGN¢:I®KšJp/`íIÁÀõ#Ä-€ö­šµŒoF4|ÆQØÆ@Ì|£Ô…¢À{9˜è½Üó›€ôYÒÎYsið;ís¤€à²ˆ‚4qÉVŒI$ ‰"° æµ8cXGjœˏ¡Aâý•ËÜ¢ûï e·çLx']á"oÅÎê3¯Ç—¹”ó0nå‚âg{Œñ> S´˜îè°g238‚ãköÝfÚd´6Ò€;ò÷±¢™¼›º ¢Æ'¥Ðx'e¬ç ]bÈÆV¢ó‹kýBO ðÊâ$Ÿ!×T 3Mýמ žìٍàÌü‘8÷€àæØ8æ©6‰©L´«…oãpð„~Çk‰!ñ;‹”ÛžÍ àž±z Ÿôû øŸÝužÏ;ÿ #|u6™Þ¬ÚˆÐõA4¶â|ôl|Ê2ŽÇ¤ÝÅÇY.<#Aí.k§hóF‚”Y; M½Ö4hŸ4&›­¿tès´%FìL¥£Ãk‰ÇT¤haÁ¤ÚxfÉ`ÑìË›>i 3t‚:,–+^÷´–{Û–Nxi"x‘Ûg î¨>¥Õ܁ùZH,2Û“:8xÊ¢Çí9.É-Ìâã-=çjwµS˜dütžçwýGòú®®ûº_ˆýx$–¡ãøO EÚÛÏ÷R„×w+3£Á£öUMyR²¹âŒ°š›¸Ñãò9§Ó_Dl+Ùßc›úšGÅÌc†Ž!Ko=¶.‘Îÿ c²(2®V mª.ÿ ¹B›¹å ù„öŸSV>™ü¯$y:G¢Z×àøúdî¹û­·ýÇ´:•c LÍõi_‹ö+ÎæGÊè>OŠ•äž´§Þ{X}¨1ÚTc›»Qþ•êô°t¿OP?eæ~É{5]•ÙR£r5†nZ\ã@ &îJõ ¾àC°þV>fé¥/ü5ñÊIº_é5 ;e­h<@ Ä&æÃëE%;X,ÒãÆÞ`Oò¦kŸm#˜!ÀyÄ¢| óLšò¥Ä` ¶R=|ÈCâh5ò3DˆïF†ðÒ#ÅìÛœ?¸yhBãœí ZxßÎÄhºRK„`Þödvײ™ÀÈÑÒgŒuY w³%†ƒÓzõ ÖÏp‚dH®¦A´ù§»ÓÇMæ~)ˆð‡û:ù&Ä •vGD´À n ݇¼Ö8Fö óáà£~Ë¥x`oK|Ä?fxiØü%pìR>éò+Û±éÎ>núlFŤ'tq8LZÏvÃ?„¡ß±È⽆¯³íü@x|PöUäèØã¡ð‚ŒAìÏ"vÍwóŸÍ{ ý0.z È•Ö{,N¡£¡ŸKÕÙž>Ýœþ ÍÀ°<×EA!Å‚D™IúOÍ¡>ôG}Â` ÍßkÜL™Ž Þð™ {IøF²¹òQ3&!ÃÂÞz.d&Ï-sH¸,Ôõ˜ŽP€ 77ˆÝ¼ÊëÜw =cÕ Ú,ØÐ5ÎYÐ)ì´öœgŒ[¤ßv㙑8心>h]§µháYš£²ºÑ.{Ï7Sð•?´~×SÃKýJÛ˜ ™Íäiúu<µX¶1õ^kâçIÑ£sZ4h>j*ÔšD:4­¿_ ÷¸ Õxæÿ ¸?Mù _•­ÊÐ ä ÷ý ÑwL œ­ïnTkÛUÍN©ë:¦fV ¶ÜÔÜMªÅâA½–¿R×TXš-%iTÊT•‡Ù‚JôϐZxWÑè‰f‰òG º ×Õû2aZ7OU3[“×AT–ÞŒ…-‘¤”Ì ì&(ˆ¿­•ƒkï’:ðY¦W‘ Å)“†‘˜³Åtcø˜ñTÂwÚÇ4|üLÇªí–v- qˆèU qPE.†â‘˜µ Æ,ÐÅs]8¾„oúÑ i>ÜxxÈó)ƒ ´æÁâØ$À‰vžŸf$Ž |ãw;ÀÁIJ»b` {¦Ó¤Ú$©YÀ‘n@Óïž«9J¼êG m¤ ܯ¹ÌW4€ÐÒÅÛ‡#褕Ÿn-?í|с¥÷Ú¹¬'´ÞÜ9ÓK `hê£SÄSà?7—Wí_´…óB›»:=Ãïq`<8ñÓŒÑlú2d¬ê³£hÖ[l|$vÝro~'R®‰§°ñmY ͧäP |PUª¹·:3Œ[Û{Xÿ ºâ@‚W–Äé u‚ ¯´*=íή.pûÒdt @G‰¬ s¸ ëÉücr ÞæÑ¨Ê@>¤¢Ö±. Þ'¯°ÌME[YéïĵÂCå½ Ué©Áû'Ê9%eÔðNU”ë‘ÌsD3/®+UI˜9h.WC”빓$#:pz:YÓ ¿xž* ³$Í +$kñAŠ‹†¢ Uê>¸)_š¬÷©ßAÂÔb9ÇU ¯¾á•9¯ÏÏ÷O÷¼¼Fähal1‰3Ì[Ïr•´UCksNÐ] R‘¸¥H+§Šé†c©vÖÞ0iÓ76s†î!§=ß ¼~Ô'°Ãmäoäš³ªøi1úÉ)³yV8 CLÄØÁ‘WYïi€H6ÖÑiámø^ÈY´°Ñ7¥Û*—Ñ©L«Qƒï—Ùrÿ ›£Ð*š¸ˆL©ˆ$ˆ ÷¾D§9È®«qbqC)–ˆïv´çñsÑVT­Ø, <àïºÀO«Jý·õ àfPìð .wFšir´þ’2_Y *Æ€x\« ì€9š@ Ž|F⇥ˆkZ@hÖÄ0t¿-<“‹qµ¾*ZL¤Ú)&BJpÓF5=$„at*Zš$’ÑtdûÝRI1 2މ$€$I$#‰SÞ’Hë¬ï;Á$¡t$’`<(ñÇt)$‡Ð.Êf¢X’Kt=Éé$‚ˆªè¢oÝëòI%Rgcª÷ŠyI%¡‰ÿ !ñ)´õ $¤ Ô’IIGÿÙvim9script # Vim functions for file type detection # # Maintainer: Bram Moolenaar # Last Change: 2022 Dec 14 # These functions are moved here from runtime/filetype.vim to make startup # faster. export def Check_inp() if getline(1) =~ '^\*' setf abaqus else var n = 1 var nmax = line("$") > 500 ? 500 : line("$") while n <= nmax if getline(n) =~? "^header surface data" setf trasys break endif n += 1 endwhile endif enddef # This function checks for the kind of assembly that is wanted by the user, or # can be detected from the first five lines of the file. export def FTasm() # make sure b:asmsyntax exists if !exists("b:asmsyntax") b:asmsyntax = "" endif if b:asmsyntax == "" FTasmsyntax() endif # if b:asmsyntax still isn't set, default to asmsyntax or GNU if b:asmsyntax == "" if exists("g:asmsyntax") b:asmsyntax = g:asmsyntax else b:asmsyntax = "asm" endif endif exe "setf " .. fnameescape(b:asmsyntax) enddef export def FTasmsyntax() # see if the file contains any asmsyntax=foo overrides. If so, change # b:asmsyntax appropriately var head = " " .. getline(1) .. " " .. getline(2) .. " " .. getline(3) .. " " .. getline(4) .. " " .. getline(5) .. " " var match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s') if match != '' b:asmsyntax = match elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library')) b:asmsyntax = "vmasm" endif enddef var ft_visual_basic_content = '\cVB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' # See FTfrm() for Visual Basic form file detection export def FTbas() if exists("g:filetype_bas") exe "setf " .. g:filetype_bas return endif # most frequent FreeBASIC-specific keywords in distro files var fb_keywords = '\c^\s*\%(extern\|var\|enum\|private\|scope\|union\|byref\|operator\|constructor\|delete\|namespace\|public\|property\|with\|destructor\|using\)\>\%(\s*[:=(]\)\@!' var fb_preproc = '\c^\s*\%(' .. # preprocessor '#\s*\a\+\|' .. # compiler option 'option\s\+\%(byval\|dynamic\|escape\|\%(no\)\=gosub\|nokeyword\|private\|static\)\>\|' .. # metacommand '\%(''\|rem\)\s*\$lang\>\|' .. # default datatype 'def\%(byte\|longint\|short\|ubyte\|uint\|ulongint\|ushort\)\>' .. '\)' var fb_comment = "^\\s*/'" # OPTION EXPLICIT, without the leading underscore, is common to many dialects var qb64_preproc = '\c^\s*\%($\a\+\|option\s\+\%(_explicit\|_\=explicitarray\)\>\)' for lnum in range(1, min([line("$"), 100])) var line = getline(lnum) if line =~ ft_visual_basic_content setf vb return elseif line =~ fb_preproc || line =~ fb_comment || line =~ fb_keywords setf freebasic return elseif line =~ qb64_preproc setf qb64 return endif endfor setf basic enddef export def FTbtm() if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm setf dosbatch else setf btm endif enddef export def BindzoneCheck(default = '') if getline(1) .. getline(2) .. getline(3) .. getline(4) =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA' setf bindzone elseif default != '' exe 'setf ' .. default endif enddef # Returns true if file content looks like RAPID def IsRapid(sChkExt: string = ""): bool if sChkExt == "cfg" return getline(1) =~? '\v^%(EIO|MMC|MOC|PROC|SIO|SYS):CFG' endif # called from FTmod, FTprg or FTsys return getline(nextnonblank(1)) =~? '\v^\s*%(\%{3}|module\s+\k+\s*%(\(|$))' enddef export def FTcfg() if exists("g:filetype_cfg") exe "setf " .. g:filetype_cfg elseif IsRapid("cfg") setf rapid else setf cfg endif enddef export def FTcls() if exists("g:filetype_cls") exe "setf " .. g:filetype_cls return endif if getline(1) =~ '^\v%(\%|\\)' setf tex elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' setf rexx elseif getline(1) == 'VERSION 1.0 CLASS' setf vb else setf st endif enddef export def FTlpc() if exists("g:lpc_syntax_for_c") var lnum = 1 while lnum <= 12 if getline(lnum) =~# '^\(//\|inherit\|private\|protected\|nosave\|string\|object\|mapping\|mixed\)' setf lpc return endif lnum += 1 endwhile endif setf c enddef export def FTheader() if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1 if exists("g:c_syntax_for_h") setf objc else setf objcpp endif elseif exists("g:c_syntax_for_h") setf c elseif exists("g:ch_syntax_for_h") setf ch else setf cpp endif enddef # This function checks if one of the first ten lines start with a '@'. In # that case it is probably a change file. # If the first line starts with # or ! it's probably a ch file. # If a line has "main", "include", "//" or "/*" it's probably ch. # Otherwise CHILL is assumed. export def FTchange() var lnum = 1 while lnum <= 10 if getline(lnum)[0] == '@' setf change return endif if lnum == 1 && (getline(1)[0] == '#' || getline(1)[0] == '!') setf ch return endif if getline(lnum) =~ "MODULE" setf chill return endif if getline(lnum) =~ 'main\s*(\|#\s*include\|//' setf ch return endif lnum += 1 endwhile setf chill enddef export def FTent() # This function checks for valid cl syntax in the first five lines. # Look for either an opening comment, '#', or a block start, '{'. # If not found, assume SGML. var lnum = 1 while lnum < 6 var line = getline(lnum) if line =~ '^\s*[#{]' setf cl return elseif line !~ '^\s*$' # Not a blank line, not a comment, and not a block start, # so doesn't look like valid cl code. break endif lnum += 1 endwhile setf dtd enddef export def ExCheck() var lines = getline(1, min([line("$"), 100])) if exists('g:filetype_euphoria') exe 'setf ' .. g:filetype_euphoria elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1 setf euphoria3 else setf elixir endif enddef export def EuphoriaCheck() if exists('g:filetype_euphoria') exe 'setf ' .. g:filetype_euphoria else setf euphoria3 endif enddef export def DtraceCheck() if did_filetype() # Filetype was already detected return endif var lines = getline(1, min([line("$"), 100])) if match(lines, '^module\>\|^import\>') > -1 # D files often start with a module and/or import statement. setf d elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1 setf dtrace else setf d endif enddef export def FTe() if exists('g:filetype_euphoria') exe 'setf ' .. g:filetype_euphoria else var n = 1 while n < 100 && n <= line("$") if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" setf specman return endif n += 1 endwhile setf eiffel endif enddef export def FTfrm() if exists("g:filetype_frm") exe "setf " .. g:filetype_frm return endif var lines = getline(1, min([line("$"), 5])) if match(lines, ft_visual_basic_content) > -1 setf vb else setf form endif enddef # Distinguish between Forth and F#. # Provided by Doug Kearns. export def FTfs() if exists("g:filetype_fs") exe "setf " .. g:filetype_fs else var line = getline(nextnonblank(1)) # comments and colon definitions if line =~ '^\s*\.\=( ' || line =~ '^\s*\\G\= ' || line =~ '^\\$' \ || line =~ '^\s*: \S' setf forth else setf fsharp endif endif enddef # Distinguish between HTML, XHTML and Django export def FThtml() var n = 1 while n < 10 && n <= line("$") if getline(n) =~ '\\|{#\s\+' setf htmldjango return endif n += 1 endwhile setf FALLBACK html enddef # Distinguish between standard IDL and MS-IDL export def FTidl() var n = 1 while n < 50 && n <= line("$") if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"' setf msidl return endif n += 1 endwhile setf idl enddef # Distinguish between "default", Prolog and Cproto prototype file. export def ProtoCheck(default: string) # Cproto files have a comment in the first line and a function prototype in # the second line, it always ends in ";". Indent files may also have # comments, thus we can't match comments to see the difference. # IDL files can have a single ';' in the second line, require at least one # chacter before the ';'. if getline(2) =~ '.;$' setf cpp else # recognize Prolog by specific text in the first non-empty line # require a blank after the '%' because Perl uses "%list" and "%translate" var l = getline(nextnonblank(1)) if l =~ '\' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-' setf prolog else exe 'setf ' .. default endif endif enddef export def FTm() if exists("g:filetype_m") exe "setf " .. g:filetype_m return endif # excluding end(for|function|if|switch|while) common to Murphi var octave_block_terminators = '\' var objc_preprocessor = '^\s*#\s*\%(import\|include\|define\|if\|ifn\=def\|undef\|line\|error\|pragma\)\>' var n = 1 var saw_comment = 0 # Whether we've seen a multiline comment leader. while n < 100 var line = getline(n) if line =~ '^\s*/\*' # /* ... */ is a comment in Objective C and Murphi, so we can't conclude # it's either of them yet, but track this as a hint in case we don't see # anything more definitive. saw_comment = 1 endif if line =~ '^\s*//' || line =~ '^\s*@import\>' || line =~ objc_preprocessor setf objc return endif if line =~ '^\s*\%(#\|%!\)' || line =~ '^\s*unwind_protect\>' || \ line =~ '\%(^\|;\)\s*' .. octave_block_terminators setf octave return endif # TODO: could be Matlab or Octave if line =~ '^\s*%' setf matlab return endif if line =~ '^\s*(\*' setf mma return endif if line =~ '^\c\s*\(\(type\|var\)\>\|--\)' setf murphi return endif n += 1 endwhile if saw_comment # We didn't see anything definitive, but this looks like either Objective C # or Murphi based on the comment leader. Assume the former as it is more # common. setf objc else # Default is Matlab setf matlab endif enddef export def FTmms() var n = 1 while n < 20 var line = getline(n) if line =~ '^\s*\(%\|//\)' || line =~ '^\*' setf mmix return endif if line =~ '^\s*#' setf make return endif n += 1 endwhile setf mmix enddef # This function checks if one of the first five lines start with a dot. In # that case it is probably an nroff file: 'filetype' is set and 1 is returned. export def FTnroff(): number if getline(1)[0] .. getline(2)[0] .. getline(3)[0] .. getline(4)[0] .. getline(5)[0] =~ '\.' setf nroff return 1 endif return 0 enddef export def FTmm() var n = 1 while n < 20 if getline(n) =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)' setf objcpp return endif n += 1 endwhile setf nroff enddef # Returns true if file content looks like LambdaProlog module def IsLProlog(): bool # skip apparent comments and blank lines, what looks like # LambdaProlog comment may be RAPID header var l: number = nextnonblank(1) while l > 0 && l < line('$') && getline(l) =~ '^\s*%' # LambdaProlog comment l = nextnonblank(l + 1) endwhile # this pattern must not catch a go.mod file return getline(l) =~ '\") =~ '\' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-' setf prolog else setf perl endif endif enddef export def FTinc() if exists("g:filetype_inc") exe "setf " .. g:filetype_inc else var lines = getline(1) .. getline(2) .. getline(3) if lines =~? "perlscript" setf aspperl elseif lines =~ "<%" setf aspvbs elseif lines =~ "' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= ' setf bitbake else FTasmsyntax() if exists("b:asmsyntax") exe "setf " .. fnameescape(b:asmsyntax) else setf pov endif endif endif enddef export def FTprogress_cweb() if exists("g:filetype_w") exe "setf " .. g:filetype_w return endif if getline(1) =~ '&ANALYZE' || getline(3) =~ '&GLOBAL-DEFINE' setf progress else setf cweb endif enddef export def FTprogress_asm() if exists("g:filetype_i") exe "setf " .. g:filetype_i return endif # This function checks for an assembly comment the first ten lines. # If not found, assume Progress. var lnum = 1 while lnum <= 10 && lnum < line('$') var line = getline(lnum) if line =~ '^\s*;' || line =~ '^\*' FTasm() return elseif line !~ '^\s*$' || line =~ '^/\*' # Not an empty line: Doesn't look like valid assembly code. # Or it looks like a Progress /* comment break endif lnum += 1 endwhile setf progress enddef var ft_pascal_comments = '^\s*\%({\|(\*\|//\)' var ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>' export def FTprogress_pascal() if exists("g:filetype_p") exe "setf " .. g:filetype_p return endif # This function checks for valid Pascal syntax in the first ten lines. # Look for either an opening comment or a program start. # If not found, assume Progress. var lnum = 1 while lnum <= 10 && lnum < line('$') var line = getline(lnum) if line =~ ft_pascal_comments || line =~? ft_pascal_keywords setf pascal return elseif line !~ '^\s*$' || line =~ '^/\*' # Not an empty line: Doesn't look like valid Pascal code. # Or it looks like a Progress /* comment break endif lnum += 1 endwhile setf progress enddef export def FTpp() if exists("g:filetype_pp") exe "setf " .. g:filetype_pp else var line = getline(nextnonblank(1)) if line =~ ft_pascal_comments || line =~? ft_pascal_keywords setf pascal else setf puppet endif endif enddef # Determine if *.prg is ABB RAPID. Can also be Clipper, FoxPro or eviews export def FTprg() if exists("g:filetype_prg") exe "setf " .. g:filetype_prg elseif IsRapid() setf rapid else # Nothing recognized, assume Clipper setf clipper endif enddef export def FTr() var max = line("$") > 50 ? 50 : line("$") for n in range(1, max) # Rebol is easy to recognize, check for that first if getline(n) =~? '\' setf rebol return endif endfor for n in range(1, max) # R has # comments if getline(n) =~ '^\s*#' setf r return endif # Rexx has /* comments */ if getline(n) =~ '^\s*/\*' setf rexx return endif endfor # Nothing recognized, use user default or assume Rexx if exists("g:filetype_r") exe "setf " .. g:filetype_r else # Rexx used to be the default, but R appears to be much more popular. setf r endif enddef export def McSetf() # Rely on the file to start with a comment. # MS message text files use ';', Sendmail files use '#' or 'dnl' for lnum in range(1, min([line("$"), 20])) var line = getline(lnum) if line =~ '^\s*\(#\|dnl\)' setf m4 # Sendmail .mc file return elseif line =~ '^\s*;' setf msmessages # MS Message text file return endif endfor setf m4 # Default: Sendmail .mc file enddef # Called from filetype.vim and scripts.vim. export def SetFileTypeSH(name: string) if did_filetype() # Filetype was already detected return endif if expand("") =~ g:ft_ignore_pat return endif if name =~ '\' # Some .sh scripts contain #!/bin/csh. SetFileTypeShell("csh") return elseif name =~ '\' # Some .sh scripts contain #!/bin/tcsh. SetFileTypeShell("tcsh") return elseif name =~ '\' # Some .sh scripts contain #!/bin/zsh. SetFileTypeShell("zsh") return elseif name =~ '\' b:is_kornshell = 1 if exists("b:is_bash") unlet b:is_bash endif if exists("b:is_sh") unlet b:is_sh endif elseif exists("g:bash_is_sh") || name =~ '\' || name =~ '\' b:is_bash = 1 if exists("b:is_kornshell") unlet b:is_kornshell endif if exists("b:is_sh") unlet b:is_sh endif elseif name =~ '\' || name =~ '\' # Ubuntu links "sh" to "dash", thus it is expected to work the same way b:is_sh = 1 if exists("b:is_kornshell") unlet b:is_kornshell endif if exists("b:is_bash") unlet b:is_bash endif endif SetFileTypeShell("sh") enddef # For shell-like file types, check for an "exec" command hidden in a comment, # as used for Tcl. # Also called from scripts.vim, thus can't be local to this script. export def SetFileTypeShell(name: string) if did_filetype() # Filetype was already detected return endif if expand("") =~ g:ft_ignore_pat return endif var l = 2 while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)' # Skip empty and comment lines. l += 1 endwhile if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$' # Found an "exec" line after a comment with continuation var n = substitute(getline(l), '\s*exec\s\+\([^ ]*/\)\=', '', '') if n =~ '\:p') if path =~ '/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|\%(usr/\)\=lib/udev/\%(rules\.d/\)\=.*\.rules\)$' setf udevrules return endif if path =~ '^/etc/ufw/' setf conf # Better than hog return endif if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d' setf javascript return endif var config_lines: list try config_lines = readfile('/etc/udev/udev.conf') catch /^Vim\%((\a\+)\)\=:E484/ setf hog return endtry var dir = expand(':p:h') for line in config_lines if line =~ ft_rules_udev_rules_pattern var udev_rules = substitute(line, ft_rules_udev_rules_pattern, '\1', "") if dir == udev_rules setf udevrules endif break endif endfor setf hog enddef export def SQL() if exists("g:filetype_sql") exe "setf " .. g:filetype_sql else setf sql endif enddef # This function checks the first 25 lines of file extension "sc" to resolve # detection between scala and SuperCollider. # NOTE: We don't check for 'Class : Method', as this can easily be confused # with valid Scala like `val x : Int = 3`. So we instead only rely on # checks that can't be confused. export def FTsc() for lnum in range(1, min([line("$"), 25])) if getline(lnum) =~# 'var\s<\|classvar\s<\|\^this.*\||\w\+|\|+\s\w*\s{\|\*ar\s' setf supercollider return endif endfor setf scala enddef # This function checks the first line of file extension "scd" to resolve # detection between scdoc and SuperCollider export def FTscd() if getline(1) =~# '\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$' setf scdoc else setf supercollider endif enddef # If the file has an extension of 't' and is in a directory 't' or 'xt' then # it is almost certainly a Perl test file. # If the first line starts with '#' and contains 'perl' it's probably a Perl # file. # (Slow test) If a file contains a 'use' statement then it is almost certainly # a Perl file. export def FTperl(): number var dirname = expand("%:p:h:t") if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt') setf perl return 1 endif if getline(1)[0] == '#' && getline(1) =~ 'perl' setf perl return 1 endif var save_cursor = getpos('.') call cursor(1, 1) var has_use = search('^use\s\s*\k', 'c', 30) > 0 call setpos('.', save_cursor) if has_use setf perl return 1 endif return 0 enddef # LambdaProlog and Standard ML signature files export def FTsig() if exists("g:filetype_sig") exe "setf " .. g:filetype_sig return endif var lprolog_comment = '^\s*\%(/\*\|%\)' var lprolog_keyword = '^\s*sig\s\+\a' var sml_comment = '^\s*(\*' var sml_keyword = '^\s*\%(signature\|structure\)\s\+\a' var line = getline(nextnonblank(1)) if line =~ lprolog_comment || line =~# lprolog_keyword setf lprolog elseif line =~ sml_comment || line =~# sml_keyword setf sml endif enddef # This function checks the first 100 lines of files matching "*.sil" to # resolve detection between Swift Intermediate Language and SILE. export def FTsil() for lnum in range(1, [line('$'), 100]->min()) var line: string = getline(lnum) if line =~ '^\s*[\\%]' setf sile return elseif line =~ '^\s*\S' setf sil return endif endfor # no clue, default to "sil" setf sil enddef export def FTsys() if exists("g:filetype_sys") exe "setf " .. g:filetype_sys elseif IsRapid() setf rapid else setf bat endif enddef # Choose context, plaintex, or tex (LaTeX) based on these rules: # 1. Check the first line of the file for "%&". # 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords. # 3. Default to "plain" or to g:tex_flavor, can be set in user's vimrc. export def FTtex() var firstline = getline(1) var format: string if firstline =~ '^%&\s*\a\+' format = tolower(matchstr(firstline, '\a\+')) format = substitute(format, 'pdf', '', '') if format == 'tex' format = 'latex' elseif format == 'plaintex' format = 'plain' endif elseif expand('%') =~ 'tex/context/.*/.*.tex' format = 'context' else # Default value, may be changed later: format = exists("g:tex_flavor") ? g:tex_flavor : 'plain' # Save position, go to the top of the file, find first non-comment line. var save_cursor = getpos('.') call cursor(1, 1) var firstNC = search('^\s*[^[:space:]%]', 'c', 1000) if firstNC > 0 # Check the next thousand lines for a LaTeX or ConTeXt keyword. var lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\|renewcommand\>\|part\>\|chapter\>\|section\>\|subsection\>\|subsubsection\>\|paragraph\>\|subparagraph\>\|subsubparagraph' var cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>' var kwline = search('^\s*\\\%(' .. lpat .. '\)\|^\s*\\\(' .. cpat .. '\)', 'cnp', firstNC + 1000) if kwline == 1 # lpat matched format = 'latex' elseif kwline == 2 # cpat matched format = 'context' endif # If neither matched, keep default set above. # let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000) # let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000) # if cline > 0 # let format = 'context' # endif # if lline > 0 && (cline == 0 || cline > lline) # let format = 'tex' # endif endif # firstNC call setpos('.', save_cursor) endif # firstline =~ '^%&\s*\a\+' # Translation from formats to file types. TODO: add AMSTeX, RevTex, others? if format == 'plain' setf plaintex elseif format == 'context' setf context else # probably LaTeX setf tex endif return enddef export def FTxml() var n = 1 while n < 100 && n <= line("$") var line = getline(n) # DocBook 4 or DocBook 5. var is_docbook4 = line =~ '\)' && getline(n) !~ '^\s*#\s*include' setf racc return endif n += 1 endwhile setf yacc enddef export def Redif() var lnum = 1 while lnum <= 5 && lnum < line('$') if getline(lnum) =~ "^\ctemplate-type:" setf redif return endif lnum += 1 endwhile enddef # This function is called for all files under */debian/patches/*, make sure not # to non-dep3patch files, such as README and other text files. export def Dep3patch() if expand('%:t') ==# 'series' return endif for ln in getline(1, 100) if ln =~# '^\%(Description\|Subject\|Origin\|Bug\|Forwarded\|Author\|From\|Reviewed-by\|Acked-by\|Last-Updated\|Applied-Upstream\):' setf dep3patch return elseif ln =~# '^---' # end of headers found. stop processing return endif endfor enddef # This function checks the first 15 lines for appearance of 'FoamFile' # and then 'object' in a following line. # In that case, it's probably an OpenFOAM file export def FTfoam() var ffile = 0 var lnum = 1 while lnum <= 15 if getline(lnum) =~# '^FoamFile' ffile = 1 elseif ffile == 1 && getline(lnum) =~# '^\s*object' setf foam return endif lnum += 1 endwhile enddef # Determine if a *.tf file is TF mud client or terraform export def FTtf() var numberOfLines = line('$') for i in range(1, numberOfLines) var currentLine = trim(getline(i)) var firstCharacter = currentLine[0] if firstCharacter !=? ";" && firstCharacter !=? "/" && firstCharacter !=? "" setf terraform return endif endfor setf tf enddef var ft_krl_header = '\&\w+' # Determine if a *.src file is Kuka Robot Language export def FTsrc() var ft_krl_def_or_deffct = '%(global\s+)?def%(fct)?>' if exists("g:filetype_src") exe "setf " .. g:filetype_src elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_def_or_deffct .. ')' setf krl endif enddef # Determine if a *.dat file is Kuka Robot Language export def FTdat() var ft_krl_defdat = 'defdat>' if exists("g:filetype_dat") exe "setf " .. g:filetype_dat elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_defdat .. ')' setf krl endif enddef export def FTlsl() if exists("g:filetype_lsl") exe "setf " .. g:filetype_lsl endif var line = getline(nextnonblank(1)) if line =~ '^\s*%' || line =~# ':\s*trait\s*$' setf larch else setf lsl endif enddef # Uncomment this line to check for compilation errors early # defcompile