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

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

74 active golfers, 269 entries

Solutions by @Ronsteri1:
59
#3 - Roni Kettunen / @Ronsteri1

11/26/2021 at 01:10AM

64
#>16 - Roni Kettunen / @Ronsteri1

11/26/2021 at 12:46AM

65
#>17 - Roni Kettunen / @Ronsteri1

11/26/2021 at 12:43AM

68
#>23 - Roni Kettunen / @Ronsteri1

11/26/2021 at 12:30AM

86
#>35 - Roni Kettunen / @Ronsteri1

11/26/2021 at 12:22AM

93
#>45 - Roni Kettunen / @Ronsteri1

11/26/2021 at 12:13AM

103
#>59 - Roni Kettunen / @Ronsteri1

11/26/2021 at 12:00AM