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

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

63 active golfers, 198 entries

Solutions by @filipe_almeida:
29
#21 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:20AM

30
#>31 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:18AM

31
#>31 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:17AM

33
#>34 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:15AM

34
#>34 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:06AM

36
#>37 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:14AM

37
#>40 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:11AM

38
#>44 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:10AM

42
#>53 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:04AM

42
#>53 - Filipe Almeida / @filipe_almeida

01/01/2015 at 03:13AM