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

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

67 active golfers, 257 entries

Solutions by @pedrominicz:
59
#5 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:51PM

59
#>5 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:54PM

59
#>5 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:58PM

59
#>5 - Pedro Minicz / @pedrominicz

03/25/2022 at 09:01PM

64
#>15 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:45PM

67
#>20 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:41PM

72
#>24 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:16PM

73
#>26 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:09PM

75
#>28 - Pedro Minicz / @pedrominicz

03/25/2022 at 04:59PM

83
#>33 - Pedro Minicz / @pedrominicz

03/25/2022 at 04:28PM

84
#>33 - Pedro Minicz / @pedrominicz

03/25/2022 at 04:18PM

99
#>51 - Pedro Minicz / @pedrominicz

03/25/2022 at 04:13PM