1- *clojure* *clojure .txt* Last Change: 28 January 2013
1+ *clojure.txt* Last Change: 28 January 2013
22
3- ========================================================================
4- INTRODUCTION *clojure-introduction*
3+ INTRODUCTION *clojure-introduction*
54
6- Meikel Brandmeyer's excellent Clojure runtime files. Includes syntax,
7- indent, ftdetect, and ftplugin scripts.
5+ Meikel Brandmeyer's excellent Clojure runtime files. Includes syntax, indent,
6+ ftdetect, and ftplugin scripts.
87
9- ========================================================================
10- OPTIONS *clojure-options* *clojure-indent*
8+ CLOJURE *ft-clojure-indent*
119
12- The indent script has a few configurable options. Documentation with
10+ The Clojure indent script has a few configurable options. Documentation with
1311default values below:
1412
15- *g:clojure_maxlines*
13+ *g:clojure_maxlines*
1614
1715Maximum scan distance of searchpairpos(). Larger values trade performance
1816for correctness when dealing with very long forms. A value of 0 means search
1917without limits.
2018>
21- " Default
22- let g:clojure_maxlines = 100
19+ " Default
20+ let g:clojure_maxlines = 100
2321<
2422
25- *g:clojure_fuzzy_indent*
26- *g:clojure_fuzzy_indent_patterns*
27- *g:clojure_fuzzy_indent_blacklist*
23+ *g:clojure_fuzzy_indent*
24+ *g:clojure_fuzzy_indent_patterns*
25+ *g:clojure_fuzzy_indent_blacklist*
2826
2927The 'lispwords' option is a list of comma-separated words that mark special
30- forms whose following lines must be indented as if the word is on the
31- first line alone.
28+ forms whose subforms must be indented with two spaces.
3229
3330For example:
3431>
35- (defn good []
36- "Correct indentation")
32+ (defn bad []
33+ "Incorrect indentation")
3734
38- (defn bad []
39- "Incorrect indentation")
35+ (defn good []
36+ "Correct indentation")
4037<
41-
42- If you would like to match words that match a pattern, you can use the
43- fuzzy indent feature. The defaults are:
38+ If you would like to match words that match a pattern, you can use the fuzzy
39+ indent feature. The defaults are:
4440>
45- " Default
46- let g:clojure_fuzzy_indent = 1
47- let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
48- let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
49-
50- " Legacy comma-delimited string version; the list format above is
51- " recommended. Note that patterns are implicitly anchored with ^ and $.
52- let g:clojure_fuzzy_indent_patterns = 'with.*,def.*,let.*'
41+ " Default
42+ let g:clojure_fuzzy_indent = 1
43+ let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let']
44+ let g:clojure_fuzzy_indent_blacklist =
45+ \ ['-fn$', '\v^with-%(meta|out-str|loading-context)$']
46+
47+ " Legacy comma-delimited string version; the list format above is
48+ " recommended. Note that patterns are implicitly anchored with ^ and $
49+ let g:clojure_fuzzy_indent_patterns = 'with.*,def.*,let.*'
5350<
54-
5551| g:clojure_fuzzy_indent_patterns | and | g:clojure_fuzzy_indent_blacklist | are
5652| Lists | of patterns that will be matched against the unquoted, unqualified
5753symbol at the head of a list. This means that a pattern like "^foo" will match
5854all these candidates: "foobar", "my.ns/foobar", and "#'foobar".
5955
6056Each candidate word is tested for special treatment in this order:
6157
62- 1. Return true if word is literally in 'lispwords'
63- 2. Return false if word matches a pattern in | g:clojure_fuzzy_indent_blacklist |
64- 3. Return true if word matches a pattern in | g:clojure_fuzzy_indent_patterns |
65- 4. Return false and indent normally otherwise
58+ 1. Return true if word is literally in 'lispwords'
59+ 2. Return false if word matches a pattern in
60+ | g:clojure_fuzzy_indent_blacklist |
61+ 3. Return true if word matches a pattern in
62+ | g:clojure_fuzzy_indent_patterns |
63+ 4. Return false and indent normally otherwise
6664
67- *g:clojure_special_indent_words*
65+ *g:clojure_special_indent_words*
6866
6967Some forms in Clojure are indented so that every subform is indented only two
7068spaces, regardless of 'lispwords' . If you have a custom construct that should
7169be indented in this idiosyncratic fashion, you can add your symbols to the
7270default list below.
7371>
74- " Default
75- let g:clojure_special_indent_words = 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn'
72+ " Default
73+ let g:clojure_special_indent_words =
74+ \ 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn'
7675<
7776
78- *g:clojure_align_multiline_strings*
77+ *g:clojure_align_multiline_strings*
7978
80- When indenting multiline strings, align subsequent lines to the column
81- after the opening quote, instead of the same column.
79+ When indenting multiline strings, align subsequent lines to the column after
80+ the opening quote, instead of the same column.
8281
8382For example:
8483>
85- (def default
86- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
87- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
88- enim ad minim veniam, quis nostrud exercitation ullamco laboris
89- nisi ut aliquip ex ea commodo consequat.")
90-
91- (def aligned
92- "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
93- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
94- enim ad minim veniam, quis nostrud exercitation ullamco laboris
95- nisi ut aliquip ex ea commodo consequat.")
84+ (def default
85+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
86+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
87+ enim ad minim veniam, quis nostrud exercitation ullamco laboris
88+ nisi ut aliquip ex ea commodo consequat.")
89+
90+ (def aligned
91+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
92+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
93+ enim ad minim veniam, quis nostrud exercitation ullamco laboris
94+ nisi ut aliquip ex ea commodo consequat.")
9695<
97-
96+ This option is off by default.
9897>
99- " Default
100- let g:clojure_align_multiline_strings = 0
98+ " Default
99+ let g:clojure_align_multiline_strings = 0
101100<
102101
103- =======================================================================
104- ABOUT *clojure-about*
102+ ABOUT *clojure-about*
105103
106104This document and associated runtime files are maintained at:
107105https://github.com/guns/vim-clojure-static
@@ -110,15 +108,15 @@ Distributed under the Vim license. See |license|.
110108
111109syntax/clojure.vim:
112110
113- Copyright 2007-2008 (c) Toralf Wittner <toralf.wittner@gmail.com>
114- Copyright 2008-2012 (c) Meikel Brandmeyer <mb@kotka.de>
111+ Copyright 2007-2008 (c) Toralf Wittner <toralf.wittner@gmail.com>
112+ Copyright 2008-2012 (c) Meikel Brandmeyer <mb@kotka.de>
115113
116114All other files:
117115
118- Copyright 2008-2012 (c) Meikel Brandmeyer <mb@kotka.de>
116+ Copyright 2008-2012 (c) Meikel Brandmeyer <mb@kotka.de>
119117
120118Modified and relicensed under the Vim License for distribution with Vim:
121119
122- Copyright 2013 (c) Sung Pae <self@sungpae.com>
120+ Copyright 2013 (c) Sung Pae <self@sungpae.com>
123121
124- vim:tw=78:ft=help:norl:
122+ vim:tw=78:noet:sw=8:sts=8:ts=8: ft=help:norl:
0 commit comments