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

Sort and Tag

The goal is to sort these lines alphabetically, assign a unique identifier to each line in the format "[01]", "[02]", etc., and then restore the original order of the lines while preserving the assigned identifiers.

Start file
Charmander
____________________
Sprigatito
____________________
Meowscarada
____________________
Pikachu
____________________
Feraligatr
____________________
Hydreigon
____________________
Lucario
____________________
Blaziken
____________________
Dragonite
____________________
Garchomp
____________________
Pidgeot
____________________
Squirtle
____________________
Gardevoir
____________________
Alakazam
____________________
End file
[03] Charmander
____________________
[13] Sprigatito
____________________
[10] Meowscarada
____________________
[12] Pikachu
____________________
[05] Feraligatr
____________________
[08] Hydreigon
____________________
[09] Lucario
____________________
[02] Blaziken
____________________
[04] Dragonite
____________________
[06] Garchomp
____________________
[11] Pidgeot
____________________
[14] Squirtle
____________________
[07] Gardevoir
____________________
[01] Alakazam
____________________

View Diff

1c1
< Charmander
---
> [03] Charmander
3c3
< Sprigatito
---
> [13] Sprigatito
5c5
< Meowscarada
---
> [10] Meowscarada
7c7
< Pikachu
---
> [12] Pikachu
9c9
< Feraligatr
---
> [05] Feraligatr
11c11
< Hydreigon
---
> [08] Hydreigon
13c13
< Lucario
---
> [09] Lucario
15c15
< Blaziken
---
> [02] Blaziken
17c17
< Dragonite
---
> [04] Dragonite
19c19
< Garchomp
---
> [06] Garchomp
21c21
< Pidgeot
---
> [11] Pidgeot
23c23
< Squirtle
---
> [14] Squirtle
25c25
< Gardevoir
---
> [07] Gardevoir
27c27
< Alakazam
---
> [01] Alakazam

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 60 remaining solutions by signing in and submitting your own entry
#61 xjerrod / @xjerrod - Score: 452 - 01/30/25 @ 00:50
:set rnu<CR>26jd2$ggP16jd2$14kP16jd2$12kP8jd2$6kP12jd2$10kP16jd2$13kP8k16jd2$6kP8jd2$6kP4m<BS>jjjjd2$2kP6k12jd2$3kkP4k8jd2$kkP3j1js2$<BS><BS>S<Esc>d2$kPuuggi[] <Left><Left>0<Esc>jjh..uuip<BS>[0[<BS><BS><BS>[0] <Esc>jjhhhpu.uu[0i[0] <Esc>jjhhh.ou<BS><Esc>ud<BS>u2j0.u2j1j2k0i[0] <Esc>2j0.2j0.2j0.2j0.2j0.2j0.2j0.2j0.2j0.2j0.hggkkkll1i1J<BS><NL><Esc>ui1<Esc>jji2<Esc>jji3<Esc>jji3<BS>4i<BS><Esc>jji5<Down><Down><Left>6<Down><Down><Left>7<Down><Down><Left>8<Down><Left><Down>9<Down><Down><Left><BS>10<Down><Left><Down><Left><Right><BS>11<Down><Left><Down><Left><Right><BS>12<Down><Left><Down><BS>13<Down><Left><Down><BS>15<BS>4<Esc>ggd2$Gpggd2$jjP20jd2$<Esc>21kp16jd2$15kp18k22jd2$16kP6jd2$5kp10jd2$9kp10jd2$9kp10jd2$3kppu4jd2$3kp:wq<CR>

0 comments


Created by: @maharba6

61 active golfers, 239 entries

Leaderboard (lowest score wins):
77
#31 - Ming Wen / @OpenSubmarine-X

01/06/2025 at 10:56AM

79
#32 - ashfinal / @ashfinal

01/16/2025 at 03:41AM

82
#33 - Ji Jinnuo / @Bthxtly

01/02/2025 at 12:40PM

83
#34 - Chino / @MarcoMeinardi

01/12/2025 at 09:32AM

85
#35 - thierryharte / @thierryharte

04/18/2025 at 09:14PM

86
#36 - Sebastian Caicedo / @jsebdev

03/29/2025 at 11:18PM

87
#37 - Hugh Davenport / @hughdavenport

02/26/2025 at 12:10AM

91
#38 - Seva163 / @Seva163

04/06/2025 at 11:26AM

92
#39 - Colin Benner / @yzhs

01/11/2025 at 07:29PM

93
#40 - Daisuke Shimada / @cimadai

02/20/2025 at 12:03AM

94
#41 - Theo Lincke / @lincketheo

04/07/2025 at 11:44PM

99
#42 - Dmitrii / @tdragon

04/14/2025 at 07:22PM

102
#43 - vombat203 / @vombat203

02/06/2025 at 08:53AM

105
#44 - yhgolf / @yhgolf1

01/11/2025 at 06:54PM

106
#45 - bcollins19 / @bcollins19

04/01/2025 at 10:37PM

109
#46 - horc_zzz / @Horc-zh

01/01/2025 at 08:03AM

113
#47 - e.cousinet / @ecousinet

02/15/2025 at 10:45AM

115
#48 - Kevin Jung / @WizardRubic

01/30/2025 at 10:07PM

116
#49 - TurtleMeds / @TurtleMeds

04/23/2025 at 06:08PM

125
#50 - enaygit / @enaygit

02/15/2025 at 04:22AM

128
#51 - Oliver Green / @olijg

03/14/2025 at 03:10PM

129
#52 - act-1F98A / @act-1F98A

01/13/2025 at 11:35PM

131
#53 - ak@developer / @Ajay-056

04/27/2025 at 05:53AM

132
#54 - HADIOUCHE Azouaou / @Thoro-las

03/28/2025 at 11:57PM

138
#55 - Thomas Hargreaves / @waingro

02/21/2025 at 09:31AM

138
#56 - Maxime Delhaye / @friphazeph

03/26/2025 at 05:16PM

202
#57 - mschmid03 / @mschmid03

02/06/2025 at 11:02AM

225
#58 - Lex / @lextatic

02/06/2025 at 01:00AM

303
#59 - EthanMcGuire / @EthanMcGuire

01/11/2025 at 03:06PM

404
#60 - sehoon900811 / @sehoon900811

03/21/2025 at 03:15PM