Mercurial > vim
annotate runtime/ftplugin/scheme.vim @ 34134:8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Commit: https://github.com/vim/vim/commit/93197fde0f1db09b1e495cf3eb14a8f42c318b80
Author: Doug Kearns <dougkearns@gmail.com>
Date: Sun Jan 14 20:59:02 2024 +0100
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Problem: The "*.*" browsefilter pattern only matches all files on
Windows (Daryl Lee)
Solution: Use "*" to filter on all platforms but keep "*.*" as the label
text on Windows. (Fixes #12685, Doug Kearns)
The *.* browsefilter pattern used to match "All Files" on Windows is a
legacy of the DOS 8.3 filename wildcard matching algorithm. For reasons
of backward compatibility this still works on Windows to match all
files, even those without an extension.
However, this pattern only matches filenames containing a dot on other
platforms. This often makes files without an extension difficult to
access from the file dialog, e.g., "Makefile"
On Windows it is still standard practice to use "*.*" for the filter
label so ftplugins should use "All Files (*.*)" on Windows and "All
Files (*)" on other platforms. This matches Vim's default browsefilter
values.
This commit also normalises the browsefilter conditional test to check
for the Win32 and GTK GUI features and an unset b:browsefilter.
closes: #12759
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 14 Jan 2024 21:15:03 +0100 |
parents | 29ec2c198c8d |
children | 7c7432a53a6c |
rev | line source |
---|---|
13231 | 1 " Vim filetype plugin file |
2 " Language: Scheme (R7RS) | |
25619 | 3 " Last Change: 2019-11-19 |
13231 | 4 " Author: Evan Hanson <evhan@foldling.org> |
5 " Maintainer: Evan Hanson <evhan@foldling.org> | |
6 " Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com> | |
25619 | 7 " Repository: https://git.foldling.org/vim-scheme.git |
13231 | 8 " URL: https://foldling.org/vim/ftplugin/scheme.vim |
3256 | 9 |
13231 | 10 if exists('b:did_ftplugin') |
3256 | 11 finish |
12 endif | |
13 | |
13231 | 14 let s:cpo = &cpo |
15 set cpo&vim | |
36 | 16 |
3256 | 17 setl lisp |
13437 | 18 setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|# |
4119 | 19 setl commentstring=;%s |
13231 | 20 setl define=^\\s*(def\\k* |
21 setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126 | |
7 | 22 |
13231 | 23 let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword<' |
3256 | 24 |
18664 | 25 setl lispwords+=case |
13231 | 26 setl lispwords+=define |
27 setl lispwords+=define-record-type | |
28 setl lispwords+=define-syntax | |
29 setl lispwords+=define-values | |
30 setl lispwords+=do | |
31 setl lispwords+=guard | |
32 setl lispwords+=lambda | |
33 setl lispwords+=let | |
34 setl lispwords+=let* | |
35 setl lispwords+=let*-values | |
36 setl lispwords+=let-syntax | |
37 setl lispwords+=let-values | |
38 setl lispwords+=letrec | |
39 setl lispwords+=letrec* | |
40 setl lispwords+=letrec-syntax | |
41 setl lispwords+=parameterize | |
42 setl lispwords+=set! | |
43 setl lispwords+=syntax-rules | |
44 setl lispwords+=unless | |
45 setl lispwords+=when | |
46 | |
47 let b:undo_ftplugin = b:undo_ftplugin . ' lispwords<' | |
48 | |
49 let b:did_scheme_ftplugin = 1 | |
50 | |
51 if exists('b:is_chicken') || exists('g:is_chicken') | |
25619 | 52 runtime! ftplugin/chicken.vim |
36 | 53 endif |
54 | |
13231 | 55 unlet b:did_scheme_ftplugin |
56 let b:did_ftplugin = 1 | |
57 let &cpo = s:cpo | |
58 unlet s:cpo |