annotate runtime/ftplugin/dosbatch.vim @ 30466:adb1bc2b3cb6

Added tag v9.0.0568 for changeset b3367a7a3914878c2b6152067addba0ae17ea1c6
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Sep 2022 12:45:04 +0200
parents 2334bf788e8a
children a9b5ffbc0428
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: MS-DOS .bat files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Mike Williams <mrw@eandem.co.uk>
20317
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
4 " Last Change: 7th May 2020
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Don't load another plugin for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
14 let s:cpo_save = &cpo
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
15 set cpo&vim
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " BAT comment formatting
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
18 setlocal comments=b:rem,b:@rem,b:REM,b:@REM,:::
16380
5ad204d8a2f2 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3513
diff changeset
19 setlocal commentstring=::\ %s
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 setlocal formatoptions-=t formatoptions+=rol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
20317
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
22 " Lookup DOS keywords using Windows command help.
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
23 if executable('help.exe')
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
24 if has('terminal')
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
25 setlocal keywordprg=:term\ help.exe
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
26 else
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
27 setlocal keywordprg=help.exe
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
28 endif
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
29 endif
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
30
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Define patterns for the browse file filter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 if has("gui_win32") && !exists("b:browsefilter")
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 15
diff changeset
33 let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3492
3482d151136b Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
35
20317
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
36 let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<"
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
37 \ . "| unlet! b:browsefiler"
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
38
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
39 let &cpo = s:cpo_save
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
40 unlet s:cpo_save