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

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

72 active golfers, 267 entries

Solutions by @vuems2win:
73
#29 - vuems / @vuems2win

11/15/2022 at 12:29AM

75
#>30 - vuems / @vuems2win

11/15/2022 at 12:22AM

76
#>30 - vuems / @vuems2win

11/15/2022 at 12:11AM

80
#>34 - vuems / @vuems2win

11/14/2022 at 07:14PM

81
#>34 - vuems / @vuems2win

11/13/2022 at 11:14PM

81
#>34 - vuems / @vuems2win

11/13/2022 at 11:27PM

81
#>34 - vuems / @vuems2win

11/14/2022 at 07:02PM

99
#>54 - vuems / @vuems2win

11/13/2022 at 11:06PM

110
#>61 - vuems / @vuems2win

11/13/2022 at 10:45PM