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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 19 remaining solutions by signing in and submitting your own entry
#20 Albertas Gimbutas / @explorehomemore - Score: 131 - 11/14/21 @ 18:29
dwVG<2jdwwdwhr<CR>jjct(console.log<Esc>0jjdwwdwhr<CR>elldta/;<CR>lDggwywGo<Esc>pa.main([]);<Esc>3k0Pa.<Esc>:set expand<BS><BS><BS><BS><BS><BS>noexpandtab<CR>:3<CR>VGkk>3j>>5j.:wqa<CR>

0 comments


Created by: @thari_eth

20 active golfers, 61 entries

Leaderboard (lowest score wins):
59
#1 - John Braxler / @braxler

11/15/2021 at 04:05PM

59
#2 - Jon Krause / @jkrause314

11/23/2021 at 11:03PM

59
#3 - Roni Kettunen / @Ronsteri1

11/26/2021 at 01:10AM

59
#4 - Petro Тrouq / @zulolosi

11/29/2021 at 02:01PM

63
#5 - Marcel Rød / @marcelroed

11/17/2021 at 07:42PM

64
#6 - Jean George / @JeanGeo20504212

11/16/2021 at 04:58PM

64
#7 - TimMcGuire / @mcguire

11/19/2021 at 03:10AM

67
#8 - mevmev / @mevmev8

11/19/2021 at 10:58PM

67
#9 - Vegard Henriksen / @MrVegard

12/04/2021 at 01:40PM

67
#10 - POSIX / @po6ix

01/07/2022 at 11:21AM

73
#11 - AMG / @anmigneer

12/14/2021 at 12:02PM

88
#12 - Arya Kumar / @SusSquirrel

12/19/2021 at 03:51PM

90
#13 - sap / @sap38838304

12/24/2021 at 08:32PM

93
#14 - Adam Sanghera / @AdamSanghera

01/17/2022 at 09:58PM

95
#15 - Marhekk / @Marhekk

11/23/2021 at 12:28AM

96
#16 - Sammit / @somemeatjain

01/22/2022 at 04:17PM

99
#17 - Ken / @kenc_

01/19/2022 at 04:00AM

102
#18 - Paul Page / @theRealPaulPage

01/21/2022 at 10:16PM

111
#19 - Hydrazar / @hydrazar

11/14/2021 at 09:45PM

131
#20 - Albertas Gimbutas / @explorehomemore

11/14/2021 at 06:29PM