Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4d1ac1800a045132c0000011

Reformat a C golf submission

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

Start file
#include<stdio.h>
int main(void){puts("Hello world!");return 0;}
End file
#include <stdio.h>

int main(void)
{
    puts("Hello world!");
    return 0;
}

View Diff

--- hw.c	2010-12-28 21:01:54.000000000 -0800
+++ hw-indented.c	2010-12-28 21:04:56.000000000 -0800
@@ -1,2 +1,7 @@
-#include<stdio.h>
-int main(void){puts("Hello world!");return 0;}
+#include <stdio.h>
+
+int main(void)
+{
+    puts("Hello world!");
+    return 0;
+}

Solutions by @drupalovereasy:

Unlock 14 remaining solutions by signing in and submitting your own entry
Created by: @josh_triplett

193 active golfers, 522 entries

Solutions by @drupalovereasy:
25
#7 - drupalovereasy / @drupalovereasy

04/29/2012 at 09:15AM

27
#>43 - drupalovereasy / @drupalovereasy

04/29/2012 at 08:59AM

27
#>43 - drupalovereasy / @drupalovereasy

04/29/2012 at 09:13AM

28
#>51 - drupalovereasy / @drupalovereasy

04/29/2012 at 07:13AM

28
#>51 - drupalovereasy / @drupalovereasy

04/29/2012 at 09:08AM

29
#>70 - drupalovereasy / @drupalovereasy

04/29/2012 at 07:06AM

30
#>80 - drupalovereasy / @drupalovereasy

04/29/2012 at 07:03AM

31
#>92 - drupalovereasy / @drupalovereasy

04/29/2012 at 07:00AM

33
#>107 - drupalovereasy / @drupalovereasy

04/29/2012 at 06:49AM

35
#>129 - drupalovereasy / @drupalovereasy

04/28/2012 at 11:35AM

35
#>129 - drupalovereasy / @drupalovereasy

04/28/2012 at 11:59AM

35
#>129 - drupalovereasy / @drupalovereasy

04/29/2012 at 06:08AM

37
#>141 - drupalovereasy / @drupalovereasy

04/28/2012 at 11:27AM

41
#>167 - drupalovereasy / @drupalovereasy

04/28/2012 at 11:06AM