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

311 active golfers, 735 entries

Leaderboard (lowest score wins):
5
#31 - Moss / @m0ssc0de

07/14/2020 at 03:32AM

5
#32 - analogpixel / @analogp1xel

07/14/2020 at 12:05PM

5
#33 - Eric Link / @elink_tx

07/15/2020 at 02:24AM

5
#34 - PK / @pkeugine

07/15/2020 at 02:30AM

5
#35 - Dan / @dstein64

07/16/2020 at 12:52AM

5
#36 - LCY / @Chooneh

07/16/2020 at 09:30AM

5
#37 - Ángel Durán / @AngeeelD

07/16/2020 at 02:48PM

5
#38 - dadav 🥀 / @__dadav__

07/16/2020 at 02:51PM

5
#39 - Madelyn Freed / @demonaday

07/16/2020 at 10:48PM

5
#40 - vito / @vito49999722

07/17/2020 at 03:10PM

5
#41 - Bob / @Bob75461026

07/17/2020 at 04:12PM

5
#42 - Remy_Clarke / @_Remy_Clarke_

07/17/2020 at 10:56PM

5
#43 - Tiago Nascimento / @tigum27

07/18/2020 at 04:16PM

5
#44 - JL T / @l0f4r0

07/19/2020 at 06:06PM

5
#45 - Daniel Habib / @danielhvs

07/21/2020 at 02:16AM

5
#46 - WhatDo / @WhatDo10

07/21/2020 at 11:27AM

5
#47 - Saurabh / @Saurabh09299

07/21/2020 at 01:59PM

5
#48 - John Braxler / @braxler

07/21/2020 at 05:35PM

5
#49 - Jason / @jason_eveleth

07/22/2020 at 12:50PM

5
#50 - Benjamin Turner / @passionsplay

07/23/2020 at 04:06AM

5
#51 - Sergey Averkiev / @ExAnimoso

07/24/2020 at 06:59AM

5
#52 - drGsus / @drGsus

07/24/2020 at 05:49PM

5
#53 - Jacob Shomstein / @jshoms

07/25/2020 at 04:16AM

5
#54 - GenericHardwareGamer / @GnrikHrdwrGamer

07/26/2020 at 06:41AM

5
#55 - Mislav Vuletić / @MasterGeeMedo

07/26/2020 at 01:31PM

5
#56 - Kurtis D. Miller / @phdkurt

07/26/2020 at 06:58PM

5
#57 - Jeff Cui / @jeffacce

07/27/2020 at 09:01AM

5
#58 - Gergely Risko / @errge

07/28/2020 at 10:29PM

5
#59 - Sam Houston / @shouston33

07/29/2020 at 11:09PM

5
#60 - Rustem B. / @_rustemb

07/31/2020 at 12:21AM