annotate runtime/ftplugin/bash.vim @ 17565:0026ea34a8d5 v8.1.1780

patch 8.1.1780: warning for file no longer available is repeated commit https://github.com/vim/vim/commit/674e2bde6e7b0c468f304713aa8f97a45e1fcc89 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 31 20:21:01 2019 +0200 patch 8.1.1780: warning for file no longer available is repeated Problem: Warning for file no longer available is repeated every time Vim is focused. (Brian Armstrong) Solution: Only give the message once. (closes #4748)
author Bram Moolenaar <Bram@vim.org>
date Wed, 31 Jul 2019 20:30:07 +0200
parents f0f06837a699
children 03b854983b14
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15512
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim filetype plugin file
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: bash
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Bram Moolenaar
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Changed: 2019 Jan 12
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 "
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 " This is not a real filetype plugin. It allows for someone to set 'filetype'
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 " to "bash" in the modeline, and gets the effect of filetype "sh" with
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 " b:is_bash set. Idea from Mahmode Al-Qudsi.
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 if exists("b:did_ftplugin")
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 finish
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 endif
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 let b:is_bash = 1
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 if exists("b:is_sh")
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 unlet b:is_sh
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 endif
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 if exists("b:is_kornshell")
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 unlet b:is_kornshell
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 endif
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 " Setting 'filetype' here directly won't work, since we are being invoked
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 " through an autocommand. Do it later, on the BufWinEnter event.
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 augroup bash_filetype
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 au BufWinEnter * call SetBashFt()
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 augroup END
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 func SetBashFt()
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 au! bash_filetype
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 set ft=sh
f0f06837a699 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 endfunc