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

Quicksort

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

Start file
21 8 144 3 89 5 13 34 55 2


............................................................................
9G3W"fyEW"kyEW"qyE@f w@n8Gyfj}jj$p@rkp@r@0@o"qp$hyfg$p0"qy$fj}jj$p@rkp@r@0pG
f 0y$"_dd 6Gyw@o"kp"0p0"ky$"my$dd "lyy"lp0d$ @mby2eG2@o"0p yiw@o"0p $hyfg$p$
@n6Gtoy2l}++$p@r@0{+ }jj$p@rkp@r@0@o"qp$hyfg$p0"qy$fj}"jyEW"ayEW"byE+"syEW"x
@jV"ep "eyiw@nGG8Gyfj}jj$p@rk@0{ }-"xyiw*``{ndiw{w"eyiw{dG@mlviw"xP@mhdiw"eP
@c@d@d@aww@a@b @m@s@h @o"mp$xx0"my$dd @o"qp@r@0@o"qp$hyfg$p0"qy$dd@f gg @i@g
6Gw"ryEW"iyEW"oyEW"cyEW"nyE+"dyE+l"jyEW"ayEW"byE+"syEW"gyEW"hyE5Gy$@0 oyEWgg
End file
2 3 5 8 13 21 34 55 89 144


............................................................................
9G3W"fyEW"kyEW"qyE@f w@n8Gyfj}jj$p@rkp@r@0@o"qp$hyfg$p0"qy$fj}jj$p@rkp@r@0pG
f 0y$"_dd 6Gyw@o"kp"0p0"ky$"my$dd "lyy"lp0d$ @mby2eG2@o"0p yiw@o"0p $hyfg$p$
@n6Gtoy2l}++$p@r@0{+ }jj$p@rkp@r@0@o"qp$hyfg$p0"qy$fj}"jyEW"ayEW"byE+"syEW"x
@jV"ep "eyiw@nGG8Gyfj}jj$p@rk@0{ }-"xyiw*``{ndiw{w"eyiw{dG@mlviw"xP@mhdiw"eP
@c@d@d@aww@a@b @m@s@h @o"mp$xx0"my$dd @o"qp@r@0@o"qp$hyfg$p0"qy$dd@f gg @i@g
6Gw"ryEW"iyEW"oyEW"cyEW"nyE+"dyE+l"jyEW"ayEW"byE+"syEW"gyEW"hyE5Gy$@0 oyEWgg

View Diff

1c1
< 21 8 144 3 89 5 13 34 55 2
---
> 2 3 5 8 13 21 34 55 89 144

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 360 remaining solutions by signing in and submitting your own entry
#361 윤지환 / @doilche - Score: 329 - 03/22/24 @ 11:31
V:s.<BS>/\s/\n/g<CR>u<CR>kjkV:s/\s/\\n<CR>uV:d<BS>s/\s/\\\\n<CR>uV:s/\s/\m<BS>n<BS>\n/g<CR>u<CR><Up>:<BS><BS>V:s/\s/\r<CR>uV:s/\s\<BS>/\r/g<CR>kkkkkkkkkkkkkkkkkkvjjjjjjjjjkjl:sort<CR>uvjjjjjjjjjl:sort n<CR>vjjjjjjjjjjjjjkkkklll:sort<BS><BS><BS><BS>s/rn<BS><BS>\r.<BS>/\s/g<CR>u<C-R>vjjjjjjjjjlllll:s/\r/\s/g<CR>vmkjjjjjjjjjj:s/\r/\s/g<CR>vjjjjjjjjjjjk:s/\n/\s/g<CR>ujjjjjjjjji<BS> <Left><Left><Left><BS> <Left><Left><Left><BS> <Left><Left><Left><BS> <Left><Left><Left><BS> <Left><Left><Left><BS> <Left><Left><BS> <Left><Left><BS> <Left><Left><BS> <Esc>:<BS>ZZ

0 comments


Created by: @normalmo_de

361 active golfers, 1626 entries

Leaderboard (lowest score wins):
6
#91 - Mike Rayner / @mikesfake

03/09/2024 at 12:44PM

6
#92 - ttl0 / @ttl0

03/10/2024 at 03:06PM

6
#93 - Jinli Xiao / @jinlixiao

03/10/2024 at 05:31PM

6
#94 - Jonathan Bowman / @bowmanjd

03/11/2024 at 09:33AM

6
#95 - Chino / @MarcoMeinardi

03/15/2024 at 12:50PM

6
#96 - Páll Pálsson / @DrLlap

03/24/2024 at 06:03PM

6
#97 - Aristotelis Dossas / @teldosas

03/25/2024 at 02:41PM

6
#98 - St8Razor / @St8Razor

03/26/2024 at 06:28PM

6
#99 - Xianhao Yu / @YXHXianYu

03/27/2024 at 08:20AM

6
#100 - AzurIce / @AzurIce

03/27/2024 at 08:21AM

6
#101 - sabt5050 / @sabt5050

03/29/2024 at 04:23AM

6
#102 - Kanmuruuruu / @Kanmuruuruu

03/30/2024 at 10:45PM

6
#103 - Jonas Hahn / @Ascyii

04/01/2024 at 09:31AM

6
#104 - rayx / @ray-x

04/05/2024 at 03:02AM

6
#105 - schrjako / @schrjako

04/05/2024 at 04:15PM

6
#106 - Jonathan El-Khoury / @jonoelk

04/11/2024 at 07:59AM

6
#107 - kramff / @kramff

04/13/2024 at 02:32AM

6
#108 - Alex Yu / @sxyu

04/13/2024 at 07:35PM

6
#109 - Christopher Lane / @Makaze

04/20/2024 at 04:32PM

6
#110 - Jamie / @jamiegibneyuk

04/30/2024 at 12:18PM

6
#111 - 刘宏亮 / @AkeyCoy

05/02/2024 at 03:53PM

6
#112 - wpr__ / @wpr____

05/08/2024 at 12:36AM

7
#113 - Aiden Yang / @yangxnn

12/15/2023 at 07:36AM

7
#114 - Noah Moss / @noahmoss

12/20/2023 at 02:58AM

7
#115 - hatena / @rotwm

12/23/2023 at 08:58PM

7
#116 - Romunkulus / @Romunkulus

01/04/2024 at 12:25AM

7
#117 - Milan Blažek / @Somin13

01/04/2024 at 02:41PM

7
#118 - A White Dwarf / @AWhiteDwarf1

01/08/2024 at 07:38PM

7
#119 - 3akur6 / @3akur6

01/23/2024 at 06:56AM

7
#120 - ilyas / @Ahaaah2071

01/24/2024 at 12:32PM