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

177 active golfers, 374 entries

Leaderboard (lowest score wins):
5
#121 - vimgolf / @vimgolf9

04/01/2021 at 08:31PM

5
#122 - Sergio Semedi / @SergioSemedi

04/11/2021 at 05:47PM

5
#123 - Gaston / @Gaston53635525

04/13/2021 at 12:49AM

5
#124 - Michele Gargiulo / @michele_gargi

04/15/2021 at 04:51PM

5
#125 - Olle Wiklund / @Kabix

04/19/2021 at 11:37PM

5
#126 - Paul McDowell / @191_paul

05/04/2021 at 12:46AM

5
#127 - Jaehong Park / @jaehongp

05/05/2021 at 12:16AM

5
#128 - Mobius / @ManiacalMobius

05/10/2021 at 11:27PM

5
#129 - nedlog / @nedlog18

05/14/2021 at 06:51AM

5
#130 - Arya Kumar / @SusSquirrel

05/20/2021 at 03:30PM

5
#131 - Ray Dennis / @raysden

05/20/2021 at 08:59PM

5
#132 - Michael / @Michael62785035

05/30/2021 at 01:53PM

5
#133 - Scott Atkins / @scottrick49

06/01/2021 at 03:39PM

5
#134 - grosa / @_grosa_

06/10/2021 at 05:43PM

5
#135 - Roman Matzutt / @matzutt

06/14/2021 at 01:03PM

5
#136 - Patrick Gates / @patrickgates

06/17/2021 at 04:54AM

5
#137 - Joe Farnsworth / @JoeFarnsworth

06/23/2021 at 12:04AM

5
#138 - ever0de / @ever0de

06/23/2021 at 04:42AM

5
#139 - Ethan Rietz / @EthanRietz

06/28/2021 at 02:57PM

5
#140 - Patrick Martin / @PatrickDMartin

06/29/2021 at 09:00PM

5
#141 - 0xdrowsy / @0xdrowsy

07/02/2021 at 04:59AM

5
#142 - Georg Bökman / @BokmanGeorg

07/03/2021 at 09:25PM

5
#143 - vim_maxter / @MaxterVim

07/05/2021 at 12:20PM

5
#144 - Dominik Böhler / @dominikb1888

07/13/2021 at 08:18PM

5
#145 - lydxn / @lydxn1

07/29/2021 at 04:02AM

5
#146 - François / @mortyZZ

08/01/2021 at 08:02PM

5
#147 - Sarthak Gupta / @saarthxk

08/04/2021 at 06:05PM

5
#148 - Peter Pandorum / @PeterPandorum

08/08/2021 at 03:18PM

5
#149 - Michel Viktor / @tomkpz

08/08/2021 at 09:14PM

5
#150 - Bspammer / @Bspammer

08/15/2021 at 03:16PM