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

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

75 active golfers, 277 entries

Solutions by @M_Klauer:
87
#38 - Il Granfiatore / @M_Klauer

02/22/2022 at 06:50AM

93
#>47 - Il Granfiatore / @M_Klauer

02/18/2022 at 04:10PM

116
#>63 - Il Granfiatore / @M_Klauer

02/17/2022 at 03:32PM

137
#>66 - Il Granfiatore / @M_Klauer

02/09/2022 at 04:49PM