Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ indent_size = 2
# https://spec.commonmark.org/0.31.2/#hard-line-breaks
trim_trailing_whitespace = false

[*.vim]
indent_style = space
indent_size = 2

[runtime/pack/dist/opt/{comment,nohlsearch}/**.vim]
indent_style = space
indent_size = 4

[runtime/doc/**.txt]
# It can mess up some documentation by trying to strip trailing whitespaces
trim_trailing_whitespace = false
Expand Down
10 changes: 10 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@
# change indentation style of netrw plugin
c363ca1ecd1f8db03663ef98dcf41eeacc3c22c7
c673b805ad80d0aef07e745d412a2bf298ba1c07
# fix indentation style in insexpand.c v9.1.1352
355db99d12a89f05765948b33eecd6d9733e16bb
# fix indentation styles in various files v9.1.1363
c2a9000bc1b4a2cbcfeef55450c184b16906d910
# indentation style in various files v9.1.1364
562610cfa327c8ebff12a1700525e17a070d5e2c
# Patch v9.1.1371
19e1dd6b6aeb96d64122332a8c3d17b9d5ca007b
# Patch v9.1.1372
a4a00a7ad0cfa26685c057c11a09bec2c962346a
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ src/json_test
src/message_test
src/kword_test

runtime/syntax/testdir/done/
runtime/syntax/testdir/messages
runtime/syntax/testdir/testdeps.mk
runtime/syntax/testdir/vimcmd

# Generated by "make install"
runtime/doc/doctags
runtime/doc/tags-*
Expand Down
18 changes: 15 additions & 3 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,33 @@ src/json_test
src/message_test
src/kword_test

runtime/syntax/testdir/done/
runtime/syntax/testdir/messages
runtime/syntax/testdir/testdeps.mk
runtime/syntax/testdir/vimcmd

# Generated by "make install"
runtime/doc/doctags
runtime/doc/tags-*

# Temporarily generated by "runtime/syntax/generator/make"
runtime/syntax/generator/generator.err
runtime/syntax/generator/sanity_check.err
runtime/syntax/generator/vim.vim.rc

# Generated by "make shadow". The directory names could be anything but we
# restrict them to shadow (the default) or shadow-*
src/shadow
src/shadow-*
src/runtime
src/pixmaps
src/LICENSE
src/README.txt

# other files possibly created by tools
src/cscope.out

# Linter/language server files
/.cache/clangd/
/.ccls-cache/
/compile_commands.json
.cache/clangd/
.ccls-cache/
compile_commands.json
28 changes: 27 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,31 @@ Contributions will be distributed with Vim under the Vim license. Providing a
change to be included implies that you agree with this and your contribution
does not cause us trouble with trademarks or patents. There is no CLA to sign.

## Signing-off commits

While not required, it's recommended to use **Signed-off commits** to ensure
transparency, accountability, and compliance with open-source best practices.
Signed-off commits follow the [Developer Certificate of Origin (DCO)][15],
which confirms that contributors have the right to submit their changes under
the project's license. This process adds a `Signed-off-by` line to commit
messages, verifying that the contributor agrees to the project's licensing
terms. To sign off a commit, simply use the -s flag when committing:

```sh
git commit -s
```

This ensures that every contribution is properly documented and traceable,
aligning with industry standards used in projects like the Linux Kernel or
the git project. By making Signed-off commits a standard practice, we help
maintain a legally compliant and well-governed codebase while fostering trust
within our contributor community.

When merging PRs into Vim, the current maintainer @chrisbra usually adds missing
`Signed-off-by` trailers for the author user name and email address as well for
anybody that explicitly *ACK*s a pull request as a statement that those
approvers are happy with that particular change.

# Reporting issues

We use GitHub issues, but that is not a requirement. Writing to the Vim
Expand All @@ -46,7 +71,7 @@ Or open [the todo file][todo list] on GitHub to see the latest version.
# Syntax, indent and other runtime files

The latest version of these files can be obtained from the repository.
They are usually not updated with numbered patches. However, they may
They are usually not updated with numbered patches. However, they may
or may not work with older Vim releases (since they may contain new features).

If you find a problem with one of these files or have a suggestion for
Expand Down Expand Up @@ -113,3 +138,4 @@ mailing list. For other questions please use the [Vi Stack Exchange][8] website,
[12]: https://github.com/vim/vim/blob/master/src/testdir/test_filetype.vim
[13]: https://github.com/vim/vim/blob/master/runtime/doc/filetype.txt
[14]: https://github.com/vim/vim/blob/master/runtime/doc/syntax.txt
[15]: https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin
38 changes: 31 additions & 7 deletions Filelist
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ SRC_ALL = \
ci/appveyor.bat \
ci/config.mk*.sed \
ci/if_ver*.vim \
ci/if_feat_check.vim \
ci/setup-xvfb.sh \
ci/setup-sway.sh \
ci/remove_snap.sh \
ci/ddebs.list \
ci/pinned-pkgs \
src/Make_all.mak \
src/README.md \
src/alloc.c \
Expand Down Expand Up @@ -157,6 +161,7 @@ SRC_ALL = \
src/textobject.c \
src/textprop.c \
src/time.c \
src/tuple.c \
src/typval.c \
src/ui.c \
src/undo.c \
Expand Down Expand Up @@ -223,6 +228,7 @@ SRC_ALL = \
src/testdir/samples/*.html \
src/testdir/samples/*.txt \
src/testdir/samples/*.vim \
src/testdir/samples/poc.zip \
src/testdir/samples/test000 \
src/testdir/samples/test.zip \
src/testdir/samples/test_undo.txt.undo \
Expand Down Expand Up @@ -338,6 +344,7 @@ SRC_ALL = \
src/proto/textobject.pro \
src/proto/textprop.pro \
src/proto/time.pro \
src/proto/tuple.pro \
src/proto/typval.pro \
src/proto/ui.pro \
src/proto/undo.pro \
Expand Down Expand Up @@ -771,16 +778,16 @@ RT_ALL = \
runtime/tools/[a-z]*[a-z0-9] \
runtime/tutor/README.txt \
runtime/tutor/tutor1 \
runtime/tutor/tutor1.utf-8 \
runtime/tutor/en/vim-01-beginner.tutor \
runtime/tutor/en/vim-01-beginner.tutor.json \
runtime/tutor/it/vim-01-beginner.tutor \
runtime/tutor/it/vim-01-beginner.tutor.json \
runtime/tutor/sr/vim-01-beginner.tutor \
runtime/tutor/sr/vim-01-beginner.tutor.json \
runtime/tutor/en/vim-02-beginner.tutor \
runtime/tutor/en/vim-02-beginner.tutor.json \
runtime/tutor/tutor.tutor \
runtime/tutor/tutor.tutor.json \
runtime/tutor/tutor.vim \
runtime/tutor/tutor2 \
runtime/tutor/tutor2.utf-8 \
runtime/vimrc_example.vim \
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
runtime/pack/dist/opt/comment/plugin/comment.vim \
Expand All @@ -803,7 +810,10 @@ RT_ALL = \
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
runtime/pack/dist/opt/helptoc/autoload/helptoc.vim \
runtime/pack/dist/opt/helptoc/doc/helptoc.txt \
runtime/pack/dist/opt/helptoc/doc/tags \
runtime/pack/dist/opt/helptoc/plugin/helptoc.vim \
runtime/pack/dist/opt/hlyank/plugin/hlyank.vim \
runtime/pack/dist/opt/justify/plugin/justify.vim \
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
runtime/pack/dist/opt/matchit/doc/matchit.txt \
Expand All @@ -816,7 +826,9 @@ RT_ALL = \
runtime/pack/dist/opt/netrw/LICENSE.txt \
runtime/pack/dist/opt/netrw/README.md \
runtime/pack/dist/opt/netrw/autoload/netrw.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/own.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/os.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/msg.vim \
runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim \
runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim \
runtime/pack/dist/opt/netrw/doc/netrw.txt \
Expand Down Expand Up @@ -856,6 +868,7 @@ RT_SCRIPTS = \
runtime/indent/testdir/*.vim \
runtime/indent/testdir/*.in \
runtime/indent/testdir/*.ok \
runtime/indent/testdir/tools/* \
runtime/ftplugin/*.vim \
runtime/ftplugin/logtalk.dict \
runtime/ftplugin/README.txt \
Expand All @@ -876,6 +889,7 @@ RT_SCRIPTS = \
runtime/syntax/testdir/input/setup/*.* \
runtime/syntax/testdir/dumps/*.dump \
runtime/syntax/testdir/dumps/*.vim \
runtime/syntax/testdir/tools/* \
runtime/syntax/generator/Makefile \
runtime/syntax/generator/README.md \
runtime/syntax/generator/gen_syntax_vim.vim \
Expand Down Expand Up @@ -1074,7 +1088,16 @@ LANG_GEN = \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
runtime/tutor/Make_all.mak \
runtime/tutor/tutor1.utf-8 \
runtime/tutor/it/vim-01-beginner.tutor \
runtime/tutor/it/vim-01-beginner.tutor.json \
runtime/tutor/ru/vim-01-beginner.tutor \
runtime/tutor/ru/vim-01-beginner.tutor.json \
runtime/tutor/ru/vim-02-beginner.tutor \
runtime/tutor/ru/vim-02-beginner.tutor.json \
runtime/tutor/sr/vim-01-beginner.tutor \
runtime/tutor/sr/vim-01-beginner.tutor.json \
runtime/tutor/sr/vim-02-beginner.tutor \
runtime/tutor/sr/vim-02-beginner.tutor.json \
runtime/tutor/tutor1.?? \
runtime/tutor/tutor1.??.utf-8 \
runtime/tutor/tutor1.??.euc \
Expand All @@ -1087,7 +1110,6 @@ LANG_GEN = \
runtime/tutor/tutor1.??_??.utf-8 \
runtime/tutor/tutor1.bar \
runtime/tutor/tutor1.bar.utf-8 \
runtime/tutor/tutor2.utf-8 \
runtime/tutor/tutor2.?? \
runtime/tutor/tutor2.??.utf-8 \
runtime/spell/README.txt \
Expand Down Expand Up @@ -1148,6 +1170,8 @@ IGNORE = \
.github/workflows/label.yml \
SECURITY.md \
ci/unlisted.make \
ci/hlgroups.make \
ci/hlgroups.ignore \
src/libvterm/CODE-MAP \
runtime/syntax/testdir/input/html_html \

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ VIM_FOR_SYNTAXTEST = ../../src/vim

# (For local testing only with GNU Make.)
VIM_SYNTAX_TEST_FILTER =
VIM_SYNTAX_TEST_WAIT_TIME =

syntaxtest:
cd runtime/syntax && \
Expand Down
6 changes: 3 additions & 3 deletions ci/appveyor.bat
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cd src
echo "Building MSVC 64bit console Version"
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
if not exist vim.exe (
echo Build failure.
exit 1
Expand All @@ -85,11 +85,11 @@ if "%FEATURE%" == "HUGE" (
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
) ELSE (
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
)
if not exist gvim.exe (
echo Build failure.
Expand Down
3 changes: 3 additions & 0 deletions ci/ddebs.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deb http://ddebs.ubuntu.com noble main restricted universe multiverse
deb http://ddebs.ubuntu.com noble-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com noble-proposed main restricted universe multiverse
66 changes: 66 additions & 0 deletions ci/hlgroups.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
ColorColumn
ComplMatchIns
Conceal
Cursor
CursorColumn
CursorIM
CursorLine
CursorLineNr
debugBreakpoint
debugPC
DiffAdd
DiffChange
DiffDelete
DiffText
Directory
ErrorMsg
FoldColumn
Folded
Ignore
IncSearch
lCursor
LineNr
LineNrAbove
LineNrBelow
MatchParen
Menu
ModeMsg
MoreMsg
MsgArea
NonText
Normal
Pmenu
PmenuSbar
PmenuSel
PmenuThumb
Question
Scrollbar
Search
SignColumn
SpecialKey
SpellBad
SpellCap
SpellLocal
SpellRare
StatusLine
StatusLineNC
StatusLineTerm
StatusLineTermNC
TabLine
TabLineFill
TabLineSel
Terminal
Title
TOhtmlProgress
TOhtml-progress-color
ToolbarButton
ToolbarLine
Tooltip
User1
User1..9
User9
VertSplit
Visual
VisualNOS
WarningMsg
WildMenu
18 changes: 18 additions & 0 deletions ci/hlgroups.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# vim: ft=make
SHELL = /bin/bash

# Default target to actually run the comparison:
.PHONY: check
.INTERMEDIATE: hlgroups deflinks hlgroups.stripped

check: hlgroups.stripped deflinks
diff hlgroups.stripped deflinks

hlgroups:
grep '\*hl-' ../runtime/doc/*txt | sed -E -e 's/.*:<?\s*//' -e 's/hl-//g' -e 's/\*//g' -e 's/ /\n/g' | sort > hlgroups

deflinks: ../src/highlight.c
grep '"default link' $< | sed 's/.*default link\s*\(.*\)\s.*/\1/' | sort > deflinks

hlgroups.stripped: hlgroups.ignore hlgroups
grep -v -x -F -f hlgroups.ignore hlgroups > hlgroups.stripped
15 changes: 15 additions & 0 deletions ci/if_feat_check.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if 1 " This prevents it from being run in tiny versions
" Check for required features
if exists("g:required")
for feature in g:required
if !has(feature)
echo "Error: Feature '" .. feature .. "' not found"
echo ''
cquit
endif
endfor
echo "\nChecked features: " .. string(g:required)
echo ''
endif
endif
" vim: sts=2 sw=2 et
Loading
Loading