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):
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

59
#5 - Pedro Minicz / @pedrominicz

03/25/2022 at 08:51PM

59
#6 - Marc Jethro Avila / @maje_avila

05/10/2022 at 12:05PM

59
#7 - jcbglbmn / @JacobGelbman

05/23/2022 at 05:31AM

59
#8 - Leroy Jenkins / @LeroyJe70429357

09/17/2022 at 04:49AM

59
#9 - Topvimgolf Score / @topvimgolfscore

10/15/2022 at 10:38AM

59
#10 - Monkey Boy / @monkey29089

09/23/2023 at 03:15PM

59
#11 - scpchicken / @scpchick

10/18/2023 at 05:40AM

59
#12 - Peppa Pig / @PeppaPi95550250

06/28/2024 at 07:17AM

60
#13 - Luoyb / @Luoyb

10/21/2023 at 09:38AM

63
#14 - Marcel Rød / @marcelroed

11/17/2021 at 07:42PM

64
#15 - Jean George / @JeanGeo20504212

11/16/2021 at 04:58PM

64
#16 - TimMcGuire / @mcguire

11/19/2021 at 03:10AM

64
#17 - sap / @sap38838304

09/16/2022 at 08:34PM

65
#18 - tien / @tien40766111

11/14/2023 at 11:09AM

67
#19 - mevmev / @mevmev8

11/19/2021 at 10:58PM

67
#20 - Vegard Henriksen / @MrVegard

12/04/2021 at 01:40PM

67
#21 - POSIX / @po6ix

01/07/2022 at 11:21AM

67
#22 - Ramtin Martin / @martin_ramtin

03/28/2022 at 02:35PM

67
#23 - Bruce Woodward / @b00ffer

03/16/2023 at 08:19AM

69
#24 - Lennart / @lennartack

05/16/2024 at 10:39PM

72
#25 - A Random Vimgolfer / @AVimgolfer

02/04/2022 at 08:23AM

72
#26 - D. 👋 / @DCT_cpp

02/14/2022 at 04:14PM

73
#27 - AMG / @anmigneer

12/14/2021 at 12:02PM

73
#28 - Brian Leung / @brian_leung

02/01/2022 at 05:49AM

73
#29 - vuems / @vuems2win

11/15/2022 at 12:29AM

74
#30 - Javier Contreras / @contranton

05/04/2022 at 02:55AM