Mercurial > vim
annotate runtime/ftplugin/sh.vim @ 33363:14b9adfe6822 v9.0.1943
patch 9.0.1943: CI not run with clang-17
Commit: https://github.com/vim/vim/commit/f109bf93c9402e4e3122a7ae7846e6feae4fa222
Author: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Mon Sep 25 21:05:00 2023 +0200
patch 9.0.1943: CI not run with clang-17
Problem: CI not run with clang-17
Solution: Update CI to use clang-17
closes: #12745
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 25 Sep 2023 21:15:08 +0200 |
parents | 77e0574450d0 |
children | 665078e8fea1 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
30202 | 2 " Language: sh |
3 " Maintainer: Doug Kearns <dougkearns@gmail.com> | |
4 " Previous Maintainer: Dan Sharp | |
33067
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
5 " Contributor: Enno Nagel <ennonagel+vim@gmail.com> |
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
6 " Last Change: 2023 Aug 29 |
7 | 7 |
30202 | 8 if exists("b:did_ftplugin") |
9 finish | |
10 endif | |
7 | 11 let b:did_ftplugin = 1 |
12 | |
13 let s:save_cpo = &cpo | |
14 set cpo-=C | |
15 | |
30202 | 16 setlocal comments=:# |
17 setlocal commentstring=#\ %s | |
18 setlocal formatoptions-=t formatoptions+=croql | |
19 | |
20 let b:undo_ftplugin = "setl com< cms< fo<" | |
7 | 21 |
22 " Shell: thanks to Johannes Zellner | |
30202 | 23 if exists("loaded_matchit") && !exists("b:match_words") |
24 let b:match_ignorecase = 0 | |
25 let s:sol = '\%(;\s*\|^\s*\)\@<=' " start of line | |
26 let b:match_words = | |
27 \ s:sol .. 'if\>:' .. s:sol.'elif\>:' .. s:sol.'else\>:' .. s:sol .. 'fi\>,' .. | |
28 \ s:sol .. '\%(for\|while\)\>:' .. s:sol .. 'done\>,' .. | |
29 \ s:sol .. 'case\>:' .. s:sol .. 'esac\>' | |
30 unlet s:sol | |
31 let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" | |
7 | 32 endif |
33 | |
30202 | 34 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") |
33067
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
35 let b:browsefilter = "Bourne Shell Scripts (*.sh)\t*.sh\n" .. |
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
36 \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" .. |
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
37 \ "Bash Shell Scripts (*.bash)\t*.bash\n" .. |
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
38 \ "All Files (*.*)\t*.*\n" |
30202 | 39 let b:undo_ftplugin ..= " | unlet! b:browsefilter" |
7 | 40 endif |
41 | |
33360
77e0574450d0
runtime(sh): only invoke bash help in ftplugin if it has been detected to be bash (#13171)
Christian Brabandt <cb@256bit.org>
parents:
33067
diff
changeset
|
42 if (exists("b:is_bash") && (b:is_bash == 1)) |
33067
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
43 if !has("gui_running") && executable("less") |
32976
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
44 command! -buffer -nargs=1 Help silent exe '!bash -c "{ help "<args>" 2>/dev/null || man "<args>"; } | LESS= less"' | redraw! |
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
45 elseif has('terminal') |
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
46 command! -buffer -nargs=1 Help silent exe ':term bash -c "help "<args>" 2>/dev/null || man "<args>""' |
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
47 else |
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
48 command! -buffer -nargs=1 Help echo system('bash -c "help <args>" 2>/dev/null || man "<args>"') |
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
49 endif |
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
50 setlocal keywordprg=:Help |
33067
5c38f02377d5
runtime(sh): Update ftplugin (#12950)
Christian Brabandt <cb@256bit.org>
parents:
32976
diff
changeset
|
51 let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer Help" |
32976
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
52 endif |
d23645a0aca8
runtime: configure keywordpg for some file types (#5566)
Christian Brabandt <cb@256bit.org>
parents:
30202
diff
changeset
|
53 |
7 | 54 let &cpo = s:save_cpo |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
55 unlet s:save_cpo |
30202 | 56 |
57 " vim: nowrap sw=2 sts=2 ts=8 noet: |