vim/runtime/indent
David Mandelberg 54c88d0cf8
runtime(indent-tests): GitHub Actions doesn't show why indent tests failed
Problem:  GitHub Actions doesn't show why indent tests failed
Solution: Send the .fail files to stdout

References:
https://github.com/vim/vim/pull/16852#issuecomment-2719041781

closes: #16870

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 22:43:08 +01:00
..
testdir runtime(vim): Split Vim legacy and Vim9 script indent tests 2025-01-13 07:54:33 +01:00
aap.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
ada.vim Update runtime files 2022-04-08 17:45:08 +01:00
ant.vim updated for version 7.0001 2004-06-13 20:20:40 +00:00
arduino.vim runtime(arduino): Add Arduino ftplugin and indent files (#14811) 2024-05-20 14:13:35 +02:00
astro.vim runtime(astro): Add filetype, syntax and indent plugin 2024-04-21 15:50:31 +02:00
automake.vim Runtime file updates. 2017-03-05 17:04:09 +01:00
awk.vim Update runtime files 2022-04-08 17:45:08 +01:00
bash.vim runtime: Remove Brams name from a few more runtime files (#12780) 2023-08-23 21:23:07 +02:00
basic.vim Update runtime files 2022-01-29 22:20:48 +00:00
bib.vim updated for version 7.0065 2005-03-28 20:58:01 +00:00
bitbake.vim Update runtime files 2022-07-25 15:42:07 +01:00
bst.vim Update runtime files 2022-03-19 15:18:53 +00:00
bzl.vim Update runtime files 2021-07-28 20:10:16 +02:00
c.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
cdl.vim runtime: Fix more typos (#13354) 2023-10-16 09:53:37 +02:00
ch.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
chaiscript.vim Update runtime files 2022-04-08 17:45:08 +01:00
changelog.vim updated for version 7.0066 2005-04-15 21:13:42 +00:00
chatito.vim Update runtime files 2022-09-27 17:30:34 +01:00
clojure.vim Update runtime files 2022-03-30 10:51:39 +01:00
cmake.vim runtime(cmake): sync runtime files with upstream (#13597) 2023-12-14 20:38:29 +01:00
cobol.vim Update runtime files 2021-10-04 21:32:54 +01:00
config.vim Update runtime files 2021-10-04 21:32:54 +01:00
context.vim runtime(context): update ConTeXt keywords and other minor fixes (#13778) 2023-12-27 18:49:50 +01:00
cpp.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
cs.vim Update runtime files 2022-06-09 20:45:54 +01:00
css.vim Update runtime files 2021-10-04 21:32:54 +01:00
cucumber.vim runtime(cucumber): Updates to indent and syntax 2023-12-28 23:17:54 +01:00
cuda.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
d.vim Update runtime files 2022-04-08 17:45:08 +01:00
dictconf.vim Update runtime files 2022-04-08 17:45:08 +01:00
dictdconf.vim Update runtime files 2022-04-08 17:45:08 +01:00
docbk.vim Runtime file updates. 2017-03-05 17:04:09 +01:00
dosbatch.vim Update runtime files 2021-10-23 12:08:41 +01:00
dtd.vim Update runtime files 2022-06-17 15:42:40 +01:00
dtrace.vim updated for version 7.2a 2008-06-24 21:56:24 +00:00
dts.vim Update runtime files 2023-05-14 18:50:25 +01:00
dune.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
dylan.vim Update runtime files 2022-04-08 17:45:08 +01:00
eiffel.vim Update runtime files. 2017-03-16 17:41:02 +01:00
elm.vim Update runtime files 2021-10-04 21:32:54 +01:00
erlang.vim runtime: Fix more typos (#13354) 2023-10-16 09:53:37 +02:00
eruby.vim Update runtime files. 2019-01-17 16:07:22 +01:00
eterm.vim Update runtime files 2021-10-04 21:32:54 +01:00
expect.vim Update runtime files 2022-07-25 15:42:07 +01:00
falcon.vim Update runtime files 2022-04-08 17:45:08 +01:00
fennel.vim Update runtime files 2022-04-27 15:25:03 +01:00
fish.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
fortran.vim Runtime(fortran): updates to indent, syntax and ftplugin (#13752) 2023-12-23 11:31:38 +01:00
framescript.vim Update runtime files 2021-10-04 21:32:54 +01:00
freebasic.vim Update runtime files 2022-01-29 22:20:48 +00:00
gdscript.vim Update runtime files 2022-08-30 20:26:34 +01:00
gitconfig.vim Update runtime files. 2017-06-13 18:12:01 +02:00
gitolite.vim Update runtime files 2022-04-08 17:45:08 +01:00
glsl.vim patch 9.1.0610: filetype: OpenGL Shading Language files are not detected 2024-07-22 20:33:48 +02:00
go.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
graphql.vim runtime(graphql): contribute vim-graphql to Vim core 2024-12-23 09:57:42 +01:00
gyp.vim Update runtime files 2022-09-27 17:30:34 +01:00
haml.vim Update runtime files 2022-03-19 15:18:53 +00:00
hamster.vim Update runtime files 2021-10-16 15:23:36 +01:00
hare.vim patch 9.1.0442: hare runtime files outdated 2024-05-24 08:05:00 +02:00
hcl.vim runtime(hcl,terraform): Add runtime files for HCL and Terraform 2024-09-04 22:19:45 +02:00
hog.vim Update runtime files. 2017-06-13 18:12:01 +02:00
html.vim runtime: Remove Brams name from a few more runtime files (#12780) 2023-08-23 21:23:07 +02:00
htmldjango.vim updated for version 7.1a 2007-05-05 17:54:07 +00:00
idlang.vim Update runtime files 2022-04-08 17:45:08 +01:00
idris2.vim runtime(idris2): include filetype,indent+syntax plugins for (L)Idris2 + ipkg 2024-11-12 21:52:20 +01:00
ishd.vim Update runtime files. 2017-06-13 18:12:01 +02:00
j.vim Update runtime files. 2019-11-17 15:55:14 +01:00
java.vim Update runtime files. 2017-03-16 17:41:02 +01:00
javascript.vim Update runtime files 2022-07-29 21:36:21 +01:00
javascriptreact.vim patch 8.1.1937: errors when using javascriptreact 2019-08-29 21:24:21 +02:00
json.vim Update runtime files 2022-09-10 13:13:14 +01:00
json5.vim runtime(json5): add basic indent support (#14298) 2024-03-26 19:02:44 +01:00
jsonc.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
jsp.vim updated for version 7.1a 2007-05-05 17:54:07 +00:00
julia.vim runtime: Fix more typos (#13354) 2023-10-16 09:53:37 +02:00
just.vim patch 9.1.1042: filetype: just files are not recognized 2025-01-20 21:56:41 +01:00
kdl.vim runtime(kdl): fix KdlIndent and kdlComment in indent script (#15019) 2024-06-16 08:47:47 +02:00
kotlin.vim runtime(kotlin): Add Kotlin runtime files (#13110) 2023-09-17 18:51:22 +02:00
krl.vim runtime: Fix more typos (#13354) 2023-10-16 09:53:37 +02:00
ld.vim Update runtime files 2021-10-04 21:32:54 +01:00
less.vim Update runtime files. 2015-01-07 16:57:10 +01:00
lifelines.vim Update runtime files 2021-09-09 21:55:11 +02:00
liquid.vim Update runtime files 2022-03-19 15:18:53 +00:00
lisp.vim Update runtime files 2022-08-08 15:42:38 +01:00
livebook.vim Update runtime files 2023-04-22 22:40:14 +01:00
logtalk.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
lua.vim runtime(lua): add/subtract a 'shiftwidth' after '('/')' in indentexpr 2024-08-04 18:47:25 +02:00
luau.vim Update runtime files 2023-05-14 18:50:25 +01:00
m17ndb.vim patch 9.1.1140: filetype: m17ndb files are not detected 2025-02-23 09:41:42 +01:00
mail.vim runtime: Remove Brams name from a few more runtime files (#12780) 2023-08-23 21:23:07 +02:00
make.vim Update runtime files 2022-04-08 17:45:08 +01:00
Make_mvc.mak patch 9.1.0527: inconsistent parameter in Makefiles for Vim executable 2024-07-04 17:48:01 +02:00
Makefile runtime(indent-tests): GitHub Actions doesn't show why indent tests failed 2025-03-12 22:43:08 +01:00
matlab.vim Update runtime files 2021-10-04 21:32:54 +01:00
meson.vim Update runtime files 2021-11-07 20:27:04 +00:00
mf.vim Update runtime files 2022-08-26 18:01:12 +01:00
mma.vim Update runtime files 2022-04-08 17:45:08 +01:00
mojo.vim runtime(mojo): include mojo ftplugin and indent script 2024-07-11 22:51:48 +02:00
mp.vim Update runtime files 2022-08-26 18:01:12 +01:00
nginx.vim Update runtime files 2022-12-31 15:30:45 +00:00
nsis.vim runtime: Fix typos in various files 2023-08-23 21:20:00 +02:00
objc.vim Update runtime files 2022-04-08 17:45:08 +01:00
obse.vim Update runtime files 2022-11-23 23:46:31 +00:00
ocaml.vim patch 9.1.0586: ocaml runtime files are outdated 2024-07-14 17:02:33 +02:00
occam.vim Update runtime files 2022-04-08 17:45:08 +01:00
odin.vim runtime(odin): include ftplugin, syntax and indent script (#13867) 2024-01-16 17:33:51 +01:00
pascal.vim Update runtime files 2021-10-04 21:32:54 +01:00
perl.vim runtime(perl): Update ftplugin and indent files (#13052) 2023-09-08 19:16:03 +02:00
php.vim runtime(php): Update the php indent script to the 1.75 (from 1.70) (#13025) 2023-09-04 22:22:19 +02:00
postscr.vim Update runtime files. 2022-05-21 13:08:16 +01:00
pov.vim Update runtime files 2022-04-27 15:25:03 +01:00
prolog.vim Update runtime files 2022-04-08 17:45:08 +01:00
proto.vim runtime(proto): Add indent script for protobuf filetype 2024-08-07 21:23:59 +02:00
ps1.vim Update runtime files 2021-04-07 21:07:20 +02:00
pyrex.vim updated for version 7.0092 2005-06-24 23:01:23 +00:00
python.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
qb64.vim Update runtime files 2022-01-29 22:20:48 +00:00
qml.vim runtime(qml): Use shiftwidth() in indent plugin (#13908) 2024-01-23 20:33:32 +01:00
quarto.vim Update runtime files 2023-02-27 15:49:53 +00:00
r.vim runtime(misc): announce adoption of various runtime files 2024-02-19 20:46:49 +01:00
racket.vim runtime(racket): update Racket runtime files 2024-11-13 19:45:38 +01:00
raku.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
raml.vim Update runtime files 2018-11-04 14:45:49 +01:00
rapid.vim runtime: Fix more typos (#13354) 2023-10-16 09:53:37 +02:00
readline.vim Update runtime files 2021-10-04 21:32:54 +01:00
README.txt runtime: Remove Brams email in indent/README.txt 2023-08-13 18:17:21 +02:00
rhelp.vim runtime(misc): announce adoption of various runtime files 2024-02-19 20:46:49 +01:00
rmd.vim runtime(misc): announce adoption of various runtime files 2024-02-19 20:46:49 +01:00
rnoweb.vim runtime(misc): announce adoption of various runtime files 2024-02-19 20:46:49 +01:00
rpl.vim Update runtime files. 2020-10-26 21:12:46 +01:00
rrst.vim runtime(misc): announce adoption of various runtime files 2024-02-19 20:46:49 +01:00
rst.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
ruby.vim runtime(ruby): Update syntax, indent and ftplugin files 2023-09-01 18:36:49 +02:00
rust.vim runtime(rust): use shiftwidth() in indent script 2024-07-04 19:11:16 +02:00
sas.vim Update runtime files 2022-04-08 17:45:08 +01:00
sass.vim runtime(sass): Provide sass_recommended_style option 2023-12-28 23:17:54 +01:00
scala.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
scheme.vim runtime(scheme): update runtime files 2024-06-21 07:49:39 +02:00
scss.vim Updated runtime files. 2010-07-26 22:21:27 +02:00
sdl.vim Update runtime files 2021-10-04 21:32:54 +01:00
sh.vim runtime(sh): better function support for bash/zsh in indent script 2024-11-14 21:52:44 +01:00
sml.vim Update runtime files 2022-04-08 17:45:08 +01:00
solidity.vim runtime(solidity): add new ftplugin (#12877) 2023-08-22 19:28:42 +01:00
sql.vim updated for version 7.2a 2008-06-24 20:39:31 +00:00
sqlanywhere.vim Update runtime files 2021-10-16 15:23:36 +01:00
sshconfig.vim Update runtime files 2020-05-26 21:20:45 +02:00
stylus.vim patch 9.1.0386: filetype: stylus files not recognized 2024-05-01 18:42:11 +02:00
systemverilog.vim runtime: Fix more typos (#13354) 2023-10-16 09:53:37 +02:00
tcl.vim Update runtime files 2021-10-04 21:32:54 +01:00
tcsh.vim Update runtime files 2021-10-16 15:23:36 +01:00
teraterm.vim Update runtime files 2021-10-23 12:08:41 +01:00
terraform.vim runtime(hcl,terraform): Add runtime files for HCL and Terraform 2024-09-04 22:19:45 +02:00
tex.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
tf.vim Update runtime files 2022-04-27 15:25:03 +01:00
thrift.vim runtime(thrift): add ftplugin, indent and syntax scripts 2024-07-29 20:51:05 +02:00
tilde.vim Update runtime files 2022-04-27 15:25:03 +01:00
treetop.vim Update runtime files 2022-04-27 15:25:03 +01:00
typescript.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
typescriptreact.vim runtime(tsx): add indentation plugin (fixes #13574) (#13576) 2023-11-25 15:38:09 +01:00
typst.vim runtime(typst): add definition lists to formatlistpat, update maintainer 2024-12-09 20:31:04 +01:00
vb.vim runtime(vb): update vb indent plugin as vim9script 2024-05-20 14:38:10 +02:00
verilog.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
vhdl.vim runtime: Set b:undo_indent where missing (#12944) 2023-08-28 21:32:59 +02:00
vim.vim runtime(vim): make &indentexpr available from the outside 2024-07-12 20:02:31 +02:00
vroom.vim Updated runtime files. 2014-08-22 19:21:47 +02:00
vue.vim Update runtime files 2022-12-31 15:30:45 +00:00
wat.vim patch 9.0.2104: wast filetype should be replaced by wat filetype 2023-11-14 16:46:07 +01:00
xf86conf.vim Update runtime files 2022-04-27 15:25:03 +01:00
xhtml.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
xinetd.vim Update runtime files 2022-04-27 15:25:03 +01:00
xml.vim Update runtime files 2021-12-24 13:18:38 +00:00
xsd.vim updated for version 7.0084 2005-06-13 22:28:56 +00:00
xslt.vim updated for version 7.0001 2004-06-13 20:20:40 +00:00
yacc.vim Update runtime files 2022-04-27 15:25:03 +01:00
yaml.vim runtime(yaml): do not re-indent when commenting out lines 2024-08-15 22:29:47 +02:00
zig.vim Update runtime files 2022-12-06 18:20:10 +00:00
zimbu.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
zsh.vim Updated runtime files. 2015-06-09 19:44:55 +02:00

This directory contains files to automatically compute the indent for a
type of file.

If you want to add your own indent file for your personal use, read the docs
at ":help indent-expression".  Looking at the existing files should give you
inspiration.

If you make a new indent file which would be useful for others, please send it
to the vim-dev mailing list <vim-dev@vim.org>.  Include instructions for
detecting the file type for this language, by file name extension or by
checking a few lines in the file. And please stick to the rules below.

If you have remarks about an existing file, send them to the maintainer of
that file.  Only when you get no response send a message to the vim-dev
mailing list: <vim-dev@vim.org>.

If you are the maintainer of an indent file and make improvements, e-mail the
new version to the vim-dev mailing list: <vim-dev@vim.org>.


Rules for making an indent file:

You should use this check for "b:did_indent":

	" Only load this indent file when no other was loaded yet.
	if exists("b:did_indent")
	  finish
	endif
	let b:did_indent = 1

Always use ":setlocal" to set 'indentexpr'.  This avoids it being carried over
to other buffers.

To trigger the indenting after typing a word like "endif", add the word to the
'indentkeys' option with "+=".

You normally set 'indentexpr' to evaluate a function and then define that
function.  That function only needs to be defined once for as long as Vim is
running.  Add a test if the function exists and use ":finish", like this:
	if exists("*GetMyIndent")
	  finish
	endif

The user may have several options set unlike you, try to write the file such
that it works with any option settings.  Also be aware of certain features not
being compiled in.

To test the indent file, see testdir/README.txt.