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
#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

6
#136 - Andreas Siegrist / @andreaszwei

01/29/2021 at 10:42PM

6
#137 - 김범준 / @kmbmjn

02/17/2021 at 02:05AM

6
#138 - Nick Anishenko / @NAnishenko

03/28/2021 at 11:11AM

7
#139 - Miki Tebeka / @tebeka

07/16/2020 at 06:37AM

7
#140 - Norman Liu / @normanwliu

07/25/2020 at 10:57PM

7
#141 - Lorenz Leitner / @LorenzLeitner

07/26/2020 at 01:22PM

7
#142 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 05:47PM

7
#143 - Michael D Jones / @biotechjones

09/02/2020 at 08:00PM

7
#144 - JP / @JP16366170

09/08/2020 at 02:30PM

7
#145 - :wq / @write_quit_22

05/19/2021 at 06:40PM

8
#146 - Anil Narayan / @AnilNarayan2013

07/23/2020 at 01:34AM

11
#147 - blue christ / @bluechrist3

08/01/2020 at 09:20PM

13
#148 - William Ott / @oddalot

07/12/2020 at 11:42PM

13
#149 - fff / @fff51460170

02/21/2021 at 04:30AM

14
#150 - Tassilo Neubauer / @TassiloNeubauer

02/22/2021 at 02:16PM