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 5f0890dbb409320009a38274

Multiline to Single Line

Convert a multiline, indented file to a single line with no whitespace

Start file
api(
    'com.vimgolf.challenge'
)
End file
api('com.vimgolf.challenge')

View Diff

1,3c1
< api(
<     'com.vimgolf.challenge'
< )
---
> api('com.vimgolf.challenge')

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 151 remaining solutions by signing in and submitting your own entry
#152 HamzaOPLEX / @HamzaOplex - Score: 100 - 05/12/21 @ 22:43
:<C-B><C-V><C-V><BS><50-53>:%s/\%>'(\s*\%<')// | :%s/\%>'(\n\%<')//<Esc>[201~<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><CR>:q<CR>:wq<CR>

0 comments


Created by: @IsaacPZZ

152 active golfers, 321 entries

Leaderboard (lowest score wins):
5
#61 - Steve Frost / @FrostSteveFrost

08/03/2020 at 01:32AM

5
#62 - Filipe Brandenburger / @filbranden

08/03/2020 at 04:34PM

5
#63 - ぼとぼと / @boto_voto

08/05/2020 at 12:35PM

5
#64 - Du Phan / @fehiepsi

08/08/2020 at 08:16PM

5
#65 - David Martínez / @g0ddrinksjava

08/09/2020 at 08:10PM

5
#66 - Martin Bielik / @mabielik

08/09/2020 at 08:23PM

5
#67 - notadevCollins / @NotadevC

08/11/2020 at 01:15AM

5
#68 - Vinay Sharma / @VinaySh63956554

08/11/2020 at 07:14AM

5
#69 - mindgitrwx / @mindgitrwx

08/11/2020 at 10:44AM

5
#70 - kgarlow_vim / @KgarlowV

08/12/2020 at 11:01PM

5
#71 - Sergio / @SergioVl12

08/17/2020 at 06:18AM

5
#72 - Tanzeel Kazi / @tanzeelkazi

08/21/2020 at 06:20AM

5
#73 - fenn.stefan@gmail.com / @FennStefan

08/25/2020 at 08:14PM

5
#74 - speisz / @speiszc

08/28/2020 at 09:18PM

5
#75 - Kaustubh Murumkar / @k_austub_h

08/30/2020 at 01:54PM

5
#76 - Skyler Dong / @skylerdong

09/03/2020 at 12:15PM

5
#77 - Christ / @Christ46234422

09/09/2020 at 12:47AM

5
#78 - Anton Kriese / @KrieseAnton

09/10/2020 at 08:22PM

5
#79 - akouryy / @akouryy1

09/22/2020 at 08:44AM

5
#80 - Yasky / @Yaasky

09/25/2020 at 03:45PM

5
#81 - ZackBurtAWS / @ZackBurtSDE

09/25/2020 at 03:45PM

5
#82 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 12:17PM

5
#83 - Ashe Braum / @ashe_braum

10/01/2020 at 05:05PM

5
#84 - Jan Liu / @Jagsomarjan

10/04/2020 at 02:00PM

5
#85 - Ivan Kwong / @IvanKwong5

10/06/2020 at 12:51PM

5
#86 - lamtt77 / @lamtt77

10/10/2020 at 11:13AM

5
#87 - RaylanFox / @RaylanFox

10/10/2020 at 07:19PM

5
#88 - Mickaël Menu / @mickaelmenu

10/25/2020 at 04:02PM

5
#89 - Lucas Nussbaum / @LucasNussbaum

11/02/2020 at 02:36PM

5
#90 - quemeraisc / @quemeraisc

11/05/2020 at 04:10PM