Mercurial > vim
annotate runtime/ftplugin/sh.vim @ 29338:f4f531986753 v9.0.0012
patch 9.0.0012: signature files not detected properly
Commit: https://github.com/vim/vim/commit/cdbfc6dbab1d63aa56af316d6b13e37939e7f7a8
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 30 16:25:21 2022 +0100
patch 9.0.0012: signature files not detected properly
Problem: Signature files not detected properly.
Solution: Add a function to better detect signature files. (Doug Kearns)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 Jun 2022 17:30:06 +0200 |
parents | c968191a8557 |
children | fee9eccee266 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
2 " Language: sh | |
28010 | 3 " |
4 " This runtime file is looking for a new maintainer. | |
5 " | |
6 " Former maintainer: Dan Sharp | |
2034 | 7 " Last Changed: 20 Jan 2009 |
7 | 8 |
9 if exists("b:did_ftplugin") | finish | endif | |
10 let b:did_ftplugin = 1 | |
11 | |
12 " Make sure the continuation lines below do not cause problems in | |
13 " compatibility mode. | |
14 let s:save_cpo = &cpo | |
15 set cpo-=C | |
16 | |
17 setlocal commentstring=#%s | |
18 | |
19 " Shell: thanks to Johannes Zellner | |
20 if exists("loaded_matchit") | |
21 let s:sol = '\%(;\s*\|^\s*\)\@<=' " start of line | |
22 let b:match_words = | |
23 \ s:sol.'if\>:' . s:sol.'elif\>:' . s:sol.'else\>:' . s:sol. 'fi\>,' . | |
24 \ s:sol.'\%(for\|while\)\>:' . s:sol. 'done\>,' . | |
25 \ s:sol.'case\>:' . s:sol. 'esac\>' | |
26 endif | |
27 | |
28 " Change the :browse e filter to primarily show shell-related files. | |
29 if has("gui_win32") | |
30 let b:browsefilter="Bourne Shell Scripts (*.sh)\t*.sh\n" . | |
31 \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" . | |
32 \ "Bash Shell Scripts (*.bash)\t*.bash\n" . | |
33 \ "All Files (*.*)\t*.*\n" | |
34 endif | |
35 | |
36 " Undo the stuff we changed. | |
37 let b:undo_ftplugin = "setlocal cms< | unlet! b:browsefilter b:match_words" | |
38 | |
39 " Restore the saved compatibility options. | |
40 let &cpo = s:save_cpo | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
41 unlet s:save_cpo |