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 5a218cccc0ed6d04af000004

Back to the roots

Johnny has a file with more integers. He wants to change each number with its square root. Can you help him?

Start file
13
81
1024
72
144
51
90
2
77
25
625
4
End file
3.605551
9.0
32.0
8.485281
12.0
7.141428
9.486833
1.414214
8.774964
5.0
25.0
2.0

View Diff

1,12c1,12
< 13
< 81
< 1024
< 72
< 144
< 51
< 90
< 2
< 77
< 25
< 625
< 4
---
> 3.605551
> 9.0
> 32.0
> 8.485281
> 12.0
> 7.141428
> 9.486833
> 1.414214
> 8.774964
> 5.0
> 25.0
> 2.0

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 37 remaining solutions by signing in and submitting your own entry
#38 Mike Harris / @MikeMJHarris - Score: 31 - 12/02/17 @ 19:25
qqcw<C-R>=sqrt(<C-R>")<CR>+<BS><Esc>+11@qq111@qZZ

0 comments


Created by: @agasparovici

38 active golfers, 63 entries

Leaderboard (lowest score wins):
20
#1 - Jean George / @JeanGeo20504212

10/05/2024 at 11:31PM

20
#2 - Peppa Pig / @PeppaPi95550250

10/07/2024 at 04:00AM

21
#3 - John Braxler / @braxler

08/05/2024 at 03:18PM

21
#4 - nickGPT / @nickandbro

08/27/2024 at 05:19AM

23
#5 - Jon Krause / @jkrause314

12/01/2017 at 05:58PM

23
#6 - Smylers / @Smylers2

12/01/2017 at 07:20PM

23
#7 - Cristian Lupașcu / @clupasq

12/01/2017 at 08:21PM

23
#8 - 5tephen / @geluso

12/02/2017 at 01:27AM

23
#9 - Andrei Gasparovici / @agasparovici

12/02/2017 at 07:08AM

23
#10 - BareTull / @BareTull3

12/02/2017 at 04:27PM

23
#11 - tPenguinLTG / @tpenguinltg

12/03/2017 at 01:03AM

23
#12 - Markus / @dayshade_7

12/03/2017 at 12:38PM

23
#13 - Eric Söderström / @eksoderstrom

12/04/2017 at 01:46AM

23
#14 - 梧桐王子 / @WutongYujie

12/05/2017 at 01:27AM

23
#15 - Pereant osores / @viniciusxp

12/05/2017 at 12:34PM

23
#16 - Petro Тrouq / @zulolosi

12/06/2017 at 12:02AM

23
#17 - Kyrylo Yakymenko / @Yakimych

12/07/2017 at 06:59PM

23
#18 - Henrique Malheiro / @rike09

12/11/2017 at 11:19PM

23
#19 - Семён Марьясин / @MaryasinS

01/12/2018 at 11:34AM

23
#20 - Ben Hill / @KaizenSoze70

01/16/2018 at 12:50PM

23
#21 - Liam Chimes / @ChimesLiam

05/02/2018 at 01:12PM

23
#22 - A / @777Android777

08/06/2018 at 03:11PM

23
#23 - Vasil Mikhalenya / @bazillek

09/22/2018 at 06:35PM

23
#24 - Tinko Minko / @tandikula

01/28/2019 at 01:43AM

23
#25 - Norbert / @mullno

05/13/2019 at 04:23PM

23
#26 - Martin Delille / @martinodelilo

09/02/2019 at 05:50PM

23
#27 - vimgolfer / @vimgolfer7

10/04/2019 at 05:18AM

23
#28 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 10:29PM

23
#29 - pikjes / @pikjes2

07/15/2021 at 06:58PM

23
#30 - Alex / @AlexanderHeatl2

08/29/2022 at 08:44PM