summaryrefslogtreecommitdiff
path: root/runtime/indent/clojure.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/indent/clojure.vim')
-rw-r--r--runtime/indent/clojure.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/indent/clojure.vim b/runtime/indent/clojure.vim
index 7d0c2aa91..df88cea94 100644
--- a/runtime/indent/clojure.vim
+++ b/runtime/indent/clojure.vim
@@ -6,7 +6,7 @@
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
-" Last Change: 08 September 2013
+" Last Change: 16 December 2013
" TODO: Indenting after multibyte characters is broken:
" (let [Δ (if foo
@@ -53,6 +53,10 @@ if exists("*searchpairpos")
let g:clojure_align_multiline_strings = 0
endif
+ if !exists('g:clojure_align_subforms')
+ let g:clojure_align_subforms = 0
+ endif
+
function! s:SynIdName()
return synIDattr(synID(line("."), col("."), 0), "name")
endfunction
@@ -284,7 +288,7 @@ if exists("*searchpairpos")
call search('\v\_s', 'cW')
call search('\v\S', 'W')
if paren[0] < line(".")
- return paren[1] + &shiftwidth - 1
+ return paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)
endif
call search('\v\S', 'bW')