1This directory contains files to automatically compute the indent for a
2type of file.
3
4If you want to add your own indent file for your personal use, read the docs
5at ":help indent-expression".  Looking at the existing files should give you
6inspiration.
7
8If you make a new indent file which would be useful for others, please send it
9to Bram@vim.org.  Include instructions for detecting the file type for this
10language, by file name extension or by checking a few lines in the file.
11And please stick to the rules below.
12
13If you have remarks about an existing file, send them to the maintainer of
14that file.  Only when you get no response send a message to Bram@vim.org.
15
16If you are the maintainer of an indent file and make improvements, e-mail the
17new version to Bram@vim.org.
18
19
20Rules for making an indent file:
21
22You 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
30Always use ":setlocal" to set 'indentexpr'.  This avoids it being carried over
31to other buffers.
32
33To trigger the indenting after typing a word like "endif", add the word to the
34'cinkeys' option with "+=".
35
36You normally set 'indentexpr' to evaluate a function and then define that
37function.  That function only needs to be defined once for as long as Vim is
38running.  Add a test if the function exists and use ":finish", like this:
39	if exists("*GetMyIndent")
40	  finish
41	endif
42
43The user may have several options set unlike you, try to write the file such
44that it works with any option settings.  Also be aware of certain features not
45being compiled in.
46