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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 124 remaining solutions by signing in and submitting your own entry
#125 Feanor Celebrimbor / tumbaletaurea - Score: 23 - 06/04/12 @ 04:06
:%s/human/Dog/i<CR>k~Go<Esc>ZZ

0 comments

#126 Nipunn Koorapati / nipunn1313 - Score: 23 - 07/21/12 @ 22:28
:%s/human/Dog/i<CR>k~Go<Esc>ZZ

0 comments

#127 Marcin Sza / coot_ - Score: 23 - 09/25/12 @ 09:34
wye:%s/<C-R>0/Dog/i<CR>k~Go<Esc>ZZ

0 comments

#128 Dr Rev J Kirchartz / JKirchartz - Score: 23 - 07/28/13 @ 20:30
:%s/human/Dog/i<CR>k~Go<Esc>ZZ

0 comments

#129 LLiseil / lliseil - Score: 23 - 07/17/14 @ 18:12
:%s/human/Dog/i<CR>k~Go<Esc>ZZ

0 comments

#130 Jakob / jajob - Score: 23 - 11/02/14 @ 20:10
:%s/human/Dog/i<CR>k~Go<Esc>ZZ

0 comments

#131 Jake Eaton / Jake__Eaton - Score: 23 - 02/28/15 @ 07:32
:%s;human;Dog;i<CR>k~Go<C-O>ZZ

0 comments

#132 ltn614 / ltn614 - Score: 23 - 09/29/15 @ 20:16
:%s/Human/Dog/i<CR>k~Go<Esc>ZZ

0 comments

#133 Zak Johnson / zakj - Score: 24 - 04/22/11 @ 02:57
:%s/[hH]uman/Dog<CR>k~Go<Esc>ZZ

0 comments

#134 Vojtěch Šívr / VojtechSivr - Score: 24 - 06/09/11 @ 23:15
:%s/human/Dog/i<NL>krd<C-End>o<Esc>ZZ

0 comments

#135 jacobcr / jacobcr - Score: 24 - 08/24/11 @ 07:05
:%s/human/Dog/i<CR>kvuGo<Esc>ZZ

0 comments

#136 Daniel / dbb0 - Score: 24 - 02/20/12 @ 20:32
:%s/human/Dog/i<CR>krdGo<Esc>ZZ

0 comments

#137 William Ott / oddalot - Score: 24 - 04/12/15 @ 17:27
:%s/human/Dog/i<CR>krdGo<Esc>ZZ

0 comments

#138 draft_val=3 / draftcode - Score: 25 - 04/24/11 @ 08:00
:%s/Human/Dog/i<CR>k~Go<Esc>:wq<CR>

0 comments

#139 Jacob Taylor / jacobltaylor - Score: 25 - 08/24/11 @ 17:28
:%s/Human/Dog/gi<CR>krdGo<Esc>ZZ

0 comments

#140 Jakub Arnold / darthdeus - Score: 25 - 12/19/11 @ 15:52
:%s/human/Dog/i<CR>k~Go<Esc>zzZZ

0 comments

#141 Ibrahim Tencer / ibrahimtencer - Score: 25 - 02/14/12 @ 00:09
:%s/human\c/Dog/g<CR>k~Go<Esc>ZZ

0 comments

#142 Christian Helbling / friendly_coder - Score: 25 - 04/09/12 @ 13:31
/hu<CR>cfnDog<Esc>n.n.n.kb~Go<Esc>ZZ

0 comments

#143 Radek / qrczeno - Score: 26 - 05/08/12 @ 12:51
/H<CR>cfnDog<Esc>n.n.?h<CR>.hh~Go<Esc>ZZ

0 comments

#144 Esteban Ordano / eordano - Score: 27 - 04/28/11 @ 06:10
:%s/[hH]uman/Dog/g<CR>krdGo<Esc>ZZ

0 comments

#145 Teflon Ted t(◕‿◕t) / teflonted - Score: 27 - 05/30/11 @ 04:16
:%s/human/Dog/i<CR>kxid<Esc>5jo<Esc>ZZ

0 comments

#146 Arto Vuori / dhpe - Score: 27 - 08/31/12 @ 20:11
:%s/Human/Dog<CR>kcfndog<Esc>Go<Esc>ZZ

0 comments

#147 Dj Vimgolf / dj_vimgolf - Score: 28 - 12/31/11 @ 02:02
:%s/uman/og<CR>:%s/H/D<CR>krdGo<Esc>ZZ

0 comments

#148 Alishah Chator / alicharizard - Score: 28 - 06/11/14 @ 17:01
:%s/uman/og<CR>:%s/H/D<CR><Up>rdGo<Esc>ZZ

0 comments

#149 Brendan Taylor / beect - Score: 29 - 04/26/11 @ 21:00
:%s/uman/og/<CR>krd:%s/H/D<CR>Go<Esc>ZZ

0 comments

#150 Seth Miller / skigil - Score: 30 - 09/28/11 @ 19:27
:%s/[hH]/<BS>uman/Dog/<CR>krdGo<Esc>:wq<CR>

0 comments

#151 Toto l'haricot / nico_le_terribl - Score: 35 - 06/19/11 @ 03:54
:%s/Human/Dog<CR>:%s/human/doh<BS>g<CR>Go<Esc>ZZ

0 comments

#152 Andrew Michaud / andrewjmichaud - Score: 37 - 09/04/15 @ 20:59
VG:s/Human/Dog/<CR>kV:s/human/dog/<CR>Go<Esc>ZZ

0 comments

#153 kuri65536 / kuri65536 - Score: 46 - 04/23/11 @ 04:14
:%s/Human/Dog/s<BS>g<CR>:%s/human/dog/s<BS>g<CR>jjjjA<CR><Esc>:x<CR>

0 comments

#154 はたけやまたかし / htkymtks - Score: 52 - 04/22/11 @ 16:21
:<Up><Up>s/<BS><BS>%s/Human/Dog/g<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS>h<Right><Right><Right><Right><Right><Right><BS>d<CR>Go<Esc>:wq<CR>

0 comments

#155 Jacob Rosenblatt / JKRosenblatt - Score: 71 - 06/15/14 @ 16:02
:%s/[Hu<BS>human<Left><Left><Left><Left>]<Right><Right><Right><Right>/\=submatch(0) ==# 'human' ? 'dog' : 'Dog'/g<CR>:wq<CR>

0 comments

Created by: captain_morgan

155 active golfers, 371 entries

Leaderboard (lowest score wins):
19
#1 - Tim Chase / gumnos

04/21/2011 at 11:13PM

19
#2 - Beau Dacious / nocash

04/21/2011 at 11:46PM

19
#3 - Pete Johns / johnsyweb

04/22/2011 at 05:42AM

19
#4 - Mathias Bynens  / mathias

04/22/2011 at 06:51AM

19
#5 - Oleg Roshupkin / jjjahson

04/22/2011 at 09:42AM

19
#6 - Pavlo Klets / p01nt

04/22/2011 at 09:59AM

19
#7 - xhtmlforum / xhtmlforum

04/22/2011 at 05:21PM

19
#8 - Wei Dai / clvv42

04/23/2011 at 01:16AM

19
#9 - Stephen Morrow / yawmark

04/23/2011 at 01:39PM

19
#10 - Malaney / iamjh

04/26/2011 at 04:08AM

19
#11 - Chad Ostrowski / chadoh

05/09/2011 at 03:52PM

19
#12 - Sam Wen / sam_wen

05/13/2011 at 03:07AM

19
#13 - Dragan Cvetinovic / kawkafi

05/19/2011 at 05:21PM

19
#14 - icdark / icdark

05/30/2011 at 12:01AM

19
#15 - not so punk :] / notsopunk

06/19/2011 at 08:57AM

19
#16 - Peter Anselmo / peter_anselmo

06/23/2011 at 07:19PM

19
#17 - Johan Sveholm / rymdtjuren

06/24/2011 at 08:59AM

19
#18 - Emile Swarts / EmileSwarts

06/25/2011 at 11:48AM

19
#19 - Atan59 / atan59vg

07/15/2011 at 12:08PM

19
#20 - Sammasati / sammasati0

07/16/2011 at 03:14AM

19
#21 - Dave / zzdave13

07/16/2011 at 03:53PM

19
#22 - Stephen Gordon / DubsGordon

08/01/2011 at 11:48PM

19
#23 - Joshua Moyers / joshuamoyers

08/03/2011 at 03:32AM

19
#24 - Hu Junfeng / junfeng

08/04/2011 at 01:41PM

19
#25 - Federico Galassi / federicogalassi

08/27/2011 at 10:29PM

19
#26 - Simon's Calf / simonscarfe

09/06/2011 at 11:28AM

19
#27 - Justin Love / wondible

09/13/2011 at 12:42PM

19
#28 - p0ckets / p0ckets

10/07/2011 at 08:44AM

19
#29 - vimja / vimja666

10/11/2011 at 07:17AM

19
#30 - Travis Jeffery / travisjeffery

11/23/2011 at 07:49AM

19
#31 - R.T. Lechow / rtlechow

11/23/2011 at 04:06PM

19
#32 - You-Siang Lin / yslinnctu

11/29/2011 at 05:10AM

19
#33 - Tesnorth / Tesnorth

01/31/2012 at 02:47PM

19
#34 - Abdel Said / abdelsaid

02/01/2012 at 06:38PM

19
#35 - Burkhard Zimmermann / BurkZimm

02/01/2012 at 11:57PM

19
#36 - Pei-Lun Lee / ypcatw

02/05/2012 at 01:59AM

19
#37 - Dave Smylie / davesmylie

02/06/2012 at 10:27PM

19
#38 - Renat Aksitov / Korvin79

02/08/2012 at 03:04PM

19
#39 - Michał Wróbel / sparrovv_

03/14/2012 at 04:55PM

19
#40 - Chris Penkett / chrispenkett

04/03/2012 at 06:28PM

19
#41 - Rod Knowlton / codelahoma

04/27/2012 at 12:58AM

19
#42 - ise0615 / ise0615

05/03/2012 at 03:30PM

19
#43 - Sebastian Kusnier / skusnier

05/09/2012 at 09:27PM

19
#44 - Urtica dioica / udioica

05/27/2012 at 09:23AM

19
#45 - Kerson Hsiao / KersonHsiao

07/13/2012 at 01:10PM

19
#46 - Tyler / tylerbindon

04/06/2013 at 11:51PM

19
#47 - Trevor Powell / DoomedBunnies

04/16/2013 at 06:37AM

19
#48 - Marco Hinz / _mhinz_

05/21/2013 at 11:13PM

19
#49 - Petro Тrouq / zulolosi

08/30/2013 at 07:12PM

19
#50 - Oliver Christ / 0liverChrist

10/08/2013 at 09:26PM

19
#51 - cj / cj01101

01/30/2014 at 09:42PM

19
#52 - John Braxler / braxler

05/14/2014 at 07:34PM

19
#53 - Rob Glew / RealGlew

06/12/2014 at 02:21PM

19
#54 - Charlene Tshos / charlymul

06/12/2014 at 02:51PM

19
#55 - Walker Boh / walker_boh

12/07/2015 at 12:06PM

20
#56 - h_east (トロッコ6個) / h_east

04/23/2011 at 08:21AM

20
#57 - Julien Pivotto / roidelapluie

04/23/2011 at 04:48PM

20
#58 - Terje Larsen / terlars

05/09/2011 at 12:01PM

20
#59 - carlpeter / carlpeter1

11/15/2011 at 11:07AM

20
#60 - Martin Aumueller / aumuell

05/04/2012 at 08:22PM

20
#61 - brett / brettyukich

09/24/2013 at 09:49AM

20
#62 - sockdude1 / sockdude1

11/11/2013 at 09:44PM

20
#63 - Clark DuVall / theclarkatron

05/23/2015 at 05:28AM

20
#64 - Jon Krause / jkrause314

04/16/2016 at 10:15PM

21
#65 - Shawn / sartak

04/22/2011 at 10:39PM

21
#66 - Cam Thompson / camthompson

04/29/2011 at 12:32AM

21
#67 - Tim Dean / Tmdean

05/03/2011 at 06:11AM

21
#68 - Will Gray / graywh

05/06/2011 at 07:57PM

21
#69 - Mohammed / mbadran

05/10/2011 at 02:05PM

21
#70 - Jean-Rene David / jeanrenedavid

05/12/2011 at 01:16AM

21
#71 - tdirrenb / tdirrenb

05/16/2011 at 02:33AM

21
#72 - Yannis Chatzimichos / feedward

06/02/2011 at 03:09AM

21
#73 - Kent Sibilev / datanoise

06/30/2011 at 05:25AM

21
#74 - Torben Rasmussen / rasmustorben

08/15/2011 at 05:37PM

21
#75 - Dühöngő / aswna

09/02/2011 at 06:38PM

21
#76 - Jon Allured / jonallured

09/14/2011 at 01:35AM

21
#77 - Christopher Erin / MCNormalMode

09/21/2011 at 08:39PM

21
#78 - Andy Pincombe / ampersandy

10/29/2011 at 10:29AM

21
#79 - Dave Harrington / ozzy_dave

11/06/2011 at 12:18AM

21
#80 - 415fox / 415fox

11/08/2011 at 06:36PM

21
#81 - Arton0306 / Arton0306

12/18/2011 at 05:05PM

21
#82 - Rik Lomas / riklomas

12/30/2011 at 12:27AM

21
#83 - Kurt Gaastra / KGaastra

02/13/2012 at 02:37AM

21
#84 - Alexander Scherbinin / realmyst

02/14/2012 at 12:37AM

21
#85 - 無ん垢の叫び / john_ababa

02/27/2012 at 12:31PM

21
#86 - Golf Sinteppadon / minigolf2000

04/27/2012 at 10:49PM

21
#87 - Nolen Royalty / NolenRoyalty

05/15/2012 at 07:23PM

21
#88 - Fernando Ortiz / fortiz2k

06/17/2012 at 07:29AM

21
#89 - Javier Cervantes / solojavier

08/31/2012 at 09:10PM

21
#90 - James / Dronak

09/05/2013 at 02:43PM

21
#91 - Joonas Pihlajamaa / jokkebk

02/21/2014 at 08:29AM

21
#92 - Carlos Hernando / chernando

04/26/2014 at 06:56PM

21
#93 - Connie Qi / connieqi

06/11/2014 at 04:43PM

21
#94 - Tom / BureaucratGr11

06/30/2015 at 07:52PM

22
#95 - Thom Hughes / thom_hughes_1

05/04/2011 at 05:34AM

22
#96 - t__naka / t__naka

08/12/2011 at 07:42AM

22
#97 - こばばー / symmet

09/07/2011 at 08:04AM

22
#98 - Matt Woelk / MattWoelk

11/12/2011 at 12:21AM

22
#99 - strager / strager

12/12/2011 at 02:45AM

22
#100 - bmamax / bmamax

01/17/2012 at 03:08PM

22
#101 - Steven Sloss / StevenSloss

02/19/2012 at 06:28PM

22
#102 - Paul Patience / talmodighet

02/23/2012 at 07:03AM

22
#103 - arno renevier / dadadiblog

03/19/2012 at 07:26AM

22
#104 - Nick Harding / nick_harding

08/28/2013 at 08:31PM

23
#105 - Balkoth / _Balkoth_

04/22/2011 at 06:09AM

23
#106 - Arthur Hinh / arthur_hinh

04/23/2011 at 01:53AM

23
#107 - sorami / boredoms

04/30/2011 at 11:26PM

23
#108 - Matthieu Honel / ocus

05/06/2011 at 01:30PM

23
#109 - Sam / dtjohnnymonkey

05/31/2011 at 09:52PM

23
#110 - Andrew Radev / andrewradev

06/28/2011 at 07:45PM

23
#111 - Dan Masquelier / danmasq

07/01/2011 at 09:47PM

23
#112 - akhilravidas / akhilravidas

07/31/2011 at 01:53PM

23
#113 - Dario Cazzaro / darioqa

09/17/2011 at 06:22PM

23
#114 - William Dunand / wdunand

11/07/2011 at 03:23AM

23
#115 - Nick Klauer / klauern

11/20/2011 at 04:24AM

23
#116 - Milan Dobrota / milandobrota

11/21/2011 at 03:57AM

23
#117 - Michal Cichra / _mikz

11/24/2011 at 12:26AM

23
#118 - Shannon / shannonskipper

12/01/2011 at 10:34PM

23
#119 - Mislav Marohnić / mislav

12/05/2011 at 10:38PM

23
#120 - Xavier Nayrac / lkdjiin

01/02/2012 at 05:37PM

23
#121 - ɟpsq / bsdf

02/08/2012 at 08:18PM

23
#122 - Jyun-Fan Tsai / fakecolor

02/17/2012 at 02:17PM

23
#123 - Sergey Kim / skim1776

03/25/2012 at 07:56AM

23
#124 - 蒼時弦也 / elct9620

03/30/2012 at 01:36PM

23
#125 - Feanor Celebrimbor / tumbaletaurea

06/04/2012 at 04:06AM

23
#126 - Nipunn Koorapati / nipunn1313

07/21/2012 at 10:28PM

23
#127 - Marcin Sza / coot_

09/25/2012 at 09:34AM

23
#128 - Dr Rev J Kirchartz / JKirchartz

07/28/2013 at 08:30PM

23
#129 - LLiseil / lliseil

07/17/2014 at 06:12PM

23
#130 - Jakob / jajob

11/02/2014 at 08:10PM

23
#131 - Jake Eaton / Jake__Eaton

02/28/2015 at 07:32AM

23
#132 - ltn614 / ltn614

09/29/2015 at 08:16PM

24
#133 - Zak Johnson / zakj

04/22/2011 at 02:57AM

24
#134 - Vojtěch Šívr / VojtechSivr

06/09/2011 at 11:15PM

24
#135 - jacobcr / jacobcr

08/24/2011 at 07:05AM

24
#136 - Daniel / dbb0

02/20/2012 at 08:32PM

24
#137 - William Ott / oddalot

04/12/2015 at 05:27PM

25
#138 - draft_val=3 / draftcode

04/24/2011 at 08:00AM

25
#139 - Jacob Taylor / jacobltaylor

08/24/2011 at 05:28PM

25
#140 - Jakub Arnold / darthdeus

12/19/2011 at 03:52PM

25
#141 - Ibrahim Tencer / ibrahimtencer

02/14/2012 at 12:09AM

25
#142 - Christian Helbling / friendly_coder

04/09/2012 at 01:31PM

26
#143 - Radek / qrczeno

05/08/2012 at 12:51PM

27
#144 - Esteban Ordano / eordano

04/28/2011 at 06:10AM

27
#145 - Teflon Ted t(◕‿◕t) / teflonted

05/30/2011 at 04:16AM

27
#146 - Arto Vuori / dhpe

08/31/2012 at 08:11PM

28
#147 - Dj Vimgolf / dj_vimgolf

12/31/2011 at 02:02AM

28
#148 - Alishah Chator / alicharizard

06/11/2014 at 05:01PM

29
#149 - Brendan Taylor / beect

04/26/2011 at 09:00PM

30
#150 - Seth Miller / skigil

09/28/2011 at 07:27PM

35
#151 - Toto l'haricot / nico_le_terribl

06/19/2011 at 03:54AM

37
#152 - Andrew Michaud / andrewjmichaud

09/04/2015 at 08:59PM

46
#153 - kuri65536 / kuri65536

04/23/2011 at 04:14AM

52
#154 - はたけやまたかし / htkymtks

04/22/2011 at 04:21PM

71
#155 - Jacob Rosenblatt / JKRosenblatt

06/15/2014 at 04:02PM