summaryrefslogtreecommitdiffstats
path: root/runtime/doc/indent.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-11-07 20:27:04 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-07 20:27:04 +0000
commit113cb513f76d8866cbb6dc85fa18aded753e01da (patch)
tree991e2a39e12fe20709be583772ec8038ff3134e5 /runtime/doc/indent.txt
parent15d9890eee53afc61eb0a03b878a19cb5672f732 (diff)
Update runtime files
Diffstat (limited to 'runtime/doc/indent.txt')
-rw-r--r--runtime/doc/indent.txt59
1 files changed, 24 insertions, 35 deletions
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 6a2dd5106b..87bbd488eb 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -608,26 +608,25 @@ CLOJURE *ft-clojure-indent* *clojure-indent*
Clojure indentation differs somewhat from traditional Lisps, due in part to
the use of square and curly brackets, and otherwise by community convention.
These conventions are not universally followed, so the Clojure indent script
-offers a few configurable options, listed below.
+offers a few configuration options.
+
+(If the current Vim does not include |searchpairpos()|, the indent script falls
+back to normal 'lisp' indenting, and the following options are ignored.)
-If the current vim does not include searchpairpos(), the indent script falls
-back to normal 'lisp' indenting, and the following options are ignored.
*g:clojure_maxlines*
-Set maximum scan distance of searchpairpos(). Larger values trade performance
-for correctness when dealing with very long forms. A value of 0 will scan
-without limits.
->
- " Default
- let g:clojure_maxlines = 100
-<
+Sets maximum scan distance of `searchpairpos()`. Larger values trade
+performance for correctness when dealing with very long forms. A value of
+0 will scan without limits. The default is 300.
+
+
*g:clojure_fuzzy_indent*
*g:clojure_fuzzy_indent_patterns*
*g:clojure_fuzzy_indent_blacklist*
The 'lispwords' option is a list of comma-separated words that mark special
-forms whose subforms must be indented with two spaces.
+forms whose subforms should be indented with two spaces.
For example:
>
@@ -645,15 +644,11 @@ the fuzzy indent feature:
let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
let g:clojure_fuzzy_indent_blacklist =
\ ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
-
- " Legacy comma-delimited string version; the list format above is
- " recommended. Note that patterns are implicitly anchored with ^ and $
- let g:clojure_fuzzy_indent_patterns = 'with.*,def.*,let.*'
<
|g:clojure_fuzzy_indent_patterns| and |g:clojure_fuzzy_indent_blacklist| are
-|Lists| of patterns that will be matched against the unquoted, unqualified
-symbol at the head of a list. This means that a pattern like "^foo" will match
-all these candidates: "foobar", "my.ns/foobar", and "#'foobar".
+lists of patterns that will be matched against the unqualified symbol at the
+head of a list. This means that a pattern like `"^foo"` will match all these
+candidates: `foobar`, `my.ns/foobar`, and `#'foobar`.
Each candidate word is tested for special treatment in this order:
@@ -664,20 +659,22 @@ Each candidate word is tested for special treatment in this order:
|g:clojure_fuzzy_indent_patterns|
4. Return false and indent normally otherwise
+
*g:clojure_special_indent_words*
-Some forms in Clojure are indented so that every subform is indented only two
-spaces, regardless of '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.
+Some forms in Clojure are indented such that every subform is indented by only
+two spaces, regardless of '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 multiline strings to the column after the opening
+Align subsequent lines in multi-line strings to the column after the opening
quote, instead of the same column.
For example:
@@ -694,11 +691,7 @@ For example:
enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.")
<
-This option is off by default.
->
- " Default
- let g:clojure_align_multiline_strings = 0
-<
+
*g:clojure_align_subforms*
By default, parenthesized compound forms that look like function calls and
@@ -709,18 +702,14 @@ two spaces relative to the opening paren:
bar
baz)
<
-Setting this option changes this behavior so that all subforms are aligned to
-the same column, emulating the default behavior of clojure-mode.el:
+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)
<
-This option is off by default.
->
- " Default
- let g:clojure_align_subforms = 0
-<
FORTRAN *ft-fortran-indent*