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 542eff6588fc4d00021aa9cd

Refactor static member invocation

Someone used a static method. Refactor the method into a static import while fixing the assertion.

Start file
import org.Assert;

C{
	m(){
		Assert.assertEquals(42, "Meaning of life");
	}
}
End file
import static org.Assert.assertEquals;

C{
	m(){
		assertEquals("Meaning of life", "Meaning of life");
	}
}

View Diff

1c1
< import org.Assert;
---
> import static org.Assert.assertEquals;
5c5
< 		Assert.assertEquals(42, "Meaning of life");
---
> 		assertEquals("Meaning of life", "Meaning of life");

Solutions by @mango_cheetah:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @quadface

63 active golfers, 198 entries

Solutions by @mango_cheetah:
29
#16 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:17PM

30
#>29 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:26PM

31
#>31 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:28PM

37
#>39 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:13PM

37
#>39 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:14PM

38
#>44 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:10PM

42
#>53 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:03PM

44
#>56 - Daniel Burnett / @mango_cheetah

10/09/2014 at 10:01PM