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 @chin33z:

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

210 active golfers, 614 entries

Solutions by @chin33z:
25
#19 - david hu / @chin33z

12/21/2014 at 05:03AM

26
#>40 - david hu / @chin33z

12/21/2014 at 05:01AM

27
#>52 - david hu / @chin33z

12/21/2014 at 04:59AM

28
#>63 - david hu / @chin33z

12/21/2014 at 04:56AM

29
#>82 - david hu / @chin33z

12/21/2014 at 04:55AM

30
#>94 - david hu / @chin33z

12/21/2014 at 04:54AM

31
#>105 - david hu / @chin33z

12/21/2014 at 04:53AM

32
#>115 - david hu / @chin33z

12/21/2014 at 04:51AM

34
#>136 - david hu / @chin33z

12/21/2014 at 04:41AM