blob: 99bfcfa2c8c782121baacf12734d0925169da127 [file] [log] [blame] [view]
Bram Moolenaar6017f372015-09-01 17:50:48 +02001# Contributing to Vim
2
3Patches are welcome in whatever form.
shane.xb.qian4ae16d72023-11-12 16:45:15 +01004Discussions about patches happen on the [vim-dev][0] mailing list.
Bram Moolenaar6017f372015-09-01 17:50:48 +02005If you create a pull request on GitHub it will be
shane.xb.qian4ae16d72023-11-12 16:45:15 +01006forwarded to the vim-dev mailing list. You can also send your patch there
7directly (but please note, the initial posting is subject to moderation).
8In that case an attachment with a unified diff format is preferred.
9Information about the mailing list can be found [on the Vim website][0]
Bram Moolenaar6017f372015-09-01 17:50:48 +020010
Bram Moolenaar6f33b892019-08-04 23:22:08 +020011A pull request has the advantage that it will trigger the Continuous
12Integration tests, you will be warned of problems (you can ignore the coverage
13warning, it's noisy).
14
15Please consider adding a test. All new functionality should be tested and bug
16fixes should be tested for regressions: the test should fail before the fix and
17pass after the fix. Look through recent patches for examples and find help
18with ":help testing". The tests are located under "src/testdir".
19
20Contributions will be distributed with Vim under the Vim license. Providing a
21change to be included implies that you agree with this and your contribution
22does not cause us trouble with trademarks or patents. There is no CLA to sign.
Bram Moolenaar6017f372015-09-01 17:50:48 +020023
Bram Moolenaar6017f372015-09-01 17:50:48 +020024# Reporting issues
25
26We use GitHub issues, but that is not a requirement. Writing to the Vim
shane.xb.qian4ae16d72023-11-12 16:45:15 +010027mailing list is also fine.
Bram Moolenaar6017f372015-09-01 17:50:48 +020028
29Please use the GitHub issues only for actual issues. If you are not 100% sure
30that your problem is a Vim issue, please first discuss this on the Vim user
shane.xb.qian4ae16d72023-11-12 16:45:15 +010031mailing list. Try reproducing the problem without any of your plugins or settings:
Bram Moolenaar6017f372015-09-01 17:50:48 +020032
Bram Moolenaar723dd942019-04-04 13:11:03 +020033 vim --clean
Bram Moolenaar6017f372015-09-01 17:50:48 +020034
35If you report an issue, please describe exactly how to reproduce it.
36For example, don't say "insert some text" but say what you did exactly:
shane.xb.qian4ae16d72023-11-12 16:45:15 +010037`ahere is some text<Esc>`.
Bram Moolenaar54478022015-09-01 19:50:09 +020038Ideally, the steps you list can be used to write a test to verify the problem
39is fixed.
Bram Moolenaar6017f372015-09-01 17:50:48 +020040
41Feel free to report even the smallest problem, also typos in the documentation.
42
shane.xb.qian4ae16d72023-11-12 16:45:15 +010043You can find known issues in the todo file: `:help todo`.
44Or open [the todo file][todo list] on GitHub to see the latest version.
Bram Moolenaarb58988b2015-09-01 21:25:44 +020045
46# Syntax, indent and other runtime files
47
48The latest version of these files can be obtained from the repository.
Christian Brabandt3ac83c72024-05-08 19:39:54 +020049They are usually not updated with numbered patches. However, they may
50or may not work with older Vim releases (since they may contain new features).
Bram Moolenaarb58988b2015-09-01 21:25:44 +020051
52If you find a problem with one of these files or have a suggestion for
53improvement, please first try to contact the maintainer directly.
Christian Brabandt3ac83c72024-05-08 19:39:54 +020054Look in the header of the file for the name, email address, github handle and/or
55upstream repository. You may also check the [MAINTAINERS][11] file.
Bram Moolenaarb58988b2015-09-01 21:25:44 +020056
shane.xb.qian4ae16d72023-11-12 16:45:15 +010057The maintainer will take care of issues and send updates to the Vim project for
Bram Moolenaarb58988b2015-09-01 21:25:44 +020058distribution with Vim.
59
shane.xb.qian4ae16d72023-11-12 16:45:15 +010060If the maintainer does not respond, contact the [vim-dev][0] mailing list.
Bram Moolenaarb477af22018-07-15 20:20:18 +020061
Christian Brabandt3ac83c72024-05-08 19:39:54 +020062## Contributing new runtime files
63
64If you want to contribute new runtime files for Vim or Neovim, please create a
65PR with your changes against this repository here. For new filetypes, do not forget:
66* to add a new [filetype test][12] (keep it similar to the other filetype tests).
67* all configuration switches should be documented
68 (check [filetype.txt][13] and/or [syntax.txt][14] for filetype and syntax plugins)
69* add yourself as Maintainer to the top of file (again, keep the header similar to
70 other runtime files)
71* add yourself to the [MAINTAINERS][11] file.
72
Bram Moolenaarb477af22018-07-15 20:20:18 +020073# Translations
74
Bram Moolenaara60e5362019-04-11 13:11:39 +020075Translating messages and runtime files is very much appreciated! These things
76can be translated:
Bram Moolenaara9604e62018-07-21 05:56:22 +020077* Messages in Vim, see [src/po/README.txt][1]
Bram Moolenaara60e5362019-04-11 13:11:39 +020078 Also used for the desktop icons.
Bram Moolenaara9604e62018-07-21 05:56:22 +020079* Menus, see [runtime/lang/README.txt][2]
80* Vim tutor, see [runtime/tutor/README.txt][3]
81* Manual pages, see [runtime/doc/\*.1][4] for examples
Bram Moolenaara60e5362019-04-11 13:11:39 +020082* Installer, see [nsis/lang/\*.nsi][5] for examples
Bram Moolenaarb477af22018-07-15 20:20:18 +020083
84The help files can be translated and made available separately.
85See https://www.vim.org/translations.php for examples.
Bram Moolenaara9604e62018-07-21 05:56:22 +020086
shane.xb.qian4ae16d72023-11-12 16:45:15 +010087# How do I contribute to the project?
88
89Please have a look at the following [discussion][6], which should give you some
90ideas. Please also check the [develop.txt][7] helpfile for the recommended
91style. Often it's also beneficial to check the surrounding code for the style
92being used.
93
94# I have a question
95
96If you have some question on the style guide, please contact the [vim-dev][0]
97mailing list. For other questions please use the [Vi Stack Exchange][8] website, the
98[vim-use][9] mailing list or make use of the [discussion][10] feature here at github.
99
100[todo list]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
101[0]: http://www.vim.org/maillist.php#vim-dev
Bram Moolenaara9604e62018-07-21 05:56:22 +0200102[1]: https://github.com/vim/vim/blob/master/src/po/README.txt
103[2]: https://github.com/vim/vim/blob/master/runtime/lang/README.txt
104[3]: https://github.com/vim/vim/blob/master/runtime/tutor/README.txt
105[4]: https://github.com/vim/vim/blob/master/runtime/doc/vim.1
Bram Moolenaara60e5362019-04-11 13:11:39 +0200106[5]: https://github.com/vim/vim/blob/master/nsis/lang/english.nsi
shane.xb.qian4ae16d72023-11-12 16:45:15 +0100107[6]: https://github.com/vim/vim/discussions/13087
108[7]: https://github.com/vim/vim/blob/master/runtime/doc/develop.txt
109[8]: https://vi.stackexchange.com
110[9]: http://www.vim.org/maillist.php#vim-use
111[10]: https://github.com/vim/vim/discussions
Christian Brabandt3ac83c72024-05-08 19:39:54 +0200112[11]: https://github.com/vim/vim/blob/master/.github/MAINTAINERS
113[12]: https://github.com/vim/vim/blob/master/src/testdir/test_filetype.vim
114[13]: https://github.com/vim/vim/blob/master/runtime/doc/filetype.txt
115[14]: https://github.com/vim/vim/blob/master/runtime/doc/syntax.txt