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

195 active golfers, 408 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

5
#158 - Johan Linder / @imLinder

09/23/2021 at 11:35AM

5
#159 - Nick Repetti / @nick_repetti

09/24/2021 at 12:18AM

5
#160 - jrvieira / @zjrvieira

10/23/2021 at 10:20PM

5
#161 - Swaraj Dash / @swarajdash_

11/14/2021 at 11:24PM

5
#162 - Mircea Eftimescu / @meftimes

11/21/2021 at 03:48AM

5
#163 - Graffiti.Lab / @Graffiti2U

12/11/2021 at 04:27PM

5
#164 - Michael Herring / @mayoroftuesday

12/14/2021 at 05:46PM

5
#165 - Joshua Marple / @JoshuaMarple1

12/17/2021 at 08:21PM

5
#166 - duyker / @duyker

12/24/2021 at 03:49AM

5
#167 - Humbaba / @humbabu

01/01/2022 at 12:20AM

5
#168 - ややお / @yayaoh

01/01/2022 at 02:00PM

5
#169 - Tom van Dijk / @d_tomvan

01/07/2022 at 06:04PM

5
#170 - POSIX / @po6ix

01/08/2022 at 12:33PM

5
#171 - Nougatine Naja / @NougatineNaja

01/13/2022 at 12:58PM

5
#172 - rappenstein2 / @rappenstein2

01/16/2022 at 05:07PM

6
#173 - Andreas Siegrist / @andreaszwei

01/29/2021 at 10:42PM

6
#174 - 김범준 / @kmbmjn

02/17/2021 at 02:05AM

6
#175 - Nick Anishenko / @NAnishenko

03/28/2021 at 11:11AM

6
#176 - Quentin Leroy / @qnleroy

08/22/2021 at 04:56PM

6
#177 - rakshith 🦄 / @rakshithbellare

12/28/2021 at 04:22PM

7
#178 - Miki Tebeka / @tebeka

07/16/2020 at 06:37AM

7
#179 - Norman Liu / @normanwliu

07/25/2020 at 10:57PM

7
#180 - Lorenz Leitner / @LorenzLeitner

07/26/2020 at 01:22PM