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

Search and Replace 0

Replace every instance of 'aaa' with 'xaaax'.

Start file
aaa
aab
abb
bbb
aaa
aab
abb
bbb
aaa
aab
abb
bbb
aaa
aab
abb
bbb
aaa
aab
abb
bbb
End file
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb
xaaax
aab
abb
bbb

View Diff

1c1
< aaa
---
> xaaax
5c5
< aaa
---
> xaaax
9c9
< aaa
---
> xaaax
13c13
< aaa
---
> xaaax
17c17
< aaa
---
> xaaax

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 1470 remaining solutions by signing in and submitting your own entry
#1471 Heissen López / @heilop - Score: 140 - 06/15/20 @ 21:30
<Esc>%i<Esc>%<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Esc>%/aaa/xaaax/g<CR><Up><Down><Esc>%/aaa/Replace<CR><CR><Esc>:%/aaa/xax<BS>aax/g<CR><Esc>:%s/aaa/xaaax/g<CR><Esc>:wq!<CR>

0 comments


Created by: @wolever

1471 active golfers, 4444 entries

Leaderboard (lowest score wins):
19
#1291 - TchiKong / @tchikong

01/23/2011 at 11:26AM

19
#1292 - Nick Jones / @nickj89

04/10/2011 at 12:46PM

19
#1293 - Fat troll / @fat_troll

03/29/2014 at 08:39AM

19
#1294 - Charles Neill / @ccneill

05/01/2014 at 01:56AM

19
#1295 - Jacob Rosenblatt / @JKRosenblatt

06/15/2014 at 02:39PM

19
#1296 - Daniel Low / @deniallow

08/07/2014 at 10:21PM

19
#1297 - Rathrio / @Rathrio

09/02/2014 at 12:33PM

19
#1298 - a b / @c00_a

01/19/2015 at 12:13PM

19
#1299 - Nick James / @Verbitan

01/31/2015 at 02:43PM

19
#1300 - Rijnard van Tonder / @rvtond

04/27/2015 at 02:17AM

19
#1301 - Manuel Haas / @uf_manuel

07/22/2015 at 05:08PM

19
#1302 - Nathanael / @ngsilverman

05/09/2018 at 04:27AM

19
#1303 - Zach Russell / @ZacharyRRussell

02/07/2019 at 03:26PM

19
#1304 - Hans-Wilhelm / @hanswilw

06/26/2019 at 03:46PM

19
#1305 - Sinnamon / @waddupbrother

01/22/2020 at 08:30PM

19
#1306 - TriCierraTops / @CierraWallin

01/30/2020 at 06:39PM

19
#1307 - なで。 / @nadegata217

02/05/2020 at 03:00PM

19
#1308 - Eldar Kurtic / @_EldarKurtic

03/05/2020 at 09:59PM

20
#1309 - Jacob Miller / @pwnies

12/29/2010 at 01:19AM

20
#1310 - cnolan / @optimusgrime

12/29/2010 at 05:26AM

20
#1311 - héctor acosta / @_hacosta

12/29/2010 at 06:02AM

20
#1312 - Rob Hanlon / @ohwillie

12/29/2010 at 08:27AM

20
#1313 - Jonathan Pui / @jpui

12/29/2010 at 09:10AM

20
#1314 - kārlis / @skazhy

12/29/2010 at 09:46AM

20
#1315 - Marian Schubert / @MarianSchubert

12/29/2010 at 12:43PM

20
#1316 - Jens-Chr. Fischer / @jcfischer

12/29/2010 at 12:52PM

20
#1317 - Veg / @originalveghead

12/29/2010 at 02:36PM

20
#1318 - jonlorusso / @jonlorusso

12/29/2010 at 03:45PM

20
#1319 - Dezső Zoltán / @zakiazigazi

12/29/2010 at 04:38PM

20
#1320 - Daniel Corrêa / @dnl_correa

12/29/2010 at 10:01PM