Mercurial > vim
annotate runtime/indent/README.txt @ 32770:4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Commit: https://github.com/vim/vim/commit/e978b4534a5e10471108259118c0ef791106fd92
Author: Christian Brabandt <cb@256bit.org>
Date: Sun Aug 13 10:33:05 2023 +0200
Farewell to Bram and dedicate upcoming Vim 9.1 to him (https://github.com/vim/vim/issues/12749)
* Dedicate upcoming Vim 9.1 to Bram
Also replace in a few more places Brams email address and mention new
maintainers.
* Remove Bram from any Maintainer role
* runtime: Align Header
* it's mailing list not mailinglist
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 13 Aug 2023 10:45:08 +0200 |
parents | f73a9bdff3a3 |
children | 1b2730ece70e |
rev | line source |
---|---|
7 | 1 This directory contains files to automatically compute the indent for a |
2 type of file. | |
3 | |
4 If you want to add your own indent file for your personal use, read the docs | |
5 at ":help indent-expression". Looking at the existing files should give you | |
6 inspiration. | |
7 | |
8 If you make a new indent file which would be useful for others, please send it | |
32770
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
28517
diff
changeset
|
9 to the vim-dev mailing list <vim-dev@vim.org>. Include instructions for |
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
28517
diff
changeset
|
10 detecting the file type for this language, by file name extension or by |
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
28517
diff
changeset
|
11 checking a few lines in the file. And please stick to the rules below. |
7 | 12 |
13 If you have remarks about an existing file, send them to the maintainer of | |
14 that file. Only when you get no response send a message to Bram@vim.org. | |
15 | |
16 If you are the maintainer of an indent file and make improvements, e-mail the | |
17 new version to Bram@vim.org. | |
18 | |
19 | |
20 Rules for making an indent file: | |
21 | |
22 You should use this check for "b:did_indent": | |
23 | |
24 " Only load this indent file when no other was loaded yet. | |
25 if exists("b:did_indent") | |
26 finish | |
27 endif | |
28 let b:did_indent = 1 | |
29 | |
30 Always use ":setlocal" to set 'indentexpr'. This avoids it being carried over | |
31 to other buffers. | |
32 | |
33 To trigger the indenting after typing a word like "endif", add the word to the | |
28517 | 34 'indentkeys' option with "+=". |
7 | 35 |
36 You normally set 'indentexpr' to evaluate a function and then define that | |
37 function. That function only needs to be defined once for as long as Vim is | |
38 running. Add a test if the function exists and use ":finish", like this: | |
39 if exists("*GetMyIndent") | |
40 finish | |
41 endif | |
42 | |
43 The user may have several options set unlike you, try to write the file such | |
44 that it works with any option settings. Also be aware of certain features not | |
45 being compiled in. | |
14970
19b757c6c6a7
patch 8.1.0496: no tests for indent files
Bram Moolenaar <Bram@vim.org>
parents:
7
diff
changeset
|
46 |
19b757c6c6a7
patch 8.1.0496: no tests for indent files
Bram Moolenaar <Bram@vim.org>
parents:
7
diff
changeset
|
47 To test the indent file, see testdir/README.txt. |