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
#91 - Jake Grossman / @PiranaLaugh

11/11/2020 at 06:13PM

5
#92 - Munif Tanjim / @MunifTanjim

11/11/2020 at 08:04PM

5
#93 - Rafal C. / @RafalC37709324

11/14/2020 at 02:44PM

5
#94 - chocolate / @chocola81394123

11/18/2020 at 06:07AM

5
#95 - hepebexè / @hepebexe

11/18/2020 at 07:01PM

5
#96 - Trong Kha Nguyen / @__ngtrongkha

11/25/2020 at 08:03AM

5
#97 - Demian Martinez / @demianuco

12/10/2020 at 12:23PM

5
#98 - kafang plays vimgolf / @KafangV

12/17/2020 at 07:23AM

5
#99 - Jung Yeon Park / @park_jungy

01/08/2021 at 05:53PM

5
#100 - Gunter Kluge / @KlugeGunter

01/08/2021 at 10:55PM

5
#101 - roudens / @roudens2

01/09/2021 at 11:43AM

5
#102 - A A A / @37fatos

01/15/2021 at 11:07PM

5
#103 - 최락준 / @Y3dgIgQFa72S0JX

02/03/2021 at 03:33AM

5
#104 - Jianfeng / @Jianfen22425058

02/03/2021 at 07:26AM

5
#105 - Torikatsu / @torikatsu923

02/12/2021 at 06:44PM

5
#106 - Fake Konto / @F4k3K0n70

02/13/2021 at 03:26PM

5
#107 - Martin LOUAZEL / @Zbrahark

02/19/2021 at 12:22PM

5
#108 - Tobia Bocchi / @BocchiTobia

02/19/2021 at 12:52PM

5
#109 - Selvaganapathy P / @canabady

02/20/2021 at 10:42AM

5
#110 - George Angelopoulos / @g_usermod

02/20/2021 at 05:41PM

5
#111 - hamb / @hamb88140219

02/21/2021 at 09:06AM

5
#112 - Askhento / @Askhento1

02/25/2021 at 09:20PM

5
#113 - yaarrr / @v0lko

03/10/2021 at 12:40PM

5
#114 - pomélux / @pomelux

03/10/2021 at 03:42PM

5
#115 - der tanzbaer / @der_tanzbaer

03/10/2021 at 08:44PM

5
#116 - maxtong / @maxtong1987

03/19/2021 at 10:24AM

5
#117 - pikjes / @pikjes2

03/21/2021 at 01:17PM

5
#118 - omer vishlitzky / @OVishlitzky

03/26/2021 at 03:50PM

5
#119 - Russell Helmstedter / @RHelmstedter

03/27/2021 at 11:33PM

5
#120 - kyoosiklee / @kyoosiklee

03/29/2021 at 11:30AM