Commits

Meikel Brandmeyer committed ada7c24

Improve heuristic for fuzzy indent and add special case for with-meta

Fixes #76

Comments (0)

Files changed (1)

vim/indent/clojure.vim

 		return paren[1] + &shiftwidth - 1
 	endif
 
-	if g:vimclojure#FuzzyIndent && w =~ '\(^\|/\)\(def\|with\)'
+	" XXX: Slight glitch here with special cases. However it's only
+	" a heureustic. Offline we can't do more.
+	if g:vimclojure#FuzzyIndent
+				\ && w != 'with-meta'
+				\ && w != 'clojure.core/with-meta'
+				\ && w =~ '\(^\|/\)\(def\|with\)'
+				\ && w !~ '\(^\|/\)\(def\|with\).*\*$'
+				\ && w !~ '\(^\|/\)\(def\|with\).*-fn$'
 		return paren[1] + &shiftwidth - 1
 	endif