Skip to content

Instantly share code, notes, and snippets.

@dsummersl
Created January 19, 2013 03:04
Show Gist options
  • Save dsummersl/4570511 to your computer and use it in GitHub Desktop.
Save dsummersl/4570511 to your computer and use it in GitHub Desktop.
let fn = { 'cmpstr': a:1 }
function fn.compare(x,y) dict
let a = a:x
let b = a:y
exec "return ". self.cmpstr
endfunction
return sort(a:list,fn.compare,fn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment