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
#151 - Roman Privalov / @RomanPrivalov

08/27/2021 at 01:48AM

5
#152 - panakin skywalker / @_j3ffrey

08/31/2021 at 05:01PM

5
#153 - mevmev / @mevmev8

09/03/2021 at 09:07AM

5
#154 - Captain Proton / @CaptainProton5

09/03/2021 at 09:46PM

5
#155 - yu xie / @yuxie21997666

09/15/2021 at 12:13PM

5
#156 - vineet / @vineet38383726

09/16/2021 at 10:08AM

5
#157 - Leander Hendrikx / @leanderhendrikx

09/20/2021 at 12:09PM

6
#158 - Andreas Siegrist / @andreaszwei

01/29/2021 at 10:42PM

6
#159 - 김범준 / @kmbmjn

02/17/2021 at 02:05AM

6
#160 - Nick Anishenko / @NAnishenko

03/28/2021 at 11:11AM

6
#161 - Quentin Leroy / @qnleroy

08/22/2021 at 04:56PM

7
#162 - Miki Tebeka / @tebeka

07/16/2020 at 06:37AM

7
#163 - Norman Liu / @normanwliu

07/25/2020 at 10:57PM

7
#164 - Lorenz Leitner / @LorenzLeitner

07/26/2020 at 01:22PM

7
#165 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 05:47PM

7
#166 - Michael D Jones / @biotechjones

09/02/2020 at 08:00PM

7
#167 - JP / @JP16366170

09/08/2020 at 02:30PM

7
#168 - :wq / @write_quit_22

05/19/2021 at 06:40PM

8
#169 - Anil Narayan / @AnilNarayan2013

07/23/2020 at 01:34AM

9
#170 - Danko Miocevic / @DankoMiocevic

09/17/2021 at 08:21PM

11
#171 - blue christ / @bluechrist3

08/01/2020 at 09:20PM

13
#172 - William Ott / @oddalot

07/12/2020 at 11:42PM

13
#173 - fff / @fff51460170

02/21/2021 at 04:30AM

14
#174 - Tassilo Neubauer / @TassiloNeubauer

02/22/2021 at 02:16PM

16
#175 - Dennis Chen / @Mailyfesux

11/12/2020 at 09:00AM

16
#176 - Vincent Lai / @walilav

07/21/2021 at 07:44AM

100
#177 - HamzaOPLEX / @HamzaOplex

05/12/2021 at 10:43PM