| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 1 | # Contributing to Vim |
| 2 | |
| 3 | Patches are welcome in whatever form. |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 4 | Discussions about patches happen on the [vim-dev][0] mailing list. |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 5 | If you create a pull request on GitHub it will be |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 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] |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 10 | |
| Bram Moolenaar | 6f33b89 | 2019-08-04 23:22:08 +0200 | [diff] [blame] | 11 | A pull request has the advantage that it will trigger the Continuous |
| 12 | Integration tests, you will be warned of problems (you can ignore the coverage |
| 13 | warning, it's noisy). |
| 14 | |
| 15 | Please consider adding a test. All new functionality should be tested and bug |
| 16 | fixes should be tested for regressions: the test should fail before the fix and |
| 17 | pass after the fix. Look through recent patches for examples and find help |
| 18 | with ":help testing". The tests are located under "src/testdir". |
| 19 | |
| 20 | Contributions will be distributed with Vim under the Vim license. Providing a |
| 21 | change to be included implies that you agree with this and your contribution |
| 22 | does not cause us trouble with trademarks or patents. There is no CLA to sign. |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 23 | |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 24 | # Reporting issues |
| 25 | |
| 26 | We use GitHub issues, but that is not a requirement. Writing to the Vim |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 27 | mailing list is also fine. |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 28 | |
| 29 | Please use the GitHub issues only for actual issues. If you are not 100% sure |
| 30 | that your problem is a Vim issue, please first discuss this on the Vim user |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 31 | mailing list. Try reproducing the problem without any of your plugins or settings: |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 32 | |
| Bram Moolenaar | 723dd94 | 2019-04-04 13:11:03 +0200 | [diff] [blame] | 33 | vim --clean |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 34 | |
| 35 | If you report an issue, please describe exactly how to reproduce it. |
| 36 | For example, don't say "insert some text" but say what you did exactly: |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 37 | `ahere is some text<Esc>`. |
| Bram Moolenaar | 5447802 | 2015-09-01 19:50:09 +0200 | [diff] [blame] | 38 | Ideally, the steps you list can be used to write a test to verify the problem |
| 39 | is fixed. |
| Bram Moolenaar | 6017f37 | 2015-09-01 17:50:48 +0200 | [diff] [blame] | 40 | |
| 41 | Feel free to report even the smallest problem, also typos in the documentation. |
| 42 | |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 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. |
| Bram Moolenaar | b58988b | 2015-09-01 21:25:44 +0200 | [diff] [blame] | 45 | |
| 46 | # Syntax, indent and other runtime files |
| 47 | |
| 48 | The latest version of these files can be obtained from the repository. |
| Christian Brabandt | 3ac83c7 | 2024-05-08 19:39:54 +0200 | [diff] [blame] | 49 | They are usually not updated with numbered patches. However, they may |
| 50 | or may not work with older Vim releases (since they may contain new features). |
| Bram Moolenaar | b58988b | 2015-09-01 21:25:44 +0200 | [diff] [blame] | 51 | |
| 52 | If you find a problem with one of these files or have a suggestion for |
| 53 | improvement, please first try to contact the maintainer directly. |
| Christian Brabandt | 3ac83c7 | 2024-05-08 19:39:54 +0200 | [diff] [blame] | 54 | Look in the header of the file for the name, email address, github handle and/or |
| 55 | upstream repository. You may also check the [MAINTAINERS][11] file. |
| Bram Moolenaar | b58988b | 2015-09-01 21:25:44 +0200 | [diff] [blame] | 56 | |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 57 | The maintainer will take care of issues and send updates to the Vim project for |
| Bram Moolenaar | b58988b | 2015-09-01 21:25:44 +0200 | [diff] [blame] | 58 | distribution with Vim. |
| 59 | |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 60 | If the maintainer does not respond, contact the [vim-dev][0] mailing list. |
| Bram Moolenaar | b477af2 | 2018-07-15 20:20:18 +0200 | [diff] [blame] | 61 | |
| Christian Brabandt | 3ac83c7 | 2024-05-08 19:39:54 +0200 | [diff] [blame] | 62 | ## Contributing new runtime files |
| 63 | |
| 64 | If you want to contribute new runtime files for Vim or Neovim, please create a |
| 65 | PR 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 Moolenaar | b477af2 | 2018-07-15 20:20:18 +0200 | [diff] [blame] | 73 | # Translations |
| 74 | |
| Bram Moolenaar | a60e536 | 2019-04-11 13:11:39 +0200 | [diff] [blame] | 75 | Translating messages and runtime files is very much appreciated! These things |
| 76 | can be translated: |
| Bram Moolenaar | a9604e6 | 2018-07-21 05:56:22 +0200 | [diff] [blame] | 77 | * Messages in Vim, see [src/po/README.txt][1] |
| Bram Moolenaar | a60e536 | 2019-04-11 13:11:39 +0200 | [diff] [blame] | 78 | Also used for the desktop icons. |
| Bram Moolenaar | a9604e6 | 2018-07-21 05:56:22 +0200 | [diff] [blame] | 79 | * 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 Moolenaar | a60e536 | 2019-04-11 13:11:39 +0200 | [diff] [blame] | 82 | * Installer, see [nsis/lang/\*.nsi][5] for examples |
| Bram Moolenaar | b477af2 | 2018-07-15 20:20:18 +0200 | [diff] [blame] | 83 | |
| 84 | The help files can be translated and made available separately. |
| 85 | See https://www.vim.org/translations.php for examples. |
| Bram Moolenaar | a9604e6 | 2018-07-21 05:56:22 +0200 | [diff] [blame] | 86 | |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 87 | # How do I contribute to the project? |
| 88 | |
| 89 | Please have a look at the following [discussion][6], which should give you some |
| 90 | ideas. Please also check the [develop.txt][7] helpfile for the recommended |
| 91 | style. Often it's also beneficial to check the surrounding code for the style |
| 92 | being used. |
| 93 | |
| 94 | # I have a question |
| 95 | |
| 96 | If you have some question on the style guide, please contact the [vim-dev][0] |
| 97 | mailing 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 Moolenaar | a9604e6 | 2018-07-21 05:56:22 +0200 | [diff] [blame] | 102 | [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 Moolenaar | a60e536 | 2019-04-11 13:11:39 +0200 | [diff] [blame] | 106 | [5]: https://github.com/vim/vim/blob/master/nsis/lang/english.nsi |
| shane.xb.qian | 4ae16d7 | 2023-11-12 16:45:15 +0100 | [diff] [blame] | 107 | [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 Brabandt | 3ac83c7 | 2024-05-08 19:39:54 +0200 | [diff] [blame] | 112 | [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 |