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

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

179 active golfers, 453 entries

Solutions by @km_hr:
20
#81 - かみひろ / @km_hr

03/16/2024 at 02:45PM

21
#>114 - かみひろ / @km_hr

03/16/2024 at 02:44PM

23
#>152 - かみひろ / @km_hr

03/16/2024 at 02:43PM

24
#>157 - かみひろ / @km_hr

03/16/2024 at 02:42PM

27
#>168 - かみひろ / @km_hr

03/16/2024 at 02:35PM

29
#>171 - かみひろ / @km_hr

03/16/2024 at 02:33PM

33
#>173 - かみひろ / @km_hr

03/16/2024 at 02:30PM