Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim filetype plugin file |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 2 | " Language: config |
Bram Moolenaar | 1588bc8 | 2022-03-08 21:35:07 +0000 | [diff] [blame] | 3 | " |
| 4 | " This runtime file is looking for a new maintainer. |
| 5 | " |
| 6 | " Former maintainer: Dan Sharp |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 7 | " Last Change: 2009 Jan 20 |
| 8 | " 2024 Jan 14 by Vim Project (browsefilter) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 9 | |
| 10 | if exists("b:did_ftplugin") | finish | endif |
| 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 | " Define some defaults in case the included ftplugins don't set them. |
| 18 | let s:undo_ftplugin = "" |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 19 | let s:browsefilter = "Bourne Shell Files (*.sh)\t*.sh\n" |
| 20 | if has("win32") |
| 21 | let s:browsefilter .= "All Files (*.*)\t*\n" |
| 22 | else |
| 23 | let s:browsefilter .= "All Files (*)\t*\n" |
| 24 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 25 | let s:match_words = "" |
| 26 | |
| 27 | runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim |
| 28 | let b:did_ftplugin = 1 |
| 29 | |
| 30 | " Override our defaults if these were set by an included ftplugin. |
| 31 | if exists("b:undo_ftplugin") |
| 32 | let s:undo_ftplugin = b:undo_ftplugin |
| 33 | endif |
| 34 | if exists("b:browsefilter") |
| 35 | let s:browsefilter = b:browsefilter |
| 36 | endif |
| 37 | |
| 38 | " Change the :browse e filter to primarily show configure-related files. |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 39 | if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 40 | let b:browsefilter="Configure Scripts (configure.*, config.*)\tconfigure*;config.*\n" . |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 41 | \ s:browsefilter |
| 42 | endif |
| 43 | |
| 44 | " Undo the stuff we changed. |
| 45 | let b:undo_ftplugin = "unlet! b:browsefilter | " . b:undo_ftplugin |
| 46 | |
| 47 | " Restore the saved compatibility options. |
| 48 | let &cpo = s:save_cpo |
Bram Moolenaar | 84f7235 | 2012-03-11 15:57:40 +0100 | [diff] [blame] | 49 | unlet s:save_cpo |