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 9v00618f9423000000000215

Java to JavaScript

Let convert some simple Java file to JavaScript!

Start file
public class VimGolf
{
   public static void sayHello()
   {
      System.out.println("Hello VimGolf");
   }
   public static void main(String []args)
   {
      sayHello();      
   }
}
End file
class VimGolf
{
	static
	sayHello()
	{
		console.log("Hello VimGolf");
	}
	static
	main(args)
	{
		VimGolf.sayHello();
	}
}
VimGolf.main([]);

View Diff

1c1
< public class VimGolf
---
> class VimGolf
3,10c3,12
<    public static void sayHello()
<    {
<       System.out.println("Hello VimGolf");
<    }
<    public static void main(String []args)
<    {
<       sayHello();      
<    }
---
> 	static
> 	sayHello()
> 	{
> 		console.log("Hello VimGolf");
> 	}
> 	static
> 	main(args)
> 	{
> 		VimGolf.sayHello();
> 	}
11a14
> VimGolf.main([]);

Solutions by @LeroyJe70429357:

Unlock 16 remaining solutions by signing in and submitting your own entry
Created by: @thari_eth

67 active golfers, 257 entries

Solutions by @LeroyJe70429357:
59
#8 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:49AM

59
#>8 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:56AM

64
#>16 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:44AM

67
#>21 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:34AM

69
#>22 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:43AM

70
#>22 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:30AM

76
#>28 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:29AM

82
#>32 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:18AM

86
#>33 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:25AM

90
#>40 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:15AM

91
#>41 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:10AM

97
#>49 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:07AM

113
#>58 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 01:40AM

115
#>58 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 01:35AM

126
#>59 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 01:29AM

126
#>59 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 03:52AM