annotate runtime/ftplugin/dosbatch.vim @ 29163:9288c636ffa5 v8.2.5101

patch 8.2.5101: MS-Windows with MinGW: $CC may be "cc" instead of "gcc" Commit: https://github.com/vim/vim/commit/cf65d88ff844f042337dfd043e6e98f3b9270577 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Wed Jun 15 18:31:45 2022 +0100 patch 8.2.5101: MS-Windows with MinGW: $CC may be "cc" instead of "gcc" Problem: MS-Windows with MinGW: $CC may be "cc" instead of "gcc". Solution: Set $CC if it is not matching "clang". (Yegappan Lakshmanan, closes #10578)
author Bram Moolenaar <Bram@vim.org>
date Wed, 15 Jun 2022 19: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