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
 depends on the dark/bright setting (see |'bg'|).
+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: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.