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 416 remaining solutions by signing in and submitting your own entry
#417 Andrei Pirvan / @PirvanAndrei - Score: 1138 - 10/21/22 @ 18:16
l<BS><BS><Esc>.<BS>:%s%<BS>/:*<0xc3><0x98><BS>*ps<BS><BS>x<BS><BS>xp<BS><BS>px<BS><BS>%<Left>*<Left><Del><Del><BS><BS>\d+\ze<BS><BS><BS><BS>\+ze\s*px<BS><BS><BS><BS><BS><BS><BS><BS>+\<<BS>zw<BS>e<0xc2><0xab><BS><<BS>\s*p<BS>%\<BS>(<BS>/\=float2ne<BS>r(submatch(0)*<BS>/100/g<Left><Left><Left><Left><Left><Left><Right><Right><Right><Right>)<CR><Esc>_<Esc>:<Up><Left><Left><Left><Left><Left><Left><BS>*<0xc3><0x98><BS><CR><Up><Esc><Up><Esc><Up><Esc>:<Up><Left><Left><Left><Left><Left><Left><Left><Del>/<CR><Esc><Up><Esc>:<Up><Left><Left><Left><Left><Left><Left><Left>\<CR><Esc>:<Esc><Esc>uu<Esc>:/<BS><Up><Left><Left><Left><Left><Left><Left><Left><Right><BS><BS>*,<BS>0.<Del><Del><Del>001<CR>uu<Up>:<Up><Up><Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><BS>s<BS>e<BS>s<BS>e<Left><Left><Left><Left><Left><Left>e<BS>zs<Del><Right>d<0xc2><0xaa><BS>\<Right><Left><Left><Left><Right><BS>f<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><BS>*0.<Del><Del>0<Right>1<Left><Left><BS><CR><Esc>u<Up><Esc>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><BS><BS><BS><BS><BS><BS><BS><BS><BS><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><BS><CR><Esc>u:<Up><Left><Left><Left>00<CR><Esc>u<Esc>:<Up><Left><Left><Left><Right><BS><BS><BS><BS><BS><BS>100\/1000<CR><Esc>u:<Up><Left><Left><Left><Left><Left><Left><Left><BS><Del><Del><Del><Del><Del><CR><Esc>u<Esc><Up>:<Up><Left><Left><Left><Left><Left><BS>+<Right><Right><BS><Del><CR>u<Esc>:<Up><Left><Left><Left><BS>*<Right>000<CR><Esc><Esc>u:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right>string2float/<BS>(<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>)<CR><Esc><Esc><Esc><Esc>u<Esc>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><BS><CR><Esc>uu:<Up><Left><Left><Left><Left><Left><Left><Left><Left>)<Right><Right><Right><Right><Right><Del><CR><Esc>:<Up><Left><Left><Left><Left><Left><Left><BS>/<Right>0<CR><Esc>:<Up><Left><Left><Left><Left><Left><Left><Left><Left>\<CR><Esc>:<Esc>uu<Up><Esc>U:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><BS><BS><BS><BS><BS><BS><BS>0:<BS>-<BS>.01<Left><Left><Left><Left>*<CR><Esc>u:<Up><Left><Left><Left><Left><Left><Left>199<BS><BS>000*<CR><Esc>.u:<Up><Left><Left><Left>000<Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><CR>:<Up>u<Esc><Esc><Esc><Esc>u<Up><Esc>.<Esc>.<Esc>.<Esc><Up><Esc><Esc><Esc>:<Up><BS><CR><Esc>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>0+1)<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>(<CR><Esc>u:<Up><Esc><Esc>u:<Up><CR><Esc><Esc><Esc>gg<C-V>G <Left><Left>I "<Right> "<BS><BS>"<End><BS><BS><BS><Esc><Esc>uuu<Esc><C-V>GI "<Right>"<End><BS><BS><BS>,<Esc>uuu<C-V>G<Del>u<Del>u<End><Del>u<C-V>G<End><Del><C-V>G<End><Del><C-V>G<End>c,<Esc><Home><C-V>"G<C-V>G<C-V>ggI"<Right>"<Esc>uuij<Esc>i<Del><Esc><C-V>GiI"<Up><Down><Up><Down><Up><Down><Down>I"<Esc><Right><Right><Esc><C-V>GI<Right><Right>"<Esc><Esc>i<C-Left><Left><Left><C-V>G<BS><Esc><C-V>GI  <Esc>iletters:<BS> ?<BS>= {<CR>  <Esc>Go<BS><BS><BS>}<Left>i<BS><CR><BS><BS><Up><End><BS><Esc>uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu:<Up><Left><Left><Left>0<CR><Esc><C-V>GG<C-V><C-V>G<C-V>gg<C-V>GI"<Esc><C-V>Gi<Right><Right><Right><Left><Right><Left>I<Right><Right>"<Esc><Left><Left><Left><Esc>I<BS><Esc><C-V>G  I  <Esc><Esc><C-V>G<Del><C-A><C-A><Esc><C-A><Esc><Esc><Esc>uu<Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc><Esc>:<Esc><Esc><Esc><C-Z><Esc>uuO<Esc>iletters = {<Esc><Home><Down><C-V>GI<End><BS><Esc><Down><Right><Esc><C-V>G<End><Del><Up><C-V>G<End><Left><Left>c,<Esc><Esc>Go<C-H><BS><BS><CR><BS><BS>}<Up><End><BS><Esc>:wq<CR>

0 comments


Created by: @Marco73364768

417 active golfers, 1589 entries

Leaderboard (lowest score wins):
50
#61 - A A A / @37fatos

10/02/2022 at 03:54PM

50
#62 - Iron Manders / @MandersIron

10/24/2022 at 07:50PM

50
#63 - Arne / @arnkaes

01/16/2023 at 09:15PM

50
#64 - mevmev / @mevmev8

01/29/2023 at 06:42PM

50
#65 - SnakitoGamer4160 / @SnakitoGamer4160

04/07/2024 at 07:36PM

51
#66 - Cloud Rider / @cloudr1der

12/16/2022 at 10:57AM

52
#67 - 深窓の令嬢@ドクター / @arbino1031

09/07/2022 at 07:26AM

52
#68 - 우정민 / @jeongmin2021

10/01/2022 at 04:28PM

52
#69 - JongHwan Kim / @shockrabbit17

10/19/2022 at 10:08AM

53
#70 - Qing Liu / @poeminlash

12/18/2023 at 05:42AM

54
#71 - WladDalwM / @WladDalwM

10/13/2022 at 02:31PM

54
#72 - Bruce Woodward / @b00ffer

02/02/2023 at 02:36AM

54
#73 - 马海洋 / @LG41bT7ZvqOdFl3

02/07/2023 at 03:18AM

54
#74 - ye-chuan / @ye-chuan

01/24/2024 at 06:07PM

55
#75 - James Harvey / @JimmyJamesII

02/11/2023 at 11:35PM

55
#76 - someone / @IKvacenok

06/02/2023 at 01:28PM

55
#77 - Golf Vim / @GolfVim11388

07/03/2023 at 11:24PM

55
#78 - Gustav Kristensen / @gustavkrist

10/02/2024 at 12:38AM

55
#79 - elforeee / @elforeee

10/03/2024 at 10:10AM

56
#80 - Saki Gw / @Sakigw

08/01/2022 at 04:14PM

56
#81 - BareTull / @BareTull3

08/20/2022 at 10:15AM

56
#82 - Joker K / @j0k3r3614146025

08/20/2022 at 01:53PM

56
#83 - Filipe Brandenburger / @filbranden

08/26/2022 at 02:14AM

56
#84 - Nyaong Lazy / @NyaongL

09/30/2022 at 04:07AM

56
#85 - Dank City / @ddankcity

12/05/2022 at 04:01PM

56
#86 - test-and-sun / @testandsun1

01/31/2023 at 02:37PM

56
#87 - Detached Head State / @DtachdHeadState

09/08/2023 at 12:45AM

57
#88 - Lory / @Lory46845742

07/31/2022 at 08:27AM

57
#89 - satetheus-vimgolf / @SVimgolf

08/03/2022 at 04:46PM

57
#90 - evertrasjp / @evertrasjp

08/07/2022 at 10:33AM