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

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

52 active golfers, 207 entries

Solutions by @sap38838304:
64
#13 - sap / @sap38838304

09/16/2022 at 08:34PM

67
#>17 - sap / @sap38838304

09/16/2022 at 07:15PM

72
#>19 - sap / @sap38838304

09/16/2022 at 07:09PM

73
#>21 - sap / @sap38838304

09/16/2022 at 07:02PM

80
#>26 - sap / @sap38838304

09/16/2022 at 06:52PM

83
#>28 - sap / @sap38838304

09/16/2022 at 06:45PM

90
#>32 - sap / @sap38838304

12/24/2021 at 08:32PM

102
#>44 - sap / @sap38838304

12/24/2021 at 08:28PM

116
#>47 - sap / @sap38838304

12/24/2021 at 08:20PM