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

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

74 active golfers, 269 entries

Solutions by @scpchick:
59
#11 - scpchicken / @scpchick

10/18/2023 at 05:40AM

63
#>14 - scpchicken / @scpchick

10/18/2023 at 05:38AM

64
#>17 - scpchicken / @scpchick

10/18/2023 at 05:36AM

67
#>23 - scpchicken / @scpchick

10/18/2023 at 05:35AM

72
#>26 - scpchicken / @scpchick

10/17/2023 at 10:13PM

74
#>30 - scpchicken / @scpchick

10/17/2023 at 10:01PM

80
#>34 - scpchicken / @scpchick

10/17/2023 at 09:57PM

83
#>35 - scpchicken / @scpchick

10/17/2023 at 09:54PM

87
#>37 - scpchicken / @scpchick

10/17/2023 at 09:50PM

95
#>49 - scpchicken / @scpchick

10/17/2023 at 09:44PM

99
#>55 - scpchicken / @scpchick

10/17/2023 at 09:40PM

102
#>58 - scpchicken / @scpchick

10/17/2023 at 09:36PM

104
#>59 - scpchicken / @scpchick

10/17/2023 at 09:34PM

111
#>62 - scpchicken / @scpchick

11/14/2021 at 09:45PM

167
#>70 - scpchicken / @scpchick

11/14/2021 at 08:52PM