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 105 remaining solutions by signing in and submitting your own entry
#106 Dennis Chen / @Mailyfesux - Score: 16 - 11/12/20 @ 09:00
:%s/\n*\s*//g<CR>ZZ

0 comments


Created by: @IsaacPZZ

106 active golfers, 207 entries

Leaderboard (lowest score wins):
5
#1 - Isaac Pohl-Zaretsky / @IsaacPZZ

07/10/2020 at 04:10PM

5
#2 - Gabe Pohl-Zaretsky / @Gabe_PZ

07/10/2020 at 04:21PM

5
#3 - Leandro Lourenci / @lourenci

07/10/2020 at 04:29PM

5
#4 - Federico Ramirez / @gosukiwi

07/10/2020 at 04:31PM

5
#5 - Yannick / @Yannick88147038

07/10/2020 at 05:55PM

5
#6 - r4d1um / @r4d1um

07/10/2020 at 06:57PM

5
#7 - Matt DB / @MattDB12

07/10/2020 at 07:07PM

5
#8 - Rocco Calvi / @TecR0c

07/10/2020 at 08:23PM

5
#9 - Mitchell Horning / @HorningMitchell

07/10/2020 at 08:49PM

5
#10 - Jan Sturm / @JanSturm77

07/10/2020 at 09:47PM

5
#11 - せいほう / @FICSQF

07/10/2020 at 10:29PM

5
#12 - Toby Hawkins / @Toby_Hawkins

07/10/2020 at 11:50PM

5
#13 - Jon Krause / @jkrause314

07/11/2020 at 03:10AM

5
#14 - Jonáš Šerých / @serycjon

07/11/2020 at 09:17AM

5
#15 - Delon / @delonleonard

07/11/2020 at 11:31AM

5
#16 - Adrián Delgado / @Caritativito

07/11/2020 at 11:07PM

5
#17 - cwaldbieser / @cwaldbieser

07/11/2020 at 11:35PM

5
#18 - Anton / @Zackushka

07/12/2020 at 01:06AM

5
#19 - RockerZZY / @rocker_zzy

07/12/2020 at 04:21AM

5
#20 - Paschalis Economou / @PaschalisEcono1

07/12/2020 at 05:12AM

5
#21 - Robberechts Arne / @ArneRobberechts

07/12/2020 at 10:22AM

5
#22 - Виталий Макаров / @avada_keda_bra

07/12/2020 at 01:04PM

5
#23 - Ferran / @ferran_marlet

07/12/2020 at 03:12PM

5
#24 - Vital Wang / @wang_vital

07/12/2020 at 05:14PM

5
#25 - Dane Summers / @dsummersl

07/12/2020 at 06:49PM

5
#26 - dotvimrc / @dotvimrc1

07/13/2020 at 06:23AM

5
#27 - Tinko Minko / @tandikula

07/13/2020 at 08:03AM

5
#28 - Edgar Domingues / @edgar_domingues

07/13/2020 at 10:44AM

5
#29 - Smylers / @Smylers2

07/13/2020 at 08:09PM

5
#30 - Ravi S Sinha / @ambidextrousTx

07/14/2020 at 01:56AM