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 88 remaining solutions by signing in and submitting your own entry
#89 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

89 active golfers, 409 entries

Leaderboard (lowest score wins):
105
#61 - yhgolf / @yhgolf1

01/11/2025 at 06:54PM

106
#62 - bcollins19 / @bcollins19

04/01/2025 at 10:37PM

106
#63 - Leonardo Dipilato / @LeonardoDipilato

06/03/2025 at 02:34PM

109
#64 - horc_zzz / @Horc-zh

01/01/2025 at 08:03AM

113
#65 - e.cousinet / @ecousinet

02/15/2025 at 10:45AM

115
#66 - Kevin Jung / @WizardRubic

01/30/2025 at 10:07PM

116
#67 - TurtleMeds / @TurtleMeds

04/23/2025 at 06:08PM

119
#68 - Gibson Starkweather / @boaf

05/24/2025 at 09:16PM

119
#69 - Frank Benoit / @frankb_stgt

05/25/2025 at 07:46AM

124
#70 - Andrey Rakhubovsky / @omnster

05/02/2025 at 09:47PM

124
#71 - Matthew Cooper / @mkcmkc

06/02/2025 at 11:57PM

125
#72 - enaygit / @enaygit

02/15/2025 at 04:22AM

125
#73 - Martin Knoller Stocker / @linuxswords

05/29/2025 at 01:36PM

126
#74 - Rian Butala / @ButalaRian13792

05/02/2025 at 11:39PM

128
#75 - Oliver Green / @olijg

03/14/2025 at 03:10PM

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

01/13/2025 at 11:35PM

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

04/27/2025 at 05:53AM

132
#78 - HADIOUCHE Azouaou / @Thoro-las

03/28/2025 at 11:57PM

132
#79 - Norgus / @Norgus

05/21/2025 at 04:55PM

138
#80 - Thomas Hargreaves / @waingro

02/21/2025 at 09:31AM

138
#81 - Maxime Delhaye / @friphazeph

03/26/2025 at 05:16PM

139
#82 - tsui0 / @tsui0

06/19/2025 at 01:07AM

156
#83 - phaym / @phaym

05/11/2025 at 12:17AM

158
#84 - NoahVickerson / @NoahVickerson

05/25/2025 at 02:01AM

202
#85 - mschmid03 / @mschmid03

02/06/2025 at 11:02AM

225
#86 - Lex / @lextatic

02/06/2025 at 01:00AM

303
#87 - EthanMcGuire / @EthanMcGuire

01/11/2025 at 03:06PM

404
#88 - sehoon900811 / @sehoon900811

03/21/2025 at 03:15PM

452
#89 - xjerrod / @xjerrod

01/30/2025 at 12:50AM