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

196 active golfers, 410 entries

Leaderboard (lowest score wins):
7
#181 - Lorenz Leitner / @LorenzLeitner

07/26/2020 at 01:22PM

7
#182 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 05:47PM

7
#183 - Michael D Jones / @biotechjones

09/02/2020 at 08:00PM

7
#184 - JP / @JP16366170

09/08/2020 at 02:30PM

7
#185 - :wq / @write_quit_22

05/19/2021 at 06:40PM

7
#186 - merphant / @merphant

11/18/2021 at 07:52AM

7
#187 - Nikita Bobko / @nikitabobko

01/13/2022 at 12:53AM

8
#188 - Anil Narayan / @AnilNarayan2013

07/23/2020 at 01:34AM

9
#189 - Danko Miocevic / @DankoMiocevic

09/17/2021 at 08:21PM

11
#190 - blue christ / @bluechrist3

08/01/2020 at 09:20PM

13
#191 - William Ott / @oddalot

07/12/2020 at 11:42PM

13
#192 - fff / @fff51460170

02/21/2021 at 04:30AM

14
#193 - Tassilo Neubauer / @TassiloNeubauer

02/22/2021 at 02:16PM

16
#194 - Dennis Chen / @Mailyfesux

11/12/2020 at 09:00AM

16
#195 - Vincent Lai / @walilav

07/21/2021 at 07:44AM

100
#196 - HamzaOPLEX / @HamzaOplex

05/12/2021 at 10:43PM