2828
2929
3030
31- Meikel Brandmeyer's excellent Clojure runtime files, extracted for static
32- editing and use with alternate Clojure development plugins.
31+ Meikel Brandmeyer's excellent Clojure runtime files, extracted from the
32+ [ VimClojure] ( http://www.vim.org/scripts/script.php?script_id=2501 ) project for
33+ use with alternate Clojure REPL plugins.
3334
34- Rationale
35- =========
35+ These files ship with Vim versions 7.3.803 and later, and are periodically
36+ merged into the official Vim repository.
3637
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.
41-
42- While it is not necessary to use any of the interactive features of
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:
46-
47- * Hacking on the runtime files is more difficult.
48-
49- * Installing the latest revisions from source is more complicated than
50- tracking a single repository.
51-
52- * Installing the whole VimClojure distribution for the runtime files is
53- overkill. A smaller, self-contained set of files would be eligible for
54- inclusion in Vim itself.
55-
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.
58-
59- Differences from VimClojure
60- ===========================
61-
62- * Only provides syntax, indent, and filetype settings for Clojure and
63- ClojureScript files.
64-
65- * All scripts are independent and do not depend on VimClojure library
66- functions.
67-
68- * Rainbow parentheses support is omitted in favor of more general and
69- extensible third-party scripts. kien's
70- [ ` rainbow_parentheses.vim ` ] ( https://github.com/kien/rainbow_parentheses.vim )
71- is an excellent replacement.
72-
73- * Basic insert mode completion is provided for special forms and public vars
74- in ` clojure.core ` . It is bound to both the ` 'omnifunc' ` and ` 'completefunc' `
75- options, which can be invoked with the insert mode mappings ` <C-X><C-O> ` and
76- ` <C-X><C-U> ` respectively.
77-
78- For more comprehensive completions, consider using an interactive
79- development plugin listed below.
80-
81- Interactive Clojure Development Plugins
82- =======================================
83-
84- ### [ vim-fireplace] ( https://github.com/tpope/vim-fireplace )
38+ Installation
39+ ============
8540
86- New nREPL client by Tim Pope.
41+ If you are running an old version of Vim or if you would like to keep up with
42+ development, you can install this repository like a standard Vim plugin.
8743
88- ### [ VimClojure] ( http://www.vim.org/scripts/script.php?script_id=2501 )
44+ If you are unfamiliar with this process, refer to
45+ the [ Pathogen] ( https://github.com/tpope/vim-pathogen ) project.
8946
90- The original interactive Clojure editing environment by Meikel Brandmeyer.
91- These runtime files are ** incompatible** with the original VimClojure project
92- in several small ways, so be sure to uninstall vim-clojure-static when using
93- VimClojure.
47+ Please make sure that the following options are set in your vimrc to enable
48+ all features:
9449
95- Meikel has [ announced] ( https://groups.google.com/forum/?fromgroups=#!topic/vimclojure/B-UU8qctd5A )
96- that the upcoming version of VimClojure will feature only the dynamic portion
97- of the project, and will be compatible with these static files.
50+ ``` vim
51+ syntax on
52+ filetype plugin indent on
53+ ```
9854
99- ### [ slimv.vim] ( http://www.vim.org/scripts/script.php?script_id=2531 )
55+ Features
56+ ========
10057
101- SWANK client for Vim by Tamas Kovacs .
58+ * Syntax highlighting for Clojure and ClojureScript buffers .
10259
103- ### [ screen ] ( http://www.vim.org/scripts/script.php?script_id=2711 )
60+ * [ Configurable ] ( #indent-options ) Clojure-specific indentation.
10461
105- Send text to REPLs running in GNU Screen or tmux. Not Clojure specific.
62+ * Basic insert mode completion for special forms and public vars in
63+ ` clojure.core ` .
10664
107- By Eric Van Dewoestine.
65+ This is bound to both the ` 'omnifunc' ` and ` 'completefunc' ` options, which
66+ can be invoked with the insert mode mappings ` <C-X><C-O> ` and ` <C-X><C-U> `
67+ respectively.
10868
109- ### [ vim-slime] ( https://github.com/jpalardy/vim-slime )
69+ If you install this project as a plugin, ` *.edn ` files are recognized as a
70+ Clojure filetype, overriding the built-in declaration as ` edif ` .
11071
111- Like ` screen ` above, an asynchronous REPL plugin that uses GNU screen and
112- tmux. Not Clojure specific.
72+ Third Party Extensions
73+ ======================
11374
114- By Jonathan Palardy.
75+ * Rainbow Parentheses
11576
116- Installation
117- ============
77+ kien's
78+ [ ` rainbow_parentheses.vim ` ] ( https://github.com/kien/rainbow_parentheses.vim )
79+ is highly recommended.
11880
119- Vim version 7.3.803 and later ships with these runtime files, so you may
120- already have them installed!
81+ * Extended Syntax Highlighting
12182
122- If you are running an earlier version or you would like to keep up with
123- development, you can install this repository like a standard Vim plugin. If
124- you don't have a favorite method for installing plugins,
125- [ Pathogen] ( https://github.com/tpope/vim-pathogen ) or
126- [ Vundle] ( https://github.com/gmarik/vundle ) are recommended.
83+ [ ` vim-clojure-highlight ` ] ( https://github.com/guns/vim-clojure-highlight )
84+ is a fireplace.vim plugin that extends syntax highlighting to referred and
85+ aliased vars.
12786
128- Please make sure that the following options are set in your .vimrc:
87+ This is a reimplementation of the DynamicHighlighting feature from
88+ VimClojure.
12989
130- ``` vim
131- syntax on
132- filetype plugin indent on
133- ```
90+ Clojure REPL Plugins
91+ ====================
13492
135- Otherwise the filetype is not activated.
93+ If you would like to get more serious about programming in Clojure, consider
94+ using an interactive
95+ [ Clojure REPL plugin] ( https://github.com/guns/vim-clojure-static/wiki/Clojure-REPL-Plugins ) .
13696
13797Indent Options
13898==============
@@ -156,7 +116,7 @@ without limits.
156116let g:clojure_maxlines = 100
157117```
158118
159- ### ` g:clojure_fuzzy_indent ` , ` g:clojure_fuzzy_indent_patterns ` , and ` g:clojure_fuzzy_indent_blacklist `
119+ ### ` g:clojure_fuzzy_indent ` , ` g:clojure_fuzzy_indent_patterns ` , ` g:clojure_fuzzy_indent_blacklist `
160120
161121The ` 'lispwords' ` option is a list of comma-separated words that mark special
162122forms whose subforms must be indented with two spaces.
@@ -237,6 +197,46 @@ This option is off by default.
237197let g:clojure_align_multiline_strings = 0
238198```
239199
200+ ### ` g:clojure_align_subforms `
201+
202+ By default, parenthesized compound forms that look like function calls and
203+ whose head subform is on its own line have subsequent subforms indented by
204+ two spaces relative to the opening paren:
205+
206+ ``` clojure
207+ (foo
208+ bar
209+ baz)
210+ ```
211+
212+ Setting this option changes this behavior so that all subforms are aligned to
213+ the same column, emulating the default behavior of clojure-mode.el:
214+
215+ ``` clojure
216+ (foo
217+ bar
218+ baz)
219+ ```
220+
221+ This option is off by default.
222+
223+ ``` vim
224+ " Default
225+ let g:clojure_align_subforms = 0
226+ ```
227+
228+ Development
229+ ===========
230+
231+ Pull requests and patches are strongly encouraged!
232+
233+ A large portion of the syntax file is generated from Clojure code in
234+ ` clj/src/ ` . Generation of vim code in this fashion is preferred over hand
235+ crafting of the same.
236+
237+ There is an incomplete syntax test suite in ` clj/test/ ` . Any additions and
238+ improvements to these tests are highly appreciated.
239+
240240License and Acknowledgements
241241============================
242242
@@ -250,15 +250,15 @@ Thanks to [Tim Pope](https://github.com/tpope/) for advice in #vim.
250250* Copyright 2007-2008 (c) Toralf Wittner <toralf.wittner@gmail.com >
251251* Copyright 2008-2012 (c) Meikel Brandmeyer < mb@kotka.de >
252252
253- ` ftdetect/clojure.vim ` <br >
254- ` ftplugin/clojure.vim ` <br >
253+ ` ftdetect/clojure.vim ` , <br >
254+ ` ftplugin/clojure.vim ` , <br >
255255` indent/clojure.vim `
256256
257257* Copyright 2008-2012 (c) Meikel Brandmeyer < mb@kotka.de >
258258
259259Modified and relicensed under the Vim License for distribution with Vim:
260260
261- * Copyright 2013 (c) Sung Pae < self@sungpae.com >
261+ * Copyright 2013-2014 (c) Sung Pae < self@sungpae.com >
262262
263263See LICENSE.txt for more information.
264264
0 commit comments