Mercurial > vim
comparison runtime/filetype.vim @ 12816:218102da5226 v8.0.1285
patch 8.0.1285: occasional crash when using a channel
commit https://github.com/vim/vim/commit/d09a206ee94ccb653707ce9b6e536d4d58886e04
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 11 15:37:45 2017 +0100
patch 8.0.1285: occasional crash when using a channel
Problem: Occasional crash when using a channel. (Marek)
Solution: Decrement reference count later. (closes https://github.com/vim/vim/issues/2315)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 11 Nov 2017 15:45:04 +0100 |
parents | e0dea10b30b6 |
children | 1578c0ba0dd1 |
comparison
equal
deleted
inserted
replaced
12815:69dbdf7cfab0 | 12816:218102da5226 |
---|---|
1 " Vim support file to detect file types | 1 " Vim support file to detect file types |
2 " | 2 " |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | 3 " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 " Last Change: 2017 Nov 09 | 4 " Last Change: 2017 Nov 11 |
5 | 5 |
6 " Listen very carefully, I will say this only once | 6 " Listen very carefully, I will say this only once |
7 if exists("did_load_filetypes") | 7 if exists("did_load_filetypes") |
8 finish | 8 finish |
9 endif | 9 endif |
50 | 50 |
51 " Vim help file | 51 " Vim help file |
52 au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help | 52 au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help |
53 | 53 |
54 " Abaqus or Trasys | 54 " Abaqus or Trasys |
55 au BufNewFile,BufRead *.inp call filetype#Check_inp() | 55 au BufNewFile,BufRead *.inp call dist#ft#Check_inp() |
56 | 56 |
57 " A-A-P recipe | 57 " A-A-P recipe |
58 au BufNewFile,BufRead *.aap setf aap | 58 au BufNewFile,BufRead *.aap setf aap |
59 | 59 |
60 " A2ps printing utility | 60 " A2ps printing utility |
152 " Grub (must be before catch *.lst) | 152 " Grub (must be before catch *.lst) |
153 au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub | 153 au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub |
154 | 154 |
155 " Assembly (all kinds) | 155 " Assembly (all kinds) |
156 " *.lst is not pure assembly, it has two extra columns (address, byte codes) | 156 " *.lst is not pure assembly, it has two extra columns (address, byte codes) |
157 au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call filetype#FTasm() | 157 au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm() |
158 | 158 |
159 " Macro (VAX) | 159 " Macro (VAX) |
160 au BufNewFile,BufRead *.mar setf vmasm | 160 au BufNewFile,BufRead *.mar setf vmasm |
161 | 161 |
162 " Atlas | 162 " Atlas |
182 | 182 |
183 " B | 183 " B |
184 au BufNewFile,BufRead *.mch,*.ref,*.imp setf b | 184 au BufNewFile,BufRead *.mch,*.ref,*.imp setf b |
185 | 185 |
186 " BASIC or Visual Basic | 186 " BASIC or Visual Basic |
187 au BufNewFile,BufRead *.bas call filetype#FTVB("basic") | 187 au BufNewFile,BufRead *.bas call dist#ft#FTVB("basic") |
188 | 188 |
189 " Visual Basic Script (close to Visual Basic) or Visual Basic .NET | 189 " Visual Basic Script (close to Visual Basic) or Visual Basic .NET |
190 au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb | 190 au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb |
191 | 191 |
192 " IBasic file (similar to QBasic) | 192 " IBasic file (similar to QBasic) |
200 " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. | 200 " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. |
201 au BufNewFile,BufRead *.cmd | 201 au BufNewFile,BufRead *.cmd |
202 \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif | 202 \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif |
203 | 203 |
204 " Batch file for 4DOS | 204 " Batch file for 4DOS |
205 au BufNewFile,BufRead *.btm call filetype#FTbtm() | 205 au BufNewFile,BufRead *.btm call dist#ft#FTbtm() |
206 | 206 |
207 " BC calculator | 207 " BC calculator |
208 au BufNewFile,BufRead *.bc setf bc | 208 au BufNewFile,BufRead *.bc setf bc |
209 | 209 |
210 " BDF font | 210 " BDF font |
220 " sudoedit uses namedXXXX.conf | 220 " sudoedit uses namedXXXX.conf |
221 au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named | 221 au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named |
222 | 222 |
223 " BIND zone | 223 " BIND zone |
224 au BufNewFile,BufRead named.root setf bindzone | 224 au BufNewFile,BufRead named.root setf bindzone |
225 au BufNewFile,BufRead *.db call filetype#BindzoneCheck('') | 225 au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('') |
226 | 226 |
227 " Blank | 227 " Blank |
228 au BufNewFile,BufRead *.bl setf blank | 228 au BufNewFile,BufRead *.bl setf blank |
229 | 229 |
230 " Blkid cache file | 230 " Blkid cache file |
236 " There is another check for BUILD further below. | 236 " There is another check for BUILD further below. |
237 autocmd BufRead,BufNewFile BUILD setf bzl | 237 autocmd BufRead,BufNewFile BUILD setf bzl |
238 endif | 238 endif |
239 | 239 |
240 " C or lpc | 240 " C or lpc |
241 au BufNewFile,BufRead *.c call filetype#FTlpc() | 241 au BufNewFile,BufRead *.c call dist#ft#FTlpc() |
242 | 242 |
243 " Calendar | 243 " Calendar |
244 au BufNewFile,BufRead calendar setf calendar | 244 au BufNewFile,BufRead calendar setf calendar |
245 | 245 |
246 " C# | 246 " C# |
290 endif | 290 endif |
291 | 291 |
292 " .h files can be C, Ch C++, ObjC or ObjC++. | 292 " .h files can be C, Ch C++, ObjC or ObjC++. |
293 " Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is | 293 " Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is |
294 " detected automatically. | 294 " detected automatically. |
295 au BufNewFile,BufRead *.h call filetype#FTheader() | 295 au BufNewFile,BufRead *.h call dist#ft#FTheader() |
296 | 296 |
297 " Ch (CHscript) | 297 " Ch (CHscript) |
298 au BufNewFile,BufRead *.chf setf ch | 298 au BufNewFile,BufRead *.chf setf ch |
299 | 299 |
300 " TLH files are C++ headers generated by Visual C++'s #import from typelibs | 300 " TLH files are C++ headers generated by Visual C++'s #import from typelibs |
324 | 324 |
325 " CHILL | 325 " CHILL |
326 au BufNewFile,BufRead *..ch setf chill | 326 au BufNewFile,BufRead *..ch setf chill |
327 | 327 |
328 " Changes for WEB and CWEB or CHILL | 328 " Changes for WEB and CWEB or CHILL |
329 au BufNewFile,BufRead *.ch call filetype#FTchange() | 329 au BufNewFile,BufRead *.ch call dist#ft#FTchange() |
330 | 330 |
331 " ChordPro | 331 " ChordPro |
332 au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro | 332 au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro |
333 | 333 |
334 " Clean | 334 " Clean |
336 | 336 |
337 " Clever | 337 " Clever |
338 au BufNewFile,BufRead *.eni setf cl | 338 au BufNewFile,BufRead *.eni setf cl |
339 | 339 |
340 " Clever or dtd | 340 " Clever or dtd |
341 au BufNewFile,BufRead *.ent call filetype#FTent() | 341 au BufNewFile,BufRead *.ent call dist#ft#FTent() |
342 | 342 |
343 " Clipper (or FoxPro; could also be eviews) | 343 " Clipper (or FoxPro; could also be eviews) |
344 au BufNewFile,BufRead *.prg | 344 au BufNewFile,BufRead *.prg |
345 \ if exists("g:filetype_prg") | | 345 \ if exists("g:filetype_prg") | |
346 \ exe "setf " . g:filetype_prg | | 346 \ exe "setf " . g:filetype_prg | |
391 | 391 |
392 " Eterm | 392 " Eterm |
393 au BufNewFile,BufRead *Eterm/*.cfg setf eterm | 393 au BufNewFile,BufRead *Eterm/*.cfg setf eterm |
394 | 394 |
395 " Euphoria 3 or 4 | 395 " Euphoria 3 or 4 |
396 au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call filetype#EuphoriaCheck() | 396 au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck() |
397 if has("fname_case") | 397 if has("fname_case") |
398 au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call filetype#EuphoriaCheck() | 398 au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck() |
399 endif | 399 endif |
400 | 400 |
401 " Lynx config files | 401 " Lynx config files |
402 au BufNewFile,BufRead lynx.cfg setf lynx | 402 au BufNewFile,BufRead lynx.cfg setf lynx |
403 | 403 |
440 | 440 |
441 " ROCKLinux package description | 441 " ROCKLinux package description |
442 au BufNewFile,BufRead *.desc setf desc | 442 au BufNewFile,BufRead *.desc setf desc |
443 | 443 |
444 " the D language or dtrace | 444 " the D language or dtrace |
445 au BufNewFile,BufRead *.d call filetype#DtraceCheck() | 445 au BufNewFile,BufRead *.d call dist#ft#DtraceCheck() |
446 | 446 |
447 " Desktop files | 447 " Desktop files |
448 au BufNewFile,BufRead *.desktop,.directory setf desktop | 448 au BufNewFile,BufRead *.desktop,.directory setf desktop |
449 | 449 |
450 " Dict config | 450 " Dict config |
472 \ else | | 472 \ else | |
473 \ setf diva | | 473 \ setf diva | |
474 \ endif | 474 \ endif |
475 | 475 |
476 " DCL (Digital Command Language - vms) or DNS zone file | 476 " DCL (Digital Command Language - vms) or DNS zone file |
477 au BufNewFile,BufRead *.com call filetype#BindzoneCheck('dcl') | 477 au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl') |
478 | 478 |
479 " DOT | 479 " DOT |
480 au BufNewFile,BufRead *.dot setf dot | 480 au BufNewFile,BufRead *.dot setf dot |
481 | 481 |
482 " Dylan - lid files | 482 " Dylan - lid files |
520 | 520 |
521 " Embedix Component Description | 521 " Embedix Component Description |
522 au BufNewFile,BufRead *.ecd setf ecd | 522 au BufNewFile,BufRead *.ecd setf ecd |
523 | 523 |
524 " Eiffel or Specman or Euphoria | 524 " Eiffel or Specman or Euphoria |
525 au BufNewFile,BufRead *.e,*.E call filetype#FTe() | 525 au BufNewFile,BufRead *.e,*.E call dist#ft#FTe() |
526 | 526 |
527 " Elinks configuration | 527 " Elinks configuration |
528 au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks | 528 au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks |
529 | 529 |
530 " ERicsson LANGuage; Yaws is erlang too | 530 " ERicsson LANGuage; Yaws is erlang too |
693 | 693 |
694 " Tilde (must be before HTML) | 694 " Tilde (must be before HTML) |
695 au BufNewFile,BufRead *.t.html setf tilde | 695 au BufNewFile,BufRead *.t.html setf tilde |
696 | 696 |
697 " HTML (.shtml and .stm for server side) | 697 " HTML (.shtml and .stm for server side) |
698 au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call filetype#FThtml() | 698 au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() |
699 | 699 |
700 " HTML with Ruby - eRuby | 700 " HTML with Ruby - eRuby |
701 au BufNewFile,BufRead *.erb,*.rhtml setf eruby | 701 au BufNewFile,BufRead *.erb,*.rhtml setf eruby |
702 | 702 |
703 " HTML with M4 | 703 " HTML with M4 |
720 | 720 |
721 " Icon | 721 " Icon |
722 au BufNewFile,BufRead *.icn setf icon | 722 au BufNewFile,BufRead *.icn setf icon |
723 | 723 |
724 " IDL (Interface Description Language) | 724 " IDL (Interface Description Language) |
725 au BufNewFile,BufRead *.idl call filetype#FTidl() | 725 au BufNewFile,BufRead *.idl call dist#ft#FTidl() |
726 | 726 |
727 " Microsoft IDL (Interface Description Language) Also *.idl | 727 " Microsoft IDL (Interface Description Language) Also *.idl |
728 " MOF = WMI (Windows Management Instrumentation) Managed Object Format | 728 " MOF = WMI (Windows Management Instrumentation) Managed Object Format |
729 au BufNewFile,BufRead *.odl,*.mof setf msidl | 729 au BufNewFile,BufRead *.odl,*.mof setf msidl |
730 | 730 |
731 " Icewm menu | 731 " Icewm menu |
732 au BufNewFile,BufRead */.icewm/menu setf icemenu | 732 au BufNewFile,BufRead */.icewm/menu setf icemenu |
733 | 733 |
734 " Indent profile (must come before IDL *.pro!) | 734 " Indent profile (must come before IDL *.pro!) |
735 au BufNewFile,BufRead .indent.pro setf indent | 735 au BufNewFile,BufRead .indent.pro setf indent |
736 au BufNewFile,BufRead indent.pro call filetype#ProtoCheck('indent') | 736 au BufNewFile,BufRead indent.pro call dist#ft#ProtoCheck('indent') |
737 | 737 |
738 " IDL (Interactive Data Language) | 738 " IDL (Interactive Data Language) |
739 au BufNewFile,BufRead *.pro call filetype#ProtoCheck('idlang') | 739 au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang') |
740 | 740 |
741 " Indent RC | 741 " Indent RC |
742 au BufNewFile,BufRead indentrc setf indent | 742 au BufNewFile,BufRead indentrc setf indent |
743 | 743 |
744 " Inform | 744 " Inform |
948 | 948 |
949 " Mason | 949 " Mason |
950 au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason | 950 au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason |
951 | 951 |
952 " Mathematica, Matlab, Murphi or Objective C | 952 " Mathematica, Matlab, Murphi or Objective C |
953 au BufNewFile,BufRead *.m call filetype#FTm() | 953 au BufNewFile,BufRead *.m call dist#ft#FTm() |
954 | 954 |
955 " Mathematica notebook | 955 " Mathematica notebook |
956 au BufNewFile,BufRead *.nb setf mma | 956 au BufNewFile,BufRead *.nb setf mma |
957 | 957 |
958 " Maya Extension Language | 958 " Maya Extension Language |
978 | 978 |
979 " MIX - Knuth assembly | 979 " MIX - Knuth assembly |
980 au BufNewFile,BufRead *.mix,*.mixal setf mix | 980 au BufNewFile,BufRead *.mix,*.mixal setf mix |
981 | 981 |
982 " MMIX or VMS makefile | 982 " MMIX or VMS makefile |
983 au BufNewFile,BufRead *.mms call filetype#FTmms() | 983 au BufNewFile,BufRead *.mms call dist#ft#FTmms() |
984 | 984 |
985 " Symbian meta-makefile definition (MMP) | 985 " Symbian meta-makefile definition (MMP) |
986 au BufNewFile,BufRead *.mmp setf mmp | 986 au BufNewFile,BufRead *.mmp setf mmp |
987 | 987 |
988 " Modsim III (or LambdaProlog) | 988 " Modsim III (or LambdaProlog) |
1066 au BufNewFile,BufRead *.me | 1066 au BufNewFile,BufRead *.me |
1067 \ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" | | 1067 \ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" | |
1068 \ setf nroff | | 1068 \ setf nroff | |
1069 \ endif | 1069 \ endif |
1070 au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff | 1070 au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff |
1071 au BufNewFile,BufRead *.[1-9] call filetype#FTnroff() | 1071 au BufNewFile,BufRead *.[1-9] call dist#ft#FTnroff() |
1072 | 1072 |
1073 " Nroff or Objective C++ | 1073 " Nroff or Objective C++ |
1074 au BufNewFile,BufRead *.mm call filetype#FTmm() | 1074 au BufNewFile,BufRead *.mm call dist#ft#FTmm() |
1075 | 1075 |
1076 " Not Quite C | 1076 " Not Quite C |
1077 au BufNewFile,BufRead *.nqc setf nqc | 1077 au BufNewFile,BufRead *.nqc setf nqc |
1078 | 1078 |
1079 " NSE - Nmap Script Engine - uses Lua syntax | 1079 " NSE - Nmap Script Engine - uses Lua syntax |
1124 " PCMK - HAE - crm configure edit | 1124 " PCMK - HAE - crm configure edit |
1125 au BufNewFile,BufRead *.pcmk setf pcmk | 1125 au BufNewFile,BufRead *.pcmk setf pcmk |
1126 | 1126 |
1127 " Perl | 1127 " Perl |
1128 if has("fname_case") | 1128 if has("fname_case") |
1129 au BufNewFile,BufRead *.pl,*.PL call filetype#FTpl() | 1129 au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl() |
1130 else | 1130 else |
1131 au BufNewFile,BufRead *.pl call filetype#FTpl() | 1131 au BufNewFile,BufRead *.pl call dist#ft#FTpl() |
1132 endif | 1132 endif |
1133 au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl | 1133 au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl |
1134 au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6 | 1134 au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6 |
1135 | 1135 |
1136 " Perl, XPM or XPM2 | 1136 " Perl, XPM or XPM2 |
1193 | 1193 |
1194 " Povray configuration | 1194 " Povray configuration |
1195 au BufNewFile,BufRead .povrayrc setf povini | 1195 au BufNewFile,BufRead .povrayrc setf povini |
1196 | 1196 |
1197 " Povray, PHP or assembly | 1197 " Povray, PHP or assembly |
1198 au BufNewFile,BufRead *.inc call filetype#FTinc() | 1198 au BufNewFile,BufRead *.inc call dist#ft#FTinc() |
1199 | 1199 |
1200 " Printcap and Termcap | 1200 " Printcap and Termcap |
1201 au BufNewFile,BufRead *printcap | 1201 au BufNewFile,BufRead *printcap |
1202 \ let b:ptcap_type = "print" | setf ptcap | 1202 \ let b:ptcap_type = "print" | setf ptcap |
1203 au BufNewFile,BufRead *termcap | 1203 au BufNewFile,BufRead *termcap |
1222 | 1222 |
1223 " Procmail | 1223 " Procmail |
1224 au BufNewFile,BufRead .procmail,.procmailrc setf procmail | 1224 au BufNewFile,BufRead .procmail,.procmailrc setf procmail |
1225 | 1225 |
1226 " Progress or CWEB | 1226 " Progress or CWEB |
1227 au BufNewFile,BufRead *.w call filetype#FTprogress_cweb() | 1227 au BufNewFile,BufRead *.w call dist#ft#FTprogress_cweb() |
1228 | 1228 |
1229 " Progress or assembly | 1229 " Progress or assembly |
1230 au BufNewFile,BufRead *.i call filetype#FTprogress_asm() | 1230 au BufNewFile,BufRead *.i call dist#ft#FTprogress_asm() |
1231 | 1231 |
1232 " Progress or Pascal | 1232 " Progress or Pascal |
1233 au BufNewFile,BufRead *.p call filetype#FTprogress_pascal() | 1233 au BufNewFile,BufRead *.p call dist#ft#FTprogress_pascal() |
1234 | 1234 |
1235 " Software Distributor Product Specification File (POSIX 1387.2-1995) | 1235 " Software Distributor Product Specification File (POSIX 1387.2-1995) |
1236 au BufNewFile,BufRead *.psf setf psf | 1236 au BufNewFile,BufRead *.psf setf psf |
1237 au BufNewFile,BufRead INDEX,INFO | 1237 au BufNewFile,BufRead INDEX,INFO |
1238 \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' | | 1238 \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' | |
1314 else | 1314 else |
1315 au BufNewFile,BufRead *.rrst,*.srst setf rrst | 1315 au BufNewFile,BufRead *.rrst,*.srst setf rrst |
1316 endif | 1316 endif |
1317 | 1317 |
1318 " Rexx, Rebol or R | 1318 " Rexx, Rebol or R |
1319 au BufNewFile,BufRead *.r,*.R call filetype#FTr() | 1319 au BufNewFile,BufRead *.r,*.R call dist#ft#FTr() |
1320 | 1320 |
1321 " Remind | 1321 " Remind |
1322 au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind | 1322 au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind |
1323 | 1323 |
1324 " Resolv.conf | 1324 " Resolv.conf |
1410 | 1410 |
1411 " Sendmail | 1411 " Sendmail |
1412 au BufNewFile,BufRead sendmail.cf setf sm | 1412 au BufNewFile,BufRead sendmail.cf setf sm |
1413 | 1413 |
1414 " Sendmail .mc files are actually m4. Could also be MS Message text file. | 1414 " Sendmail .mc files are actually m4. Could also be MS Message text file. |
1415 au BufNewFile,BufRead *.mc call filetype#McSetf() | 1415 au BufNewFile,BufRead *.mc call dist#ft#McSetf() |
1416 | 1416 |
1417 " Services | 1417 " Services |
1418 au BufNewFile,BufRead */etc/services setf services | 1418 au BufNewFile,BufRead */etc/services setf services |
1419 | 1419 |
1420 " Service Location config | 1420 " Service Location config |
1451 au BufNewFile,BufRead catalog setf catalog | 1451 au BufNewFile,BufRead catalog setf catalog |
1452 au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') | 1452 au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') |
1453 | 1453 |
1454 " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. | 1454 " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. |
1455 " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts | 1455 " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts |
1456 au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call filetype#SetFileTypeSH("bash") | 1456 au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash") |
1457 au BufNewFile,BufRead .kshrc*,*.ksh call filetype#SetFileTypeSH("ksh") | 1457 au BufNewFile,BufRead .kshrc*,*.ksh call dist#ft#SetFileTypeSH("ksh") |
1458 au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call filetype#SetFileTypeSH(getline(1)) | 1458 au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1)) |
1459 | 1459 |
1460 " Shell script (Arch Linux) or PHP file (Drupal) | 1460 " Shell script (Arch Linux) or PHP file (Drupal) |
1461 au BufNewFile,BufRead *.install | 1461 au BufNewFile,BufRead *.install |
1462 \ if getline(1) =~ '<?php' | | 1462 \ if getline(1) =~ '<?php' | |
1463 \ setf php | | 1463 \ setf php | |
1464 \ else | | 1464 \ else | |
1465 \ call filetype#SetFileTypeSH("bash") | | 1465 \ call dist#ft#SetFileTypeSH("bash") | |
1466 \ endif | 1466 \ endif |
1467 | 1467 |
1468 " tcsh scripts | 1468 " tcsh scripts |
1469 au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login call filetype#SetFileTypeShell("tcsh") | 1469 au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh") |
1470 | 1470 |
1471 " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh) | 1471 " csh scripts, but might also be tcsh scripts (on some systems csh is tcsh) |
1472 au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call filetype#CSH() | 1472 au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH() |
1473 | 1473 |
1474 " Z-Shell script | 1474 " Z-Shell script |
1475 au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh | 1475 au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh |
1476 au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') | 1476 au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') |
1477 au BufNewFile,BufRead *.zsh setf zsh | 1477 au BufNewFile,BufRead *.zsh setf zsh |
1538 " SNMP MIB files | 1538 " SNMP MIB files |
1539 au BufNewFile,BufRead *.mib,*.my setf mib | 1539 au BufNewFile,BufRead *.mib,*.my setf mib |
1540 | 1540 |
1541 " Snort Configuration | 1541 " Snort Configuration |
1542 au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog | 1542 au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog |
1543 au BufNewFile,BufRead *.rules call filetype#FTRules() | 1543 au BufNewFile,BufRead *.rules call dist#ft#FTRules() |
1544 | 1544 |
1545 " Spec (Linux RPM) | 1545 " Spec (Linux RPM) |
1546 au BufNewFile,BufRead *.spec setf spec | 1546 au BufNewFile,BufRead *.spec setf spec |
1547 | 1547 |
1548 " Speedup (AspenTech plant simulator) | 1548 " Speedup (AspenTech plant simulator) |
1562 | 1562 |
1563 " SQL for Oracle Designer | 1563 " SQL for Oracle Designer |
1564 au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql | 1564 au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql |
1565 | 1565 |
1566 " SQL | 1566 " SQL |
1567 au BufNewFile,BufRead *.sql call filetype#SQL() | 1567 au BufNewFile,BufRead *.sql call dist#ft#SQL() |
1568 | 1568 |
1569 " SQLJ | 1569 " SQLJ |
1570 au BufNewFile,BufRead *.sqlj setf sqlj | 1570 au BufNewFile,BufRead *.sqlj setf sqlj |
1571 | 1571 |
1572 " SQR | 1572 " SQR |
1611 " SVG (Scalable Vector Graphics) | 1611 " SVG (Scalable Vector Graphics) |
1612 au BufNewFile,BufRead *.svg setf svg | 1612 au BufNewFile,BufRead *.svg setf svg |
1613 | 1613 |
1614 " Tads (or Nroff or Perl test file) | 1614 " Tads (or Nroff or Perl test file) |
1615 au BufNewFile,BufRead *.t | 1615 au BufNewFile,BufRead *.t |
1616 \ if !filetype#FTnroff() && !filetype#FTperl() | setf tads | endif | 1616 \ if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif |
1617 | 1617 |
1618 " Tags | 1618 " Tags |
1619 au BufNewFile,BufRead tags setf tags | 1619 au BufNewFile,BufRead tags setf tags |
1620 | 1620 |
1621 " TAK | 1621 " TAK |
1640 " Terminfo | 1640 " Terminfo |
1641 au BufNewFile,BufRead *.ti setf terminfo | 1641 au BufNewFile,BufRead *.ti setf terminfo |
1642 | 1642 |
1643 " TeX | 1643 " TeX |
1644 au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex | 1644 au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex |
1645 au BufNewFile,BufRead *.tex call filetype#FTtex() | 1645 au BufNewFile,BufRead *.tex call dist#ft#FTtex() |
1646 | 1646 |
1647 " ConTeXt | 1647 " ConTeXt |
1648 au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context | 1648 au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context |
1649 | 1649 |
1650 " Texinfo | 1650 " Texinfo |
1738 \ else | | 1738 \ else | |
1739 \ setf virata | | 1739 \ setf virata | |
1740 \ endif | 1740 \ endif |
1741 | 1741 |
1742 " Visual Basic (also uses *.bas) or FORM | 1742 " Visual Basic (also uses *.bas) or FORM |
1743 au BufNewFile,BufRead *.frm call filetype#FTVB("form") | 1743 au BufNewFile,BufRead *.frm call dist#ft#FTVB("form") |
1744 | 1744 |
1745 " SaxBasic is close to Visual Basic | 1745 " SaxBasic is close to Visual Basic |
1746 au BufNewFile,BufRead *.sba setf vb | 1746 au BufNewFile,BufRead *.sba setf vb |
1747 | 1747 |
1748 " Vgrindefs file | 1748 " Vgrindefs file |
1828 au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults | 1828 au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults |
1829 | 1829 |
1830 " Xmath | 1830 " Xmath |
1831 au BufNewFile,BufRead *.msc,*.msf setf xmath | 1831 au BufNewFile,BufRead *.msc,*.msf setf xmath |
1832 au BufNewFile,BufRead *.ms | 1832 au BufNewFile,BufRead *.ms |
1833 \ if !filetype#FTnroff() | setf xmath | endif | 1833 \ if !dist#ft#FTnroff() | setf xmath | endif |
1834 | 1834 |
1835 " XML specific variants: docbk and xbl | 1835 " XML specific variants: docbk and xbl |
1836 au BufNewFile,BufRead *.xml call filetype#FTxml() | 1836 au BufNewFile,BufRead *.xml call dist#ft#FTxml() |
1837 | 1837 |
1838 " XMI (holding UML models) is also XML | 1838 " XMI (holding UML models) is also XML |
1839 au BufNewFile,BufRead *.xmi setf xml | 1839 au BufNewFile,BufRead *.xmi setf xml |
1840 | 1840 |
1841 " CSPROJ files are Visual Studio.NET's XML-based project config files | 1841 " CSPROJ files are Visual Studio.NET's XML-based project config files |
1874 | 1874 |
1875 " Yacc | 1875 " Yacc |
1876 au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc | 1876 au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc |
1877 | 1877 |
1878 " Yacc or racc | 1878 " Yacc or racc |
1879 au BufNewFile,BufRead *.y call filetype#FTy() | 1879 au BufNewFile,BufRead *.y call dist#ft#FTy() |
1880 | 1880 |
1881 " Yaml | 1881 " Yaml |
1882 au BufNewFile,BufRead *.yaml,*.yml setf yaml | 1882 au BufNewFile,BufRead *.yaml,*.yml setf yaml |
1883 | 1883 |
1884 " yum conf (close enough to dosini) | 1884 " yum conf (close enough to dosini) |
1890 au BufNewFile,BufRead *.zut setf zimbutempl | 1890 au BufNewFile,BufRead *.zut setf zimbutempl |
1891 | 1891 |
1892 " Zope | 1892 " Zope |
1893 " dtml (zope dynamic template markup language), pt (zope page template), | 1893 " dtml (zope dynamic template markup language), pt (zope page template), |
1894 " cpt (zope form controller page template) | 1894 " cpt (zope form controller page template) |
1895 au BufNewFile,BufRead *.dtml,*.pt,*.cpt call filetype#FThtml() | 1895 au BufNewFile,BufRead *.dtml,*.pt,*.cpt call dist#ft#FThtml() |
1896 " zsql (zope sql method) | 1896 " zsql (zope sql method) |
1897 au BufNewFile,BufRead *.zsql call filetype#SQL() | 1897 au BufNewFile,BufRead *.zsql call dist#ft#SQL() |
1898 | 1898 |
1899 " Z80 assembler asz80 | 1899 " Z80 assembler asz80 |
1900 au BufNewFile,BufRead *.z8a setf z8a | 1900 au BufNewFile,BufRead *.z8a setf z8a |
1901 | 1901 |
1902 augroup END | 1902 augroup END |
2046 \| let b:ptcap_type = "term" | call s:StarSetf('ptcap') | 2046 \| let b:ptcap_type = "term" | call s:StarSetf('ptcap') |
2047 \|endif | 2047 \|endif |
2048 | 2048 |
2049 " ReDIF | 2049 " ReDIF |
2050 " Only used when the .rdf file was not detected to be XML. | 2050 " Only used when the .rdf file was not detected to be XML. |
2051 au BufRead,BufNewFile *.rdf call filetype#Redif() | 2051 au BufRead,BufNewFile *.rdf call dist#ft#Redif() |
2052 | 2052 |
2053 " Remind | 2053 " Remind |
2054 au BufNewFile,BufRead .reminders* call s:StarSetf('remind') | 2054 au BufNewFile,BufRead .reminders* call s:StarSetf('remind') |
2055 | 2055 |
2056 " Vim script | 2056 " Vim script |