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
#181 - nd183 / @nd1832

03/07/2022 at 02:17PM

5
#182 - Julio CPP / @jcaesarpp

03/19/2022 at 01:28AM

5
#183 - Chun Chanjun / @CChanjun

03/23/2022 at 12:39PM

5
#184 - 그안합 / @asm6788_kor

04/01/2022 at 11:06AM

5
#185 - mold mild / @mild_mold

04/02/2022 at 12:14PM

5
#186 - Choi Eun Chang / @fateflyec

04/04/2022 at 12:19PM

5
#187 - yeom / @yeomhuigeon

04/05/2022 at 04:20AM

5
#188 - 심우현 / @tmvlem5671

04/05/2022 at 11:35AM

5
#189 - 지형 유 / @O_hr_good7

04/05/2022 at 04:34PM

5
#190 - w1ck3r / @w1ck3r_dr0p

04/08/2022 at 08:14AM

5
#191 - 벚꽃 / @beojkkoch3

04/09/2022 at 02:52AM

5
#192 - 할핳 / @vimgolfYOUNG

04/09/2022 at 08:50AM

5
#193 - Ji_Hyeong / @PlzstopIT7

04/11/2022 at 02:55PM

5
#194 - co_hyo / @co_hyo

04/14/2022 at 09:23AM

5
#195 - CONNOR / @CONNOR32315543

04/14/2022 at 02:40PM

5
#196 - JS K / @JSK76504122

04/15/2022 at 01:50PM

5
#197 - 황다민 / @ghkdekals

04/15/2022 at 04:53PM

5
#198 - 최최대로 / @Jaenedir

04/16/2022 at 05:25AM

5
#199 - 구이공 / @CdP60ouZ6hhcHMG

04/17/2022 at 06:14AM

5
#200 - cho / @cho_liaa

04/17/2022 at 07:38AM

5
#201 - ._. / @Katharsic

04/25/2022 at 03:14PM

5
#202 - russellzhaomao / @russellzhaomao

05/23/2022 at 07:40AM

5
#203 - Borja / @blarratta

05/29/2022 at 11:31AM

5
#204 - Alex / @AlexanderHeatl2

07/06/2022 at 09:02PM

5
#205 - Ilay Skutelsky / @ISkutelsky

08/02/2022 at 03:03PM

5
#206 - linestopaper / @linestopaper

09/14/2022 at 04:28AM

5
#207 - Priyanka Vissamsetty Rao / @priyankavrao97

09/25/2022 at 08:13PM

5
#208 - Manavi Ghorpade / @ManaviGhorpade

09/25/2022 at 11:09PM

5
#209 - Pheimors / @pheimors

10/02/2022 at 12:46PM

5
#210 - Janzen / @__Coos

10/06/2022 at 08:54AM