7
|
1 " Vim filetype plugin file
|
|
2 " Language: MS-DOS .bat files
|
|
3 " Maintainer: Mike Williams <mrw@eandem.co.uk>
|
16380
|
4 " Last Change: 14th April 2019
|
7
|
5
|
|
6 " Only do this when not done yet for this buffer
|
|
7 if exists("b:did_ftplugin")
|
|
8 finish
|
|
9 endif
|
|
10
|
|
11 " Don't load another plugin for this buffer
|
|
12 let b:did_ftplugin = 1
|
|
13
|
3513
|
14 let s:cpo_save = &cpo
|
|
15 set cpo&vim
|
|
16
|
7
|
17 " BAT comment formatting
|
2034
|
18 setlocal comments=b:rem,b:@rem,b:REM,b:@REM,:::
|
16380
|
19 setlocal commentstring=::\ %s
|
7
|
20 setlocal formatoptions-=t formatoptions+=rol
|
|
21
|
|
22 " Define patterns for the browse file filter
|
|
23 if has("gui_win32") && !exists("b:browsefilter")
|
2034
|
24 let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
|
7
|
25 endif
|
3492
|
26
|
3513
|
27 let b:undo_ftplugin = "setlocal comments< formatoptions<"
|
|
28 \ . "| unlet! b:browsefiler"
|
|
29
|
|
30 let &cpo = s:cpo_save
|
|
31 unlet s:cpo_save
|