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

Tabbed Table to Python Array

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

Start file
        A       B       C       D       E       F       G       H       I       J       K       L       M       N       O       P       Q       R       S       T       U       V       W       X       Y       Z
A      
8       31      27      11      64      15      30      20      5       1       7       59      28      102     -       4       -       51      53      46      75      2       3       -       1       2
B      
16      1       -       1       101     -       3       1       12      -       1       9       -       1       8       -       -       9       6       4       14      -       1       -       1       1
C      
2       -       -       2       1       -       -       242     1       -       14      1       -       -       2       -       -       -       1       -       -       -       -       -       -       -
D      
54      3       1       13      227     3       4       2       93      1       3       5       4       6       9       3       -       10      11      6       16      3       4       -       -       3
E      
26      45      25      51      23      26      50      57      193     3       19      63      55      400     6       13      1       409     140     55      36      14      23      2       1       11
F      
19      2       -       9       25      12      3       1       7       -       1       5       1       2       9       1       -       18      4       20      24      1       1       -       -       1
G      
20      3       -       12      147     2       3       3       19      1       3       9       3       5       6       1       -       14      18      18      11      4       3       -       -       3
H      
70      4       1       14      102     2       4       3       23      1       3       25      11      19      18      1       -       37      11      47      11      4       9       -       -       3
I      
7       7       76      20      163     5       38      12      1       1       12      25      27      168     20      2       -       17      79      78      3       5       1       -       -       5
J      
7       -       -       -       9       5       -       -       -       -       -       -       -       -       2       -       -       -       -       -       5       -       -       -       -       -
K      
28      1       -       2       26      1       1       1       7       -       1       10      1       1       24      1       -       13      5       14      9       1       1       -       -       1
L      
45      7       2       14      65      5       6       2       61      1       7       42      3       4       14      2       -       2       22      27      13      3       2       -       -       3
M      
40      6       1       8       50      4       4       3       44      2       3       4       23      3       15      7       -       2       10      8       14      4       3       -       -       2
N      
68      23      5       187     122     19      94      17      65      5       25      10      23      43      18      10      -       10      74      59      33      18      29      -       -       25
O      
3       8       15      7       25      6       5       9       1       1       3       31      17      64      1       6       -       50      19      9       3       3       7       -       1       6
P      
16      -       -       3       10      6       -       2       4       -       -       4       -       -       11      5       -       23      1       3       4       -       -       -       -       -
Q      
-       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       2       -       -       -       -       -
R      
80      25      9       67      112     18      27      19      52      4       23      18      20      31      30      9       -       15      54      49      48      12      17      -       -       14
S      
36      10      89      20      99      7       13      9       65      2       11      9       12      7       28      22      -       8       76      116     15      9       10      -       2       7
T      
57      8       1       35      185     5       10      14      59      2       4       11      9       9       15      3       -       31      50      23      26      8       21      -       1       26
U      
3       8       16      5       78      27      8       4       2       -       3       7       21      119     -       5       -       33      48      23      1       3       2       -       -       1
V      
3       -       -       -       37      -       -       -       9       -       -       -       -       -       43      -       -       -       -       -       -       -       -       -       -       -
W      
34      -       -       -       48      -       -       -       36      1       -       -       -       1       17      -       -       -       1       -       9       -       -       -       -       -
X      
-       -       -       -       -       -       -       -       1       -       -       -       -       -       1       -       -       -       -       1       -       -       -       -       -       -
Y      
-       -       -       -       1       -       -       -       -       -       -       1       1       -       -       -       -       -       1       -       -       -       -       -       -       -
Z      
4       1       -       1       28      -       1       -       11      -       1       2       1       -       2       -       -       -       1       7       43      1       9       -       -       1
End file
bigramm = [[8,31,27,11,64,15,30,20,5,1,7,59,28,102,0,4,0,51,53,46,75,2,3,0,1,2],\
[16,1,0,1,101,0,3,1,12,0,1,9,0,1,8,0,0,9,6,4,14,0,1,0,1,1],\
[2,0,0,2,1,0,0,242,1,0,14,1,0,0,2,0,0,0,1,0,0,0,0,0,0,0],\
[54,3,1,13,227,3,4,2,93,1,3,5,4,6,9,3,0,10,11,6,16,3,4,0,0,3],\
[26,45,25,51,23,26,50,57,193,3,19,63,55,400,6,13,1,409,140,55,36,14,23,2,1,11],\
[19,2,0,9,25,12,3,1,7,0,1,5,1,2,9,1,0,18,4,20,24,1,1,0,0,1],\
[20,3,0,12,147,2,3,3,19,1,3,9,3,5,6,1,0,14,18,18,11,4,3,0,0,3],\
[70,4,1,14,102,2,4,3,23,1,3,25,11,19,18,1,0,37,11,47,11,4,9,0,0,3],\
[7,7,76,20,163,5,38,12,1,1,12,25,27,168,20,2,0,17,79,78,3,5,1,0,0,5],\
[7,0,0,0,9,5,0,0,0,0,0,0,0,0,2,0,0,0,0,0,5,0,0,0,0,0],\
[28,1,0,2,26,1,1,1,7,0,1,10,1,1,24,1,0,13,5,14,9,1,1,0,0,1],\
[45,7,2,14,65,5,6,2,61,1,7,42,3,4,14,2,0,2,22,27,13,3,2,0,0,3],\
[40,6,1,8,50,4,4,3,44,2,3,4,23,3,15,7,0,2,10,8,14,4,3,0,0,2],\
[68,23,5,187,122,19,94,17,65,5,25,10,23,43,18,10,0,10,74,59,33,18,29,0,0,25],\
[3,8,15,7,25,6,5,9,1,1,3,31,17,64,1,6,0,50,19,9,3,3,7,0,1,6],\
[16,0,0,3,10,6,0,2,4,0,0,4,0,0,11,5,0,23,1,3,4,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0],\
[80,25,9,67,112,18,27,19,52,4,23,18,20,31,30,9,0,15,54,49,48,12,17,0,0,14],\
[36,10,89,20,99,7,13,9,65,2,11,9,12,7,28,22,0,8,76,116,15,9,10,0,2,7],\
[57,8,1,35,185,5,10,14,59,2,4,11,9,9,15,3,0,31,50,23,26,8,21,0,1,26],\
[3,8,16,5,78,27,8,4,2,0,3,7,21,119,0,5,0,33,48,23,1,3,2,0,0,1],\
[3,0,0,0,37,0,0,0,9,0,0,0,0,0,43,0,0,0,0,0,0,0,0,0,0,0],\
[34,0,0,0,48,0,0,0,36,1,0,0,0,1,17,0,0,0,1,0,9,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0],\
[0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0],\
[4,1,0,1,28,0,1,0,11,0,1,2,1,0,2,0,0,0,1,7,43,1,9,0,0,1]]

View Diff

1,27c1,26
<       A       B       C       D       E       F       G       H       I       J       K       L       M       N       O       P       Q       R       S       T       U       V       W       X       Y       Z
< A     8       31      27      11      64      15      30      20      5       1       7       59      28      102     -       4       -       51      53      46      75      2       3       -       1       2
< B     16      1       -       1       101     -       3       1       12      -       1       9       -       1       8       -       -       9       6       4       14      -       1       -       1       1
< C     2       -       -       2       1       -       -       242     1       -       14      1       -       -       2       -       -       -       1       -       -       -       -       -       -       -
< D     54      3       1       13      227     3       4       2       93      1       3       5       4       6       9       3       -       10      11      6       16      3       4       -       -       3
< E     26      45      25      51      23      26      50      57      193     3       19      63      55      400     6       13      1       409     140     55      36      14      23      2       1       11
< F     19      2       -       9       25      12      3       1       7       -       1       5       1       2       9       1       -       18      4       20      24      1       1       -       -       1
< G     20      3       -       12      147     2       3       3       19      1       3       9       3       5       6       1       -       14      18      18      11      4       3       -       -       3
< H     70      4       1       14      102     2       4       3       23      1       3       25      11      19      18      1       -       37      11      47      11      4       9       -       -       3
< I     7       7       76      20      163     5       38      12      1       1       12      25      27      168     20      2       -       17      79      78      3       5       1       -       -       5
< J     7       -       -       -       9       5       -       -       -       -       -       -       -       -       2       -       -       -       -       -       5       -       -       -       -       -
< K     28      1       -       2       26      1       1       1       7       -       1       10      1       1       24      1       -       13      5       14      9       1       1       -       -       1
< L     45      7       2       14      65      5       6       2       61      1       7       42      3       4       14      2       -       2       22      27      13      3       2       -       -       3
< M     40      6       1       8       50      4       4       3       44      2       3       4       23      3       15      7       -       2       10      8       14      4       3       -       -       2
< N     68      23      5       187     122     19      94      17      65      5       25      10      23      43      18      10      -       10      74      59      33      18      29      -       -       25
< O     3       8       15      7       25      6       5       9       1       1       3       31      17      64      1       6       -       50      19      9       3       3       7       -       1       6
< P     16      -       -       3       10      6       -       2       4       -       -       4       -       -       11      5       -       23      1       3       4       -       -       -       -       -
< Q     -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       2       -       -       -       -       -
< R     80      25      9       67      112     18      27      19      52      4       23      18      20      31      30      9       -       15      54      49      48      12      17      -       -       14
< S     36      10      89      20      99      7       13      9       65      2       11      9       12      7       28      22      -       8       76      116     15      9       10      -       2       7
< T     57      8       1       35      185     5       10      14      59      2       4       11      9       9       15      3       -       31      50      23      26      8       21      -       1       26
< U     3       8       16      5       78      27      8       4       2       -       3       7       21      119     -       5       -       33      48      23      1       3       2       -       -       1
< V     3       -       -       -       37      -       -       -       9       -       -       -       -       -       43      -       -       -       -       -       -       -       -       -       -       -
< W     34      -       -       -       48      -       -       -       36      1       -       -       -       1       17      -       -       -       1       -       9       -       -       -       -       -
< X     -       -       -       -       -       -       -       -       1       -       -       -       -       -       1       -       -       -       -       1       -       -       -       -       -       -
< Y     -       -       -       -       1       -       -       -       -       -       -       1       1       -       -       -       -       -       1       -       -       -       -       -       -       -
< Z     4       1       -       1       28      -       1       -       11      -       1       2       1       -       2       -       -       -       1       7       43      1       9       -       -       1
---
> bigramm = [[8,31,27,11,64,15,30,20,5,1,7,59,28,102,0,4,0,51,53,46,75,2,3,0,1,2],\
> [16,1,0,1,101,0,3,1,12,0,1,9,0,1,8,0,0,9,6,4,14,0,1,0,1,1],\
> [2,0,0,2,1,0,0,242,1,0,14,1,0,0,2,0,0,0,1,0,0,0,0,0,0,0],\
> [54,3,1,13,227,3,4,2,93,1,3,5,4,6,9,3,0,10,11,6,16,3,4,0,0,3],\
> [26,45,25,51,23,26,50,57,193,3,19,63,55,400,6,13,1,409,140,55,36,14,23,2,1,11],\
> [19,2,0,9,25,12,3,1,7,0,1,5,1,2,9,1,0,18,4,20,24,1,1,0,0,1],\
> [20,3,0,12,147,2,3,3,19,1,3,9,3,5,6,1,0,14,18,18,11,4,3,0,0,3],\
> [70,4,1,14,102,2,4,3,23,1,3,25,11,19,18,1,0,37,11,47,11,4,9,0,0,3],\
> [7,7,76,20,163,5,38,12,1,1,12,25,27,168,20,2,0,17,79,78,3,5,1,0,0,5],\
> [7,0,0,0,9,5,0,0,0,0,0,0,0,0,2,0,0,0,0,0,5,0,0,0,0,0],\
> [28,1,0,2,26,1,1,1,7,0,1,10,1,1,24,1,0,13,5,14,9,1,1,0,0,1],\
> [45,7,2,14,65,5,6,2,61,1,7,42,3,4,14,2,0,2,22,27,13,3,2,0,0,3],\
> [40,6,1,8,50,4,4,3,44,2,3,4,23,3,15,7,0,2,10,8,14,4,3,0,0,2],\
> [68,23,5,187,122,19,94,17,65,5,25,10,23,43,18,10,0,10,74,59,33,18,29,0,0,25],\
> [3,8,15,7,25,6,5,9,1,1,3,31,17,64,1,6,0,50,19,9,3,3,7,0,1,6],\
> [16,0,0,3,10,6,0,2,4,0,0,4,0,0,11,5,0,23,1,3,4,0,0,0,0,0],\
> [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0],\
> [80,25,9,67,112,18,27,19,52,4,23,18,20,31,30,9,0,15,54,49,48,12,17,0,0,14],\
> [36,10,89,20,99,7,13,9,65,2,11,9,12,7,28,22,0,8,76,116,15,9,10,0,2,7],\
> [57,8,1,35,185,5,10,14,59,2,4,11,9,9,15,3,0,31,50,23,26,8,21,0,1,26],\
> [3,8,16,5,78,27,8,4,2,0,3,7,21,119,0,5,0,33,48,23,1,3,2,0,0,1],\
> [3,0,0,0,37,0,0,0,9,0,0,0,0,0,43,0,0,0,0,0,0,0,0,0,0,0],\
> [34,0,0,0,48,0,0,0,36,1,0,0,0,1,17,0,0,0,1,0,9,0,0,0,0,0],\
> [0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0],\
> [0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0],\
> [4,1,0,1,28,0,1,0,11,0,1,2,1,0,2,0,0,0,1,7,43,1,9,0,0,1]]

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 178 remaining solutions by signing in and submitting your own entry
#179 vimmac / @vimmac13823 - Score: 1697 - 06/15/23 @ 10:23
<Esc>dGibigramm = [[8,31,27,11,64,15,30,20,5,1,7,59,28,102,0,4,0,51,53,46,75,2,3,0,1,2],\<CR>[16,1,0,1,101,0,3,1,12,0,1,9,0,1,8,0,0,9,6,4,14,0,1,0,1,1],\<CR>[2,0,0,2,1,0,0,242,1,0,14,1,0,0,2,0,0,0,1,0,0,0,0,0,0,0],\<CR>[54,3,1,13,227,3,4,2,93,1,3,5,4,6,9,3,0,10,11,6,16,3,4,0,0,3],\<CR>[26,45,25,51,23,26,50,57,193,3,19,63,55,400,6,13,1,409,140,55,36,14,23,2,1,11],\<CR>[19,2,0,9,25,12,3,1,7,0,1,5,1,2,9,1,0,18,4,20,24,1,1,0,0,1],\<CR>[20,3,0,12,147,2,3,3,19,1,3,9,3,5,6,1,0,14,18,18,11,4,3,0,0,3],\<CR>[70,4,1,14,102,2,4,3,23,1,3,25,11,19,18,1,0,37,11,47,11,4,9,0,0,3],\<CR>[7,7,76,20,163,5,38,12,1,1,12,25,27,168,20,2,0,17,79,78,3,5,1,0,0,5],\<CR>[7,0,0,0,9,5,0,0,0,0,0,0,0,0,2,0,0,0,0,0,5,0,0,0,0,0],\<CR>[28,1,0,2,26,1,1,1,7,0,1,10,1,1,24,1,0,13,5,14,9,1,1,0,0,1],\<CR>[45,7,2,14,65,5,6,2,61,1,7,42,3,4,14,2,0,2,22,27,13,3,2,0,0,3],\<CR>[40,6,1,8,50,4,4,3,44,2,3,4,23,3,15,7,0,2,10,8,14,4,3,0,0,2],\<CR>[68,23,5,187,122,19,94,17,65,5,25,10,23,43,18,10,0,10,74,59,33,18,29,0,0,25],\<CR>[3,8,15,7,25,6,5,9,1,1,3,31,17,64,1,6,0,50,19,9,3,3,7,0,1,6],\<CR>[16,0,0,3,10,6,0,2,4,0,0,4,0,0,11,5,0,23,1,3,4,0,0,0,0,0],\<CR>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0],\<CR>[80,25,9,67,112,18,27,19,52,4,23,18,20,31,30,9,0,15,54,49,48,12,17,0,0,14],\<CR>[36,10,89,20,99,7,13,9,65,2,11,9,12,7,28,22,0,8,76,116,15,9,10,0,2,7],\<CR>[57,8,1,35,185,5,10,14,59,2,4,11,9,9,15,3,0,31,50,23,26,8,21,0,1,26],\<CR>[3,8,16,5,78,27,8,4,2,0,3,7,21,119,0,5,0,33,48,23,1,3,2,0,0,1],\<CR>[3,0,0,0,37,0,0,0,9,0,0,0,0,0,43,0,0,0,0,0,0,0,0,0,0,0],\<CR>[34,0,0,0,48,0,0,0,36,1,0,0,0,1,17,0,0,0,1,0,9,0,0,0,0,0],\<CR>[0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0],\<CR>[0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0],\<CR>[4,1,0,1,28,0,1,0,11,0,1,2,1,0,2,0,0,0,1,7,43,1,9,0,0,1]]<Esc>ZZ

0 comments


Created by: @aigledesalpes

179 active golfers, 735 entries

Leaderboard (lowest score wins):
50
#1 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

09/16/2023 at 09:04AM

50
#2 - John Braxler / @braxler

09/19/2023 at 11:22PM

50
#3 - Alex Pepper / @AlexPepper1457

10/29/2023 at 04:11AM

50
#4 - evgenii-kokorin / @evgenii-kokorin

02/20/2024 at 06:25PM

50
#5 - Aly Thobani / @alythobani

04/04/2024 at 12:58AM

50
#6 - nerfed / @nerfed

06/05/2024 at 07:32PM

50
#7 - Peppa Pig / @PeppaPigSg

07/02/2024 at 03:28AM

50
#8 - nickGPT / @nickandbro

08/26/2024 at 07:53PM

50
#9 - got_windy / @insomnight

12/02/2024 at 12:21AM

51
#10 - 蛙爹 / @Joe53572723

02/11/2023 at 07:40AM

51
#11 - Irakli Chigvaria / @tchigvaria

02/16/2023 at 01:01PM

51
#12 - bignos / @bignos2

03/18/2023 at 11:26PM

51
#13 - わーお / @lwgZVRoOQ8Nf6VG

06/04/2023 at 09:54AM

51
#14 - Tanzeel Kazi / @tanzeelkazi

06/20/2023 at 07:41PM

51
#15 - Luoyb / @Luoyb

10/19/2023 at 05:51AM

51
#16 - tien / @tien40766111

10/26/2023 at 03:11PM

51
#17 - Vimgolf User / @VimgolfU

11/03/2023 at 09:48AM

52
#18 - Jean George / @JeanGeo20504212

11/07/2022 at 01:21PM

52
#19 - Austin Willliams / @GuitarMusash616

11/12/2022 at 11:29AM

52
#20 - Ekalos / @_Ekalos

11/20/2022 at 10:19AM

52
#21 - Álan Crístoffer / @acristoffers

11/27/2022 at 05:58PM

52
#22 - Dmitry Antonyuk / @dantonuke

12/19/2022 at 06:16AM

52
#23 - fraktal / @FraktalRebirth

01/20/2023 at 01:33AM

52
#24 - Alex Lewin / @_AlexLewin

02/17/2023 at 05:44AM

52
#25 - RosaTryp / @RosaTryp

03/16/2023 at 05:04PM

52
#26 - 悟史 / @A1OBJTxN5fTg5EJ

12/01/2023 at 04:16PM

52
#27 - Remus Dalrymple / @bornintheflames

12/11/2023 at 08:08AM

52
#28 - Qing Liu / @poeminlash

12/18/2023 at 04:38AM

52
#29 - Lennart / @lennartack

04/16/2024 at 06:36PM

53
#30 - Jon Krause / @jkrause314

11/07/2022 at 05:11AM