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 9v0062e3e96a000000000226

HS exam question

Convert the data to a python dictionary

Start file
e: 45.063 %
s: 42.182 %
a: 40.586 %
r: 30.316 %
o: 28.193 %
i: 27.897 %
l: 24.621 %
n: 23.124 %
t: 22.992 %
d: 17.676 %
u: 17.051 %
c: 14.648 %
y: 14.253 %
h: 12.986 %
p: 12.459 %
m: 12.130 %
b: 10.253 %
g: 10.204 %
k: 9.118 %
w: 7.456 %
f: 7.077 %
v: 5.003 %
z: 2.271 %
x: 1.860 %
j: 1.366 %
q: 0.741 %
End file
letters = {
  "e": 0.45063,
  "s": 0.42182,
  "a": 0.40586,
  "r": 0.30316,
  "o": 0.28193,
  "i": 0.27897,
  "l": 0.24621,
  "n": 0.23124,
  "t": 0.22992,
  "d": 0.17676,
  "u": 0.17051,
  "c": 0.14648,
  "y": 0.14253,
  "h": 0.12986,
  "p": 0.12459,
  "m": 0.12130,
  "b": 0.10253,
  "g": 0.10204,
  "k": 0.09118,
  "w": 0.07456,
  "f": 0.07077,
  "v": 0.05003,
  "z": 0.02271,
  "x": 0.01860,
  "j": 0.01366,
  "q": 0.00741
}

View Diff

1,26c1,28
< e: 45.063 %
< s: 42.182 %
< a: 40.586 %
< r: 30.316 %
< o: 28.193 %
< i: 27.897 %
< l: 24.621 %
< n: 23.124 %
< t: 22.992 %
< d: 17.676 %
< u: 17.051 %
< c: 14.648 %
< y: 14.253 %
< h: 12.986 %
< p: 12.459 %
< m: 12.130 %
< b: 10.253 %
< g: 10.204 %
< k: 9.118 %
< w: 7.456 %
< f: 7.077 %
< v: 5.003 %
< z: 2.271 %
< x: 1.860 %
< j: 1.366 %
< q: 0.741 %
---
> letters = {
>   "e": 0.45063,
>   "s": 0.42182,
>   "a": 0.40586,
>   "r": 0.30316,
>   "o": 0.28193,
>   "i": 0.27897,
>   "l": 0.24621,
>   "n": 0.23124,
>   "t": 0.22992,
>   "d": 0.17676,
>   "u": 0.17051,
>   "c": 0.14648,
>   "y": 0.14253,
>   "h": 0.12986,
>   "p": 0.12459,
>   "m": 0.12130,
>   "b": 0.10253,
>   "g": 0.10204,
>   "k": 0.09118,
>   "w": 0.07456,
>   "f": 0.07077,
>   "v": 0.05003,
>   "z": 0.02271,
>   "x": 0.01860,
>   "j": 0.01366,
>   "q": 0.00741
> }

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 23 remaining solutions by signing in and submitting your own entry
#24 猪猪猪珠珠 / @MdKaLCZeqxwZvZs - Score: 153 - 08/05/22 @ 17:46
qaI  "<Right>"<Esc>f.uuuuuuuuuuquuqaI  "<Right>"<Esc>$xxA,<Esc>jq25@axoI<BS><BS><BS>}<Esc>ggO<BS><BS>les<BS>tters = {<Esc>/<BS>%/%<BS>%/<BS><BS><BS>:s<BS>%s/.//g<CR>u:s/<Left><Left>%<Right><Right>n<BS>\.//g<CR>lllla0<BS><Esc><C-V>kkkkkkkA0<Esc>ggjf:l<C-V>GkllllllA0.<Esc>:wq<CR>

0 comments


Created by: @Marco73364768

24 active golfers, 77 entries

Leaderboard (lowest score wins):
47
#1 - Danilo J. S. Bellini / @danilobellini

08/01/2022 at 05:24AM

47
#2 - Irakli Chigvaria / @tchigvaria

08/02/2022 at 02:18PM

48
#3 - Jean George / @JeanGeo20504212

08/01/2022 at 02:18AM

48
#4 - Александр Черенков / @AleksandrCeren3

08/02/2022 at 03:00AM

48
#5 - ShookerAndBeta / @Shooker2012

08/02/2022 at 10:49AM

48
#6 - z00master / @z00master

08/02/2022 at 05:23PM

56
#7 - Saki Gw / @Sakigw

08/01/2022 at 04:14PM

57
#8 - Lory / @Lory46845742

07/31/2022 at 08:27AM

57
#9 - satetheus-vimgolf / @SVimgolf

08/03/2022 at 04:46PM

57
#10 - evertrasjp / @evertrasjp

08/07/2022 at 10:33AM

60
#11 - Marcin Radomski / @_dextero

08/06/2022 at 09:41PM

63
#12 - George Granberry / @JudgeJerj

07/31/2022 at 10:11PM

63
#13 - Kiran Rajpurohit / @KiranClose

08/05/2022 at 01:35PM

75
#14 - xvczuwo / @xvczuwoa

08/01/2022 at 08:15PM

78
#15 - M Rais Fathin M / @raisfathin

08/06/2022 at 01:56AM

83
#16 - Anthony Hein / @anthonynhein

07/31/2022 at 04:27PM

88
#17 - Markus / @dayshade_7

08/05/2022 at 02:27PM

94
#18 - potatol33t / @potatol33t

08/03/2022 at 08:11PM

100
#19 - mika / @mika31120321

07/30/2022 at 10:11AM

111
#20 - h / @tgen22334

08/06/2022 at 02:47PM

116
#21 - fubuki shiro / @Yuhao_fubuki

08/08/2022 at 09:07AM

135
#22 - Jeremy Perna / @jperna7254

08/05/2022 at 11:54PM

151
#23 - Eric Briand / @eric_briand

08/05/2022 at 02:10PM

153
#24 - 猪猪猪珠珠 / @MdKaLCZeqxwZvZs

08/05/2022 at 05:46PM