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):
23
#31 - James / @Dronak

11/10/2022 at 04:44PM

23
#32 - Luoyb / @Luoyb

11/15/2023 at 02:10AM

23
#33 - jonas-grobe / @jonas-grobe

02/03/2024 at 04:17PM

24
#34 - RaylanFox / @RaylanFox

10/10/2020 at 05:22PM

24
#35 - Jake Grossman / @PiranaLaugh

11/13/2020 at 08:15AM

24
#36 - z00master / @z00master

08/29/2022 at 05:42AM

25
#37 - ؜ / @h43z

12/02/2017 at 02:49PM

31
#38 - Mike Harris / @MikeMJHarris

12/02/2017 at 07:25PM