Skip to content

Instantly share code, notes, and snippets.

@MicahElliott
MicahElliott / clj-fold.vim
Created Jul 4, 2012 — forked from dakrone/gist:519858
Automagic Clojure folding on defns and defmacros
View clj-fold.vim
" ---------------------------------------------------------------------------
" Automagic Clojure folding on defn's and defmacro's
"
" Blog post: http://writequit.org/blog/?p=413
function GetClojureFold()
if getline(v:lnum) =~ '^\s*(defn.*\s'
return ">1"
elseif getline(v:lnum) =~ '^\s*(def\(macro\|method\|page\|partial\).*\s'
return ">1"