Skip to content

Commit fc86ae6

Browse files
committed
Clarify doc/clojure.txt and sync with README
1 parent 036c546 commit fc86ae6

File tree

3 files changed

+65
-52
lines changed

3 files changed

+65
-52
lines changed

LICENSE.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
==================
21
VimClojure License
32
==================
43

@@ -23,7 +22,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2322
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2423
THE SOFTWARE.
2524

26-
==========================
2725
vim-clojure-static License
2826
==========================
2927

README.markdown

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@
2828

2929

3030

31-
Meikel Brandmeyer's excellent Clojure runtime files, extracted for
32-
static editing and use with alternate Clojure development plugins.
31+
Meikel Brandmeyer's excellent Clojure runtime files, extracted for static
32+
editing and use with alternate Clojure development plugins.
3333

3434
Rationale
3535
=========
3636

37-
[VimClojure](http://www.vim.org/scripts/script.php?script_id=2501)
38-
consists of a syntax script, indent script, filetype settings, limited
39-
static completions, and a sophisticated synchronous REPL environment for
40-
interacting with JVM Clojure processes.
37+
[VimClojure](http://www.vim.org/scripts/script.php?script_id=2501) consists of
38+
a syntax script, indent script, filetype settings, limited static completions,
39+
and a sophisticated synchronous REPL environment for interacting with JVM
40+
Clojure processes.
4141

4242
While it is not necessary to use any of the interactive features of
43-
VimClojure, the static runtime files are not standalone scripts and
44-
cannot easily be extracted from the VimClojure support libraries. The
45-
side effects of this coupling are:
43+
VimClojure, the static runtime files are not standalone scripts and cannot
44+
easily be extracted from the VimClojure support libraries. The side effects of
45+
this coupling are:
4646

4747
* Hacking on the runtime files is more difficult.
4848

@@ -53,8 +53,8 @@ side effects of this coupling are:
5353
overkill. A smaller, self-contained set of files would be eligible for
5454
inclusion in Vim itself.
5555

56-
This is a shame since VimClojure's syntax and indent scripts are of very
57-
high quality. This fork aims to address these problems.
56+
This is a shame since VimClojure's syntax and indent scripts are of very high
57+
quality. This fork aims to address these problems.
5858

5959
Differences from VimClojure
6060
===========================
@@ -70,10 +70,9 @@ Differences from VimClojure
7070
[`rainbow_parentheses.vim`](https://github.com/kien/rainbow_parentheses.vim)
7171
is an excellent replacement.
7272

73-
* Insert mode completion is provided for special forms and public
74-
vars in `clojure.core`. If you are looking for more comprehensive
75-
completions, please consider using an interactive development plugin
76-
listed below.
73+
* Insert mode completion is provided for special forms and public vars in
74+
`clojure.core`. If you are looking for more comprehensive completions,
75+
please consider using an interactive development plugin listed below.
7776

7877
Interactive Clojure Development Plugins
7978
=======================================
@@ -84,14 +83,14 @@ New nREPL client by Tim Pope.
8483

8584
### [VimClojure](http://www.vim.org/scripts/script.php?script_id=2501)
8685

87-
The original interactive Clojure editing environment by Meikel
88-
Brandmeyer. These runtime files are **incompatible** with the original
89-
VimClojure project in several small ways, so be sure to uninstall
90-
vim-clojure-static when using VimClojure.
86+
The original interactive Clojure editing environment by Meikel Brandmeyer.
87+
These runtime files are **incompatible** with the original VimClojure project
88+
in several small ways, so be sure to uninstall vim-clojure-static when using
89+
VimClojure.
9190

9291
Meikel has [announced](https://groups.google.com/forum/?fromgroups=#!topic/vimclojure/B-UU8qctd5A)
93-
that the upcoming version of VimClojure will feature only the dynamic
94-
portion of the project, and will be compatible with these static files.
92+
that the upcoming version of VimClojure will feature only the dynamic portion
93+
of the project, and will be compatible with these static files.
9594

9695
### [slimv.vim](http://www.vim.org/scripts/script.php?script_id=2531)
9796

@@ -103,19 +102,24 @@ Send text to REPLs running in GNU Screen or tmux. Not Clojure specific.
103102

104103
By Eric Van Dewoestine.
105104

106-
Try <https://github.com/guns/screen> for better window handling if you
107-
are running tmux 1.5 or higher.
105+
Try <https://github.com/guns/screen> for better window handling if you are
106+
running tmux 1.5 or higher.
108107

109108
Options
110109
=======
111110

112-
The indent script has a few configurable options. Documentation with
113-
default values below:
111+
Clojure indentation differs somewhat from traditional Lisps, due in part to
112+
the use of square and curly brackets, and otherwise by community convention.
113+
These conventions are not always universally followed, so the Clojure indent
114+
script offers a few configurable options, listed below.
115+
116+
If the current vim does not include searchpairpos(), the indent script falls
117+
back to normal `'lisp'` indenting, and the following options are ignored.
114118

115119
### `g:clojure_maxlines`
116120

117-
Maximum scan distance of searchpairpos(). Larger values trade performance
118-
for correctness when dealing with very long forms. A value of 0 means search
121+
Set maximum scan distance of searchpairpos(). Larger values trade performance
122+
for correctness when dealing with very long forms. A value of 0 will scan
119123
without limits.
120124

121125
```vim
@@ -125,8 +129,8 @@ let g:clojure_maxlines = 100
125129

126130
### `g:clojure_fuzzy_indent`, `g:clojure_fuzzy_indent_patterns`, and `g:clojure_fuzzy_indent_blacklist`
127131

128-
The 'lispwords' option is a list of comma-separated words that mark
129-
special forms whose subforms must be indented with two spaces.
132+
The `'lispwords'` option is a list of comma-separated words that mark special
133+
forms whose subforms must be indented with two spaces.
130134

131135
For example:
132136

@@ -138,8 +142,8 @@ For example:
138142
"Correct indentation")
139143
```
140144

141-
If you would like to match words that match a pattern, you can use the
142-
fuzzy indent feature. The defaults are:
145+
If you would like to specify `'lispwords'` with a pattern instead, you can use
146+
the fuzzy indent feature:
143147

144148
```vim
145149
" Default
@@ -153,23 +157,23 @@ let g:clojure_fuzzy_indent_patterns = 'with.*,def.*,let.*'
153157
```
154158

155159
`g:clojure_fuzzy_indent_patterns` and `g:clojure_fuzzy_indent_blacklist` are
156-
*Lists* of patterns that will be matched against the unqualified symbol at the
160+
lists of patterns that will be matched against the unqualified symbol at the
157161
head of a list. This means that a pattern like `"^foo"` will match all these
158162
candidates: `"foobar"`, `"my.ns/foobar"`, and `"#'foobar"`.
159163

160164
Each candidate word is tested for special treatment in this order:
161165

162-
1. Return true if word is literally in 'lispwords'
166+
1. Return true if word is literally in `'lispwords'`
163167
2. Return false if word matches a pattern in `g:clojure_fuzzy_indent_blacklist`
164168
3. Return true if word matches a pattern in `g:clojure_fuzzy_indent_patterns`
165169
4. Return false and indent normally otherwise
166170

167171
### `g:clojure_special_indent_words`
168172

169-
Some forms in Clojure are indented so that every subform is indented only two
170-
spaces, regardless of 'lispwords'. If you have a custom construct that should
171-
be indented in this idiosyncratic fashion, you can add your symbols to the
172-
default list below.
173+
Some forms in Clojure are indented so that every subform is indented only
174+
two spaces, regardless of `'lispwords'`. If you have a custom construct that
175+
should be indented in this idiosyncratic fashion, you can add your symbols to
176+
the default list below.
173177

174178
```vim
175179
" Default
@@ -178,8 +182,8 @@ let g:clojure_special_indent_words = 'deftype,defrecord,reify,proxy,extend-type,
178182

179183
### `g:clojure_align_multiline_strings`
180184

181-
When indenting multiline strings, align subsequent lines to the column
182-
after the opening quote, instead of the same column.
185+
Align subsequent lines in multiline strings to the column after the opening
186+
quote, instead of the same column.
183187

184188
For example:
185189

@@ -197,6 +201,8 @@ For example:
197201
nisi ut aliquip ex ea commodo consequat.")
198202
```
199203

204+
This option is off by default.
205+
200206
```vim
201207
" Default
202208
let g:clojure_align_multiline_strings = 0
@@ -205,8 +211,8 @@ let g:clojure_align_multiline_strings = 0
205211
License and Acknowledgements
206212
============================
207213

208-
Many thanks to [Meikel Brandmeyer](http://kotka.de/) for his excellent
209-
work on making Vim a first class Clojure editor.
214+
Many thanks to [Meikel Brandmeyer](http://kotka.de/) for his excellent work on
215+
making Vim a first class Clojure editor.
210216

211217
Thanks to [Tim Pope](https://github.com/tpope/) for advice in #vim.
212218

@@ -224,3 +230,7 @@ Modified and relicensed under the Vim License for distribution with Vim:
224230
* Copyright 2013 (c) Sung Pae <self@sungpae.com>
225231

226232
See LICENSE.txt for more information.
233+
234+
<!--
235+
vim:ft=markdown:et:tw=78:
236+
-->

doc/clojure.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ INTRODUCTION *clojure-introduction*
55
Meikel Brandmeyer's excellent Clojure runtime files. Includes syntax, indent,
66
ftdetect, and ftplugin scripts.
77

8-
CLOJURE *ft-clojure-indent*
8+
CLOJURE *ft-clojure-indent* *clojure-indent*
99

10-
The Clojure indent script has a few configurable options. Documentation with
11-
default values below:
10+
Clojure indentation differs somewhat from traditional Lisps, due in part to
11+
the use of square and curly brackets, and otherwise by community convention.
12+
These conventions are not always universally followed, so the Clojure indent
13+
script offers a few configurable options, listed below.
14+
15+
If the current vim does not include searchpairpos(), the indent script falls
16+
back to normal 'lisp' indenting, and the following options are ignored.
1217

1318
*g:clojure_maxlines*
1419

15-
Maximum scan distance of searchpairpos(). Larger values trade performance
16-
for correctness when dealing with very long forms. A value of 0 means search
20+
Set maximum scan distance of searchpairpos(). Larger values trade performance
21+
for correctness when dealing with very long forms. A value of 0 will scan
1722
without limits.
1823
>
1924
" Default
@@ -35,8 +40,8 @@ For example:
3540
(defn good []
3641
"Correct indentation")
3742
<
38-
If you would like to match words that match a pattern, you can use the fuzzy
39-
indent feature. The defaults are:
43+
If you would like to specify 'lispwords' with a |pattern| instead, you can use
44+
the fuzzy indent feature:
4045
>
4146
" Default
4247
let g:clojure_fuzzy_indent = 1
@@ -76,8 +81,8 @@ default list below.
7681

7782
*g:clojure_align_multiline_strings*
7883

79-
When indenting multiline strings, align subsequent lines to the column after
80-
the opening quote, instead of the same column.
84+
Align subsequent lines in multiline strings to the column after the opening
85+
quote, instead of the same column.
8186

8287
For example:
8388
>

0 commit comments

Comments
 (0)