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 4db0b1c8e8eb0f564b00001c

Case preserving word replacement

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

Start file
function Human() {

}

Human.prototype = {
	humanStuff: function(){},
	doHumanStuff: function() {
		useDigitalWatch();
	}
}
End file
function Dog() {

}

Dog.prototype = {
	dogStuff: function(){},
	doDogStuff: function() {
		useDigitalWatch();
	}
}

View Diff

1c1
< function Human() {
---
> function Dog() {
5,7c5,7
< Human.prototype = {
< 	humanStuff: function(){},
< 	doHumanStuff: function() {
---
> Dog.prototype = {
> 	dogStuff: function(){},
> 	doDogStuff: function() {
10a11
> 

Solutions by @mutilator630:

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

182 active golfers, 463 entries

Solutions by @mutilator630:
20
#83 - lassion / @mutilator630

02/12/2026 at 08:30PM

21
#>116 - lassion / @mutilator630

02/12/2026 at 08:29PM

22
#>126 - lassion / @mutilator630

02/12/2026 at 08:28PM

23
#>155 - lassion / @mutilator630

02/12/2026 at 08:27PM

24
#>160 - lassion / @mutilator630

02/12/2026 at 08:26PM

28
#>173 - lassion / @mutilator630

02/12/2026 at 08:25PM

29
#>174 - lassion / @mutilator630

02/12/2026 at 08:24PM