Home Explore Blog CI



neovim

9th chunk of `runtime/doc/indent.txt`
0f2d68400d649bcfe24a1dff1c31d91f4d4844e602169d2d0000000100000fa0
 'lispwords'.  If you have a custom construct that
should be indented in this idiosyncratic fashion, you can add your symbols to
the default list below.
>
	" Default
	let g:clojure_special_indent_words =
	   \ 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn'
<

					*g:clojure_align_multiline_strings*

Align subsequent lines in multi-line strings to the column after the opening
quote, instead of the same column.

For example:
>
	(def default
	  "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
	  eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
	  enim ad minim veniam, quis nostrud exercitation ullamco laboris
	  nisi ut aliquip ex ea commodo consequat.")

	(def aligned
	  "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
	   eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
	   enim ad minim veniam, quis nostrud exercitation ullamco laboris
	   nisi ut aliquip ex ea commodo consequat.")
<

						*g:clojure_align_subforms*

By default, parenthesized compound forms that look like function calls and
whose head subform is on its own line have subsequent subforms indented by
two spaces relative to the opening paren:
>
	(foo
	  bar
	  baz)
<
Setting this option to `1` changes this behaviour so that all subforms are
aligned to the same column, emulating the default behaviour of
clojure-mode.el:
>
	(foo
	 bar
	 baz)
<

FORTRAN							*ft-fortran-indent*

Block if, select case, select type, select rank,  where, forall, type,
interface, associate, block, enum, critical, and change team constructs are
indented. The indenting of subroutines, functions, modules, and program blocks
is optional. Comments, labeled statements, and continuation lines are indented
if the Fortran is in free source form, whereas they are not indented if the
Fortran is in fixed source form because of the left margin requirements. Hence
manual indent corrections will be necessary for labeled statements and
continuation lines when fixed source form is being used.  For further
discussion of the method used for the detection of source format see
|ft-fortran-syntax|.

Do loops ~
All do loops are left unindented by default.  Do loops can be unstructured in
Fortran with (possibly multiple) loops ending on a labeled executable
statement of almost arbitrary type.  Correct indentation requires
compiler-quality parsing.  Old code with do loops ending on labeled statements
of arbitrary type can be indented with elaborate programs such as Tidy.
Structured do/continue loops are also left unindented because continue
statements are used for purposes other than ending a do loop.  Programs such
as Tidy can convert structured do/continue loops to the do/enddo form.  Do
loops of the do/enddo variety can be indented.  If you use only structured
loops of the do/enddo form, you should declare this by setting the
fortran_do_enddo variable in your vimrc as follows >

   let fortran_do_enddo=1

in which case do loops will be indented.  If all your loops are of do/enddo
type only in, say, .f90 files, then you should set a buffer flag with an
autocommand such as >

  au! BufRead,BufNewFile *.f90 let b:fortran_do_enddo=1

to get do loops indented in .f90 files and left alone in Fortran files with
other extensions such as .for.

Program units ~
Indenting of program units (subroutines, functions, modules, and program
blocks) can be increased by setting the variable fortran_indent_more and can
be decreased by setting the variable fortran_indent_less.  These variables
can be set for all fortran files in your vimrc as follows >

  let fortran_indent_less=1

A finer level of control can be achieved by setting the corresponding
buffer-local variable as follows >

  let b:fortran_indent_less=1


HTML				*ft-html-indent* *html-indent* *html-indenting*

This is about variables you can set in your vimrc to customize HTML indenting.

You can set the indent for the first line after <script> and <style>
"blocktags" (default "zero"):

Title: Clojure and Fortran Indent Options
Summary
This section details specific Clojure indent options such as 'g:clojure_align_multiline_strings' for aligning multiline strings and 'g:clojure_align_subforms' for controlling subform alignment in parenthesized expressions. It then transitions to Fortran indentation, covering the indenting of block constructs, comments, labeled statements, and do loops. The discussion includes how to handle unstructured do loops and how to indent do/enddo loops using the 'fortran_do_enddo' variable. It also addresses indenting program units via 'fortran_indent_more' and 'fortran_indent_less'. Finally, it briefly introduces HTML indent customization using variables in the vimrc.