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 71 remaining solutions by signing in and submitting your own entry
#72 Duy nguyễn / @Duycld03 - Score: 212 - 07/27/23 @ 18:34
df jjqqdwqjV10gg:noraml<BS><BS><BS>mal @q<CR>kiVimGolf.<Esc>>>kkbciw<Esc>xA<Esc>bbbbbbciw<BS><Esc>lxi<CR><Esc>f(ldt<Esc>df]<Esc>A<Esc>kjjjA<Esc>F;lDlllkkkkk0df<Esc>ddt<Esc>udt(iconsole.log9<Esc>x<Esc>jkkkbbciw<Esc>sx<BS><Esc>wwbciw<BS><Esc>lxi<CR><Esc>A<Esc>kkjVjjjjjjjjj><Esc>jjj>.>><Esc>jjjjjlyf.jjjo<Esc>pamain([]);<Esc>:wq<CR>

0 comments


Created by: @thari_eth

72 active golfers, 267 entries

Leaderboard (lowest score wins):
78
#31 - ohwell / @KiranClose

07/31/2022 at 11:19AM

79
#32 - Iron Manders / @MandersIron

10/31/2022 at 09:33PM

80
#33 - JVIM / @JVIM101

02/28/2022 at 11:29AM

80
#34 - Austin Willliams / @GuitarMusash616

09/21/2022 at 06:53AM

83
#35 - stwice / @stwice

02/03/2022 at 05:48PM

87
#36 - Matthias Bartsch 🏠 / @MBartsch

02/21/2022 at 12:52PM

87
#37 - Il Granfiatore / @M_Klauer

02/22/2022 at 06:50AM

88
#38 - Arya Kumar / @SusSquirrel

12/19/2021 at 03:51PM

88
#39 - Michał / @Micha46184564

10/26/2022 at 09:32PM

89
#40 - Иван / @wansmer

04/23/2023 at 03:21PM

90
#41 - Ju / @Heckrothing

02/12/2022 at 01:26PM

90
#42 - Ashley Feniello / @AshleyFen

02/22/2022 at 01:48AM

90
#43 - Aaron Hunt / @ach5910

09/28/2023 at 01:45AM

91
#44 - 李建宏 / @xx19971016

09/01/2023 at 06:22AM

92
#45 - Will Long / @WillLon30283972

06/19/2022 at 11:23PM

93
#46 - Adam Sanghera / @AdamSanghera

01/17/2022 at 09:58PM

94
#47 - Josh Moody / @joshmoody24

06/09/2024 at 06:03AM

95
#48 - Marhekk / @Marhekk

11/23/2021 at 12:28AM

95
#49 - 스치 / @champemunasong

10/27/2022 at 05:49AM

96
#50 - Sammit / @somemeatjain

01/22/2022 at 04:17PM

96
#51 - 'ymdarake / @ymdarake

08/29/2022 at 12:34PM

96
#52 - Elia Camposilvan / @EliaECoyote

10/06/2022 at 07:47AM

99
#53 - Ken / @kenc_

01/19/2022 at 04:00AM

99
#54 - Terry Tsao / @TerryTsao9008

03/16/2022 at 04:53AM

100
#55 - sdfghjk / @sdfghjk88424595

04/28/2022 at 12:01AM

102
#56 - Paul Page / @theRealPaulPage

01/21/2022 at 10:16PM

102
#57 - Pacific Grove / @frank_green_012

03/31/2023 at 05:46AM

102
#58 - Elvis Byounghoon Lee / @lbspresley

04/18/2024 at 03:09AM

108
#59 - Pieter-Jan Lavaerts / @Pumpkin_Pie_Eat

09/26/2022 at 09:24AM

108
#60 - Dank City / @ddankcity

12/09/2022 at 05:27PM