Created
July 31, 2011 18:49
-
-
Save AndrewRadev/1117078 to your computer and use it in GitHub Desktop.
Pretty format a json file by using my splitjoin plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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