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

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

64 active golfers, 199 entries

Solutions by @dsummersl:
29
#19 - Dane Summers / @dsummersl

10/29/2014 at 01:39PM

30
#>31 - Dane Summers / @dsummersl

10/29/2014 at 01:37PM

34
#>35 - Dane Summers / @dsummersl

10/29/2014 at 01:34PM

38
#>45 - Dane Summers / @dsummersl

10/29/2014 at 01:30PM

39
#>48 - Dane Summers / @dsummersl

10/29/2014 at 01:27PM

42
#>54 - Dane Summers / @dsummersl

10/29/2014 at 01:27PM

42
#>54 - Dane Summers / @dsummersl

10/29/2014 at 01:27PM

43
#>56 - Dane Summers / @dsummersl

10/29/2014 at 01:25PM

46
#>57 - Dane Summers / @dsummersl

10/29/2014 at 01:24PM

46
#>57 - Dane Summers / @dsummersl

10/29/2014 at 01:25PM