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 24 remaining solutions by signing in and submitting your own entry
#25 EthanMcGuire / @EthanMcGuire - Score: 303 - 01/11/25 @ 15:06
vG:sort<CR>i[0] q<BS><Esc>qaj0qkvllldPqaj0Pq@a.u11@agglli1h<Esc>uh<C-V>jjjjjjjjjjjjjI0 <Esc>u<C-V>jjjjjjjjjjjjjg<C-A>ggvG:sort<CR>uddjjjjjjjjjjjjp/Gard<CR>ddjjjjjjp/Pid<CR>ddjp/GarC<BS>c<CR>ddjjjjp/Drag<CR>ddjjjjjpggddjjjjjjp/Luc<CR>ddjjp/G<BS>Hy<CR>ddjjp/Fer<CR>ddjjjkpjkkkddjkpjkkddkkpggl<C-V>jjjjjjjjjjjjjI0<Esc>jxjxjxjjjjjjjxjxjjjjdGddpggpjpjpjpjpjpjpjpjpjpjpjpjp:wq<CR>

0 comments


Created by: @maharba6

25 active golfers, 93 entries

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

12/29/2024 at 02:14PM

36
#2 - Peppa Pig / @PeppaPigSg

12/30/2024 at 04:26AM

36
#3 - Smylers / @Smylers2

01/09/2025 at 11:58AM

37
#4 - Daniel Fleischman / @danielf

01/22/2025 at 07:24AM

40
#5 - ProGamerYeet / @ProGamerYeet

12/26/2024 at 05:33PM

40
#6 - dejam2007 / @dejam2007

12/28/2024 at 12:38PM

40
#7 - MartnRamtin / @MartnRamtin

12/29/2024 at 08:02PM

46
#8 - marhaba / @maharba6

01/14/2025 at 09:42PM

48
#9 - Alexinho67 / @Alexinho67

01/14/2025 at 11:06AM

48
#10 - Victor Pfautz / @vpfautz

01/23/2025 at 04:26PM

51
#11 - Heitor Dantas / @heitordnts

01/04/2025 at 07:47PM

59
#12 - Herschel / @herschel-ma

12/28/2024 at 10:01AM

59
#13 - Frédéric Heulin / @talineo

01/03/2025 at 08:50PM

59
#14 - MatFriend / @MatFriend

01/17/2025 at 04:57AM

60
#15 - martinorav / @martinorav

01/14/2025 at 04:53PM

77
#16 - Ming Wen / @OpenSubmarine-X

01/06/2025 at 10:56AM

79
#17 - ashfinal / @ashfinal

01/16/2025 at 03:41AM

82
#18 - Ji Jinnuo / @Bthxtly

01/02/2025 at 12:40PM

83
#19 - Chino / @MarcoMeinardi

01/12/2025 at 09:32AM

85
#20 - Pstock7 / @Pstock7

01/24/2025 at 06:04AM

92
#21 - Colin Benner / @yzhs

01/11/2025 at 07:29PM

105
#22 - yhgolf / @yhgolf1

01/11/2025 at 06:54PM

109
#23 - horc_zzz / @Horc-zh

01/01/2025 at 08:03AM

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

01/13/2025 at 11:35PM

303
#25 - EthanMcGuire / @EthanMcGuire

01/11/2025 at 03:06PM