Meikel Brandmeyer committed df452fd

Add FuzyyIndent option

Comments (0)

Files changed (3)


 " Configuration
+if !exists("g:vimclojure#FuzzyIndent")
+	let vimclojure#FuzzyIndent = 0
 if !exists("g:vimclojure#HighlightBuiltins")
 	if exists("g:clj_highlight_builtins")
 		call vimclojure#WarnDeprecated("g:clj_highlight_builtins",


 control using standard highlighting groups. The actual highlighting used
+Indenting                           *ft-clj-indent*
+VimClojure provides the (hopefully) correct indentation rules for
+the standard forms and macros. However user code might define also
+forms for which the indentation should follow the indentation according
+to the 'lispwords' option. The names of these forms often follow a
+pattern like "defsomething" or "with-something".
+By setting the fuzzy indent option, you can tell VimClojure, that you
+want names beginning in "def" or "with" to be indented as if they
+were included in the 'lispwords' option.
+        let vimclojure#FuzzyIndent = 1
+This option is disabled by default.
 Preview Window


 		return paren[1] + &shiftwidth - 1
+	if g:vimclojure#FuzzyIndent && w =~ '^\(def\|with\)'
+		return paren[1] + &shiftwidth - 1
+	endif
 	normal! w
 	if paren[0] < line(".")
 		return paren[1] + &shiftwidth - 1
Tip: Use camelCasing e.g. ProjME to search for