Skip to content

Instantly share code, notes, and snippets.

@AndrewRadev
Created July 31, 2011 18:49
Show Gist options
  • Save AndrewRadev/1117078 to your computer and use it in GitHub Desktop.
Save AndrewRadev/1117078 to your computer and use it in GitHub Desktop.
Pretty format a json file by using my splitjoin plugin
command! SplitJson call s:SplitJson()
function! s:SplitJson()
call cursor(1, 1)
call sj#js#SplitObjectLiteral()
while search('{', 'W') > 0
call sj#js#SplitObjectLiteral()
endwhile
call cursor(0, 0)
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment