Mercurial > vim
comparison runtime/ftplugin/bash.vim @ 15512:f0f06837a699
Update runtime files.
commit https://github.com/vim/vim/commit/d09091d4955c5f41de69928f2db85611ed54ed23
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 17 16:07:22 2019 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 17 Jan 2019 16:15:08 +0100 |
parents | |
children | 03b854983b14 |
comparison
equal
deleted
inserted
replaced
15511:f41122780189 | 15512:f0f06837a699 |
---|---|
1 " Vim filetype plugin file | |
2 " Language: bash | |
3 " Maintainer: Bram Moolenaar | |
4 " Last Changed: 2019 Jan 12 | |
5 " | |
6 " This is not a real filetype plugin. It allows for someone to set 'filetype' | |
7 " to "bash" in the modeline, and gets the effect of filetype "sh" with | |
8 " b:is_bash set. Idea from Mahmode Al-Qudsi. | |
9 | |
10 if exists("b:did_ftplugin") | |
11 finish | |
12 endif | |
13 | |
14 let b:is_bash = 1 | |
15 if exists("b:is_sh") | |
16 unlet b:is_sh | |
17 endif | |
18 if exists("b:is_kornshell") | |
19 unlet b:is_kornshell | |
20 endif | |
21 | |
22 " Setting 'filetype' here directly won't work, since we are being invoked | |
23 " through an autocommand. Do it later, on the BufWinEnter event. | |
24 augroup bash_filetype | |
25 au BufWinEnter * call SetBashFt() | |
26 augroup END | |
27 | |
28 func SetBashFt() | |
29 au! bash_filetype | |
30 set ft=sh | |
31 endfunc |