Skip to content

Commit 301f5b4

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents e02454b + 6863084 commit 301f5b4

203 files changed

Lines changed: 9204 additions & 4089 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS_vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ runtime/ftplugin/spec.vim @ignatenkobrain
224224
runtime/ftplugin/ssa.vim @ObserverOfTime
225225
runtime/ftplugin/swayconfig.vim @jamespeapen
226226
runtime/ftplugin/systemverilog.vim @Kocha
227+
runtime/ftplugin/swig.vim @jmarrec
227228
runtime/ftplugin/tap.vim @petdance
228229
runtime/ftplugin/tcsh.vim @dkearns
229230
runtime/ftplugin/tidy.vim @dkearns
@@ -237,6 +238,7 @@ runtime/ftplugin/vdf.vim @ObserverOfTime
237238
runtime/ftplugin/wast.vim @rhysd
238239
runtime/ftplugin/wget.vim @dkearns
239240
runtime/ftplugin/wget2.vim @dkearns
241+
runtime/ftplugin/xcompose.vim @ObserverOfTime
240242
runtime/ftplugin/xml.vim @chrisbra
241243
runtime/ftplugin/xs.vim @petdance
242244
runtime/ftplugin/zsh.vim @chrisbra
@@ -448,6 +450,7 @@ runtime/syntax/nix.vim @equill
448450
runtime/syntax/nroff.vim @jmarshall
449451
runtime/syntax/nsis.vim @k-takata
450452
runtime/syntax/openvpn.vim @ObserverOfTime
453+
runtime/syntax/pacmanlog.vim @rpigott
451454
runtime/syntax/pascal.vim @dkearns
452455
runtime/syntax/pbtxt.vim @lakshayg
453456
runtime/syntax/pdf.vim @tpope
@@ -501,6 +504,7 @@ runtime/syntax/sshdconfig.vim @Jakuje
501504
runtime/syntax/sudoers.vim @e-kwsm
502505
runtime/syntax/svn.vim @hdima
503506
runtime/syntax/swayconfig.vim @jamespeapen
507+
runtime/syntax/swig.vim @jmarrec
504508
runtime/syntax/systemverilog.vim @Kocha
505509
runtime/syntax/tags.vim @cecamp
506510
runtime/syntax/tap.vim @petdance
@@ -525,6 +529,7 @@ runtime/syntax/wdl.vim @zenmatic
525529
runtime/syntax/wget.vim @dkearns
526530
runtime/syntax/wget2.vim @dkearns
527531
runtime/syntax/xbl.vim @dkearns
532+
runtime/syntax/xcompose.vim @ObserverOfTime
528533
runtime/syntax/xmath.vim @cecamp
529534
runtime/syntax/xml.vim @chrisbra
530535
runtime/syntax/xs.vim @petdance

.github/labeler.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ CI:
88
- any: ['.appveyor.yml']
99
- any: ['.codecov.yml']
1010

11+
documentation:
12+
- all: ['*/doc/*']
13+
1114
translation:
1215
- any: ['src/po/*.po']
1316

@@ -47,6 +50,46 @@ if_tcl:
4750
- any: ['src/proto/if_tcl.pro']
4851
- any: ['runtime/doc/if_tcl.txt']
4952

53+
installer:
54+
- any: ['nsis/**']
55+
- any: ['src/dosinst.*']
56+
- any: ['src/uninstall.c']
57+
58+
platform-mac:
59+
- any: ['src/INSTALLmac.txt']
60+
- any: ['src/os_mac*']
61+
- any: ['src/proto/os_mac*']
62+
63+
platform-windows:
64+
- any: ['nsis/**']
65+
- any: ['src/*.bat']
66+
- any: ['src/*.bmp']
67+
- any: ['src/*.ico']
68+
- any: ['src/GvimExt/*']
69+
- any: ['src/INSTALLpc.txt']
70+
- any: ['src/Make_cyg*.mak']
71+
- any: ['src/Make_ming.mak']
72+
- any: ['src/Make_mvc.mak']
73+
- any: ['src/dosinst.*']
74+
- any: ['src/gui_dwrite.*']
75+
- any: ['src/gui_w32*']
76+
- any: ['src/if_ole.*']
77+
- any: ['src/iid_ole.c']
78+
- any: ['src/os_mswin*']
79+
- any: ['src/os_w32*']
80+
- any: ['src/os_win32.*']
81+
- any: ['src/proto/gui_w32.pro']
82+
- any: ['src/proto/os_mswin.pro']
83+
- any: ['src/proto/os_win32.pro']
84+
- any: ['src/proto/winclip.pro']
85+
- any: ['src/uninstall.c']
86+
- any: ['src/vim.manifest']
87+
- any: ['src/vim.rc']
88+
- any: ['src/vimrun.c']
89+
- any: ['src/winclip.c']
90+
- any: ['src/xpm/**']
91+
- any: ['src/xpm_w32.*']
92+
5093
runtime:
5194
- any: ['runtime/ftplugin']
5295
- any: ['runtime/syntax']
@@ -58,3 +101,6 @@ termdebug: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
58101
plugin-netrw:
59102
- any: ['runtime/plugin/netrwPlugin.vim']
60103
- any: ['runtime/autoload/netrw*']
104+
105+
xxd:
106+
- any: ['src/xxd/*']

CONTRIBUTING.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Contributing to Vim
22

33
Patches are welcome in whatever form.
4-
Discussions about patches happen on the vim-dev maillist.
4+
Discussions about patches happen on the [vim-dev][0] mailing list.
55
If you create a pull request on GitHub it will be
6-
forwarded to the vim-dev maillist. You can also send your patch there
7-
directly. In that case an attachment with a unified diff format is preferred.
8-
Information about the maillist can be found [on the Vim website].
9-
10-
[on the Vim website]: http://www.vim.org/maillist.php#vim-dev
6+
forwarded to the vim-dev mailing list. You can also send your patch there
7+
directly (but please note, the initial posting is subject to moderation).
8+
In that case an attachment with a unified diff format is preferred.
9+
Information about the mailing list can be found [on the Vim website][0]
1110

1211
A pull request has the advantage that it will trigger the Continuous
1312
Integration tests, you will be warned of problems (you can ignore the coverage
@@ -22,31 +21,27 @@ Contributions will be distributed with Vim under the Vim license. Providing a
2221
change to be included implies that you agree with this and your contribution
2322
does not cause us trouble with trademarks or patents. There is no CLA to sign.
2423

25-
2624
# Reporting issues
2725

2826
We use GitHub issues, but that is not a requirement. Writing to the Vim
29-
maillist is also fine.
27+
mailing list is also fine.
3028

3129
Please use the GitHub issues only for actual issues. If you are not 100% sure
3230
that your problem is a Vim issue, please first discuss this on the Vim user
33-
maillist. Try reproducing the problem without any of your plugins or settings:
31+
mailing list. Try reproducing the problem without any of your plugins or settings:
3432

3533
vim --clean
3634

3735
If you report an issue, please describe exactly how to reproduce it.
3836
For example, don't say "insert some text" but say what you did exactly:
39-
"ahere is some text<Esc>".
37+
`ahere is some text<Esc>`.
4038
Ideally, the steps you list can be used to write a test to verify the problem
4139
is fixed.
4240

4341
Feel free to report even the smallest problem, also typos in the documentation.
4442

45-
You can find known issues in the todo file: ":help todo".
46-
Or open [the todo file] on GitHub to see the latest version.
47-
48-
[the todo file]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
49-
43+
You can find known issues in the todo file: `:help todo`.
44+
Or open [the todo file][todo list] on GitHub to see the latest version.
5045

5146
# Syntax, indent and other runtime files
5247

@@ -57,11 +52,10 @@ If you find a problem with one of these files or have a suggestion for
5752
improvement, please first try to contact the maintainer directly.
5853
Look in the header of the file for the name and email address.
5954

60-
The maintainer will take care of issues and send updates to Bram for
55+
The maintainer will take care of issues and send updates to the Vim project for
6156
distribution with Vim.
6257

63-
If the maintainer does not respond, contact the vim-dev maillist.
64-
58+
If the maintainer does not respond, contact the [vim-dev][0] mailing list.
6559

6660
# Translations
6761

@@ -77,8 +71,28 @@ can be translated:
7771
The help files can be translated and made available separately.
7872
See https://www.vim.org/translations.php for examples.
7973

74+
# How do I contribute to the project?
75+
76+
Please have a look at the following [discussion][6], which should give you some
77+
ideas. Please also check the [develop.txt][7] helpfile for the recommended
78+
style. Often it's also beneficial to check the surrounding code for the style
79+
being used.
80+
81+
# I have a question
82+
83+
If you have some question on the style guide, please contact the [vim-dev][0]
84+
mailing list. For other questions please use the [Vi Stack Exchange][8] website, the
85+
[vim-use][9] mailing list or make use of the [discussion][10] feature here at github.
86+
87+
[todo list]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
88+
[0]: http://www.vim.org/maillist.php#vim-dev
8089
[1]: https://github.com/vim/vim/blob/master/src/po/README.txt
8190
[2]: https://github.com/vim/vim/blob/master/runtime/lang/README.txt
8291
[3]: https://github.com/vim/vim/blob/master/runtime/tutor/README.txt
8392
[4]: https://github.com/vim/vim/blob/master/runtime/doc/vim.1
8493
[5]: https://github.com/vim/vim/blob/master/nsis/lang/english.nsi
94+
[6]: https://github.com/vim/vim/discussions/13087
95+
[7]: https://github.com/vim/vim/blob/master/runtime/doc/develop.txt
96+
[8]: https://vi.stackexchange.com
97+
[9]: http://www.vim.org/maillist.php#vim-use
98+
[10]: https://github.com/vim/vim/discussions

Filelist

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ SRC_ALL = \
213213
src/testdir/dumps/*.dump \
214214
src/testdir/dumps/*.vim \
215215
src/testdir/samples/*.txt \
216+
src/testdir/samples/*.vim \
216217
src/testdir/samples/test000 \
217218
src/testdir/color_ramp.vim \
218219
src/testdir/silent.wav \
@@ -698,6 +699,7 @@ RT_ALL = \
698699
runtime/doc/*.pl \
699700
runtime/doc/*.txt \
700701
runtime/doc/Makefile \
702+
runtime/doc/Make_all.mak \
701703
runtime/doc/doctags.c \
702704
runtime/doc/doctags.vim \
703705
runtime/doc/test_urls.vim \
@@ -756,6 +758,17 @@ RT_ALL = \
756758
runtime/pack/dist/opt/dvorak/dvorak/enable.vim \
757759
runtime/pack/dist/opt/dvorak/dvorak/disable.vim \
758760
runtime/pack/dist/opt/editexisting/plugin/editexisting.vim \
761+
runtime/pack/dist/opt/editorconfig/.editorconfig \
762+
runtime/pack/dist/opt/editorconfig/CONTRIBUTORS \
763+
runtime/pack/dist/opt/editorconfig/LICENSE* \
764+
runtime/pack/dist/opt/editorconfig/mkzip.sh \
765+
runtime/pack/dist/opt/editorconfig/README.md \
766+
runtime/pack/dist/opt/editorconfig/autoload/*.vim \
767+
runtime/pack/dist/opt/editorconfig/autoload/editorconfig_core/*.vim \
768+
runtime/pack/dist/opt/editorconfig/doc/tags \
769+
runtime/pack/dist/opt/editorconfig/doc/editorconfig.txt \
770+
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
771+
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
759772
runtime/pack/dist/opt/justify/plugin/justify.vim \
760773
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
761774
runtime/pack/dist/opt/matchit/doc/matchit.txt \
@@ -781,7 +794,9 @@ RT_SCRIPTS = \
781794
runtime/makemenu.vim \
782795
runtime/autoload/*.vim \
783796
runtime/autoload/README.txt \
797+
runtime/autoload/cargo/*.vim \
784798
runtime/autoload/dist/*.vim \
799+
runtime/autoload/rust/*.vim \
785800
runtime/autoload/xml/*.vim \
786801
runtime/autoload/zig/*.vim \
787802
runtime/colors/*.vim \
@@ -846,6 +861,8 @@ RT_AMI_DOS = \
846861
# DOS runtime (also in the extra archive)
847862
RT_DOS = \
848863
README_dos.txt \
864+
runtime/doc/Make_mvc.mak \
865+
runtime/tutor/Make_mvc.mak \
849866
vimtutor.bat \
850867

851868
# DOS runtime without CR-LF translation (also in the extra archive)
@@ -952,6 +969,7 @@ IN_README_DIR = \
952969
README_bindos.txt \
953970
README_dos.txt \
954971
README_extra.txt \
972+
README_haiku.txt \
955973
README_mac.txt \
956974
README_ole.txt \
957975
README_os2.txt \
@@ -988,11 +1006,13 @@ LANG_GEN = \
9881006
runtime/doc/*-tr.UTF-8.1 \
9891007
runtime/lang/README.txt \
9901008
runtime/lang/Makefile \
1009+
runtime/lang/Make_all.mak \
9911010
runtime/lang/menu_*.vim \
9921011
runtime/keymap/README.txt \
9931012
runtime/keymap/*.vim \
9941013
runtime/tutor/README.*.txt \
9951014
runtime/tutor/Makefile \
1015+
runtime/tutor/Make_all.mak \
9961016
runtime/tutor/tutor.utf-8 \
9971017
runtime/tutor/tutor.?? \
9981018
runtime/tutor/tutor.??.utf-8 \
@@ -1047,10 +1067,25 @@ LANG_SRC = \
10471067
src/po/vim.desktop.in \
10481068
src/po/gvim.desktop.in \
10491069
src/po/sjiscorr.c \
1070+
src/po/big5corr.c \
10501071
src/po/*.po \
10511072

10521073
# the language files for the Win32 lang archive
10531074
LANG_DOS = \
10541075
src/po/*.mo \
1076+
runtime/lang/Make_mvc.mak \
1077+
1078+
# Files in the repository that are deliberately not listed above, and will thus
1079+
# be excluded from distribution tarballs and the like.
1080+
# This excludes them from the CI check for unlisted files.
1081+
IGNORE = \
1082+
.appveyor.yml \
1083+
.github/FUNDING.yml \
1084+
.github/labeler.yml \
1085+
.github/workflows/label.yml \
1086+
SECURITY.md \
1087+
ci/unlisted.make \
1088+
src/libvterm/CODE-MAP \
1089+
runtime/syntax/testdir/input/html_html \
10551090

10561091
# vim: set ft=make:

ci/unlisted.make

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# vim: ft=make
2+
SHELL = /bin/bash
3+
4+
# List all files that are tracked in git but not listed in Filelist.
5+
# Exit code is 2 ("Make encountered an error") if any such files exist.
6+
7+
# Filelist is a Makefile that defines many variables, so we use Make itself to
8+
# query which variables it defines, then expand them all by wrapping each name
9+
# in $(...), importing Filelist and using $(eval).
10+
11+
include Filelist
12+
$(eval all_patterns := $(shell \
13+
make -f Filelist --question --print-data-base --no-builtin-rules \
14+
--no-builtin-variables 2>/dev/null \
15+
| sed -nre \
16+
'/^# makefile .from \x27Filelist\x27,/ { \
17+
n; \
18+
s/ = .*//; \
19+
T; \
20+
s/.*/$$(\0)/; \
21+
p; \
22+
}'))
23+
24+
# In Makefile's `prepeare` target, all the IN_README_DIR files are moved from
25+
# READMEdir to the root, so add those files in their Git-tracked location:
26+
all_patterns := $(all_patterns) \
27+
$(foreach readme, $(IN_README_DIR), READMEdir/$(readme))
28+
29+
# The result 'all_patterns' is a list of patterns (globs), which we expand with
30+
# wildcard to get actual filenames. Note this means Filelist can list a file
31+
# that does not exist, and it will be omitted at this step.
32+
listed_files := $(wildcard $(all_patterns))
33+
34+
# Default target to actually run the comparison:
35+
.PHONY: check
36+
check:
37+
@# There are too many files to list on the command line, so we write
38+
@# that to a temporary file, one per line.
39+
$(file > Filelist-listed-files)
40+
$(foreach filename, $(listed_files),\
41+
$(file >> Filelist-listed-files,$(filename)))
42+
@# Compare the sorted lists. Delete that temporary file on both
43+
@# success and failure, but exit with diff's exit code.
44+
diff -u0 --label files-in-git <(git ls-files | sort) \
45+
--label Filelist <(sort --unique Filelist-listed-files); \
46+
RV=$$?; \
47+
rm Filelist-listed-files; \
48+
(($$RV != 0)) && echo "Add files to the right variable in Filelist."; \
49+
exit $$RV

runtime/autoload/dist/ft.vim

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -590,23 +590,27 @@ export def FTprogress_cweb()
590590
endif
591591
enddef
592592

593-
export def FTprogress_asm()
593+
# These include the leading '%' sign
594+
var ft_swig_keywords = '^\s*%\%(addmethods\|apply\|beginfile\|clear\|constant\|define\|echo\|enddef\|endoffile\|extend\|feature\|fragment\|ignore\|import\|importfile\|include\|includefile\|inline\|insert\|keyword\|module\|name\|namewarn\|native\|newobject\|parms\|pragma\|rename\|template\|typedef\|typemap\|types\|varargs\|warn\)'
595+
# This is the start/end of a block that is copied literally to the processor file (C/C++)
596+
var ft_swig_verbatim_block_start = '^\s*%{'
597+
598+
export def FTi()
594599
if exists("g:filetype_i")
595600
exe "setf " .. g:filetype_i
596601
return
597602
endif
598-
# This function checks for an assembly comment the first ten lines.
603+
# This function checks for an assembly comment or a SWIG keyword or verbatim block in the first 50 lines.
599604
# If not found, assume Progress.
600605
var lnum = 1
601-
while lnum <= 10 && lnum < line('$')
606+
while lnum <= 50 && lnum < line('$')
602607
var line = getline(lnum)
603608
if line =~ '^\s*;' || line =~ '^\*'
604609
FTasm()
605610
return
606-
elseif line !~ '^\s*$' || line =~ '^/\*'
607-
# Not an empty line: Doesn't look like valid assembly code.
608-
# Or it looks like a Progress /* comment
609-
break
611+
elseif line =~ ft_swig_keywords || line =~ ft_swig_verbatim_block_start
612+
setf swig
613+
return
610614
endif
611615
lnum += 1
612616
endwhile

0 commit comments

Comments
 (0)