Files
neovim/runtime/indent
Sean Dewar aa5819f5a5 vim-patch:211211052d04 (#27048)
runtime(odin): include ftplugin, syntax and indent script (vim/vim#13867)

211211052d

Translate the files from Vim9 script to legacy Vim script. Notably:

- Prefer case-matching comparisons where needed.
- Save and restore `&cpo`.
- Make the functions script-local. (Pretty easy to use these in expr options now
  since Vim 9.0 anyways)

Add a note after the header for each file stating that they're manually
translated.

Co-authored-by: Maxim Kim <habamax@gmail.com>
2024-01-16 23:08:41 +00:00
..
2023-08-13 13:25:10 +01:00
2014-07-29 02:12:31 +00:00
2017-11-06 05:26:16 +01:00
2023-08-23 20:36:16 +01:00
2014-07-29 02:12:31 +00:00
2022-07-26 11:26:23 +02:00
2022-03-20 10:48:10 +01:00
2023-08-13 13:25:10 +01:00
2023-10-16 16:36:25 +08:00
2023-08-29 11:32:46 +02:00
2022-09-28 12:48:36 +02:00
2022-03-30 12:12:12 +01:00
2023-12-15 10:30:13 +01:00
2021-10-05 14:12:16 +02:00
2021-10-05 14:12:16 +02:00
2017-04-29 01:47:36 +02:00
2023-08-13 13:25:10 +01:00
2022-06-10 08:40:32 +02:00
2021-10-05 14:12:16 +02:00
2023-12-29 00:54:09 +01:00
2023-08-13 13:25:10 +01:00
2022-04-08 19:53:41 +02:00
2017-11-06 05:26:16 +01:00
2022-06-17 20:38:21 +02:00
2023-05-15 09:38:32 +02:00
2023-08-29 11:32:46 +02:00
2017-11-06 05:35:32 +01:00
2021-10-05 14:12:16 +02:00
2023-10-16 16:36:25 +08:00
2019-07-29 20:50:07 +02:00
2021-10-05 14:12:16 +02:00
2022-07-26 11:26:23 +02:00
2022-04-27 17:48:35 +02:00
2023-08-29 11:32:46 +02:00
2023-12-23 12:41:10 +01:00
2017-11-07 01:37:30 +01:00
2023-08-29 11:32:46 +02:00
2022-09-28 12:48:36 +02:00
2022-03-20 10:48:10 +01:00
2021-10-16 18:03:51 +02:00
2023-08-29 11:32:46 +02:00
2017-11-07 01:37:30 +01:00
2023-08-23 20:36:16 +01:00
2017-11-07 01:37:30 +01:00
2021-04-27 09:21:30 -04:00
2017-11-06 05:35:32 +01:00
2022-07-30 15:48:32 +02:00
2022-09-10 14:54:13 +02:00
2023-08-29 11:32:46 +02:00
2014-07-29 02:12:31 +00:00
2023-10-16 16:36:25 +08:00
2023-09-17 22:52:56 +02:00
2023-10-16 16:36:25 +08:00
2021-10-05 14:12:16 +02:00
2015-10-11 18:07:58 -04:00
2021-09-13 16:33:41 +02:00
2022-03-20 10:48:10 +01:00
2023-04-23 15:22:55 +02:00
2023-08-29 11:32:46 +02:00
2023-08-21 20:32:28 +09:00
2023-05-15 09:38:32 +02:00
2023-08-23 20:36:16 +01:00
2021-04-28 23:04:14 -04:00
2021-10-05 14:12:16 +02:00
2017-04-28 23:49:16 +02:00
2017-04-29 01:01:51 +02:00
2023-08-24 11:33:06 +09:00
2023-08-29 11:32:46 +02:00
2024-01-16 23:08:41 +00:00
2021-10-05 14:12:16 +02:00
2023-09-09 08:29:50 +02:00
2023-09-05 08:48:47 +02:00
2022-04-27 17:48:35 +02:00
2021-05-02 12:03:34 -04:00
2023-08-13 13:25:10 +01:00
2022-05-09 16:31:55 +02:00
2023-12-27 10:55:29 +01:00
2023-12-16 15:57:22 +01:00
2023-08-29 11:32:46 +02:00
2019-07-29 20:50:07 +02:00
2023-10-16 16:36:25 +08:00
2021-10-05 14:12:16 +02:00
2023-08-23 20:31:08 +01:00
2023-04-23 15:22:55 +02:00
2023-04-23 15:22:55 +02:00
2021-05-01 22:29:02 -04:00
2023-08-29 11:32:46 +02:00
2023-09-02 11:08:29 +02:00
2023-09-13 17:23:45 +02:00
2023-12-29 00:54:09 +01:00
2023-08-29 11:32:46 +02:00
2018-10-28 14:07:58 +01:00
2021-10-05 14:12:16 +02:00
2021-12-26 11:03:25 +01:00
2023-08-24 11:33:06 +09:00
2014-07-29 02:12:31 +00:00
2021-10-16 18:03:51 +02:00
2021-04-28 21:29:57 -04:00
2021-10-05 14:12:16 +02:00
2021-10-16 18:03:51 +02:00
2023-08-29 11:32:46 +02:00
2022-04-27 17:48:35 +02:00
2022-04-27 17:48:35 +02:00
2022-04-27 17:48:35 +02:00
2023-08-29 11:32:46 +02:00
2023-11-25 17:33:05 +01:00
2023-01-01 15:00:39 +01:00
2023-08-29 11:32:46 +02:00
2023-08-29 11:32:46 +02:00
2023-08-13 13:25:10 +01:00
2014-12-30 13:51:39 +01:00
2022-04-27 17:48:35 +02:00
2023-08-13 13:25:10 +01:00
2022-04-27 17:48:35 +02:00
2014-07-29 02:12:31 +00:00
2022-04-27 17:48:35 +02:00
2022-12-08 16:33:38 +01:00
2023-08-13 13:25:10 +01:00
2015-11-08 03:39:07 +01: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.