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 5d3122ace2e18c0006b8bc4d

Bad Copy Syntax

Copy should be from right to left, but sometimes you type it wrong.

Start file
   copyRtL(source, destination);
   copyRtL("John Q. Public", nameVariable);
End file
   copyRtL(destination, source);
   copyRtL(nameVariable, "John Q. Public");

View Diff

1,2c1,2
<    copyRtL(source, destination);
<    copyRtL("John Q. Public", nameVariable);
---
>    copyRtL(destination, source);
>    copyRtL(nameVariable, "John Q. Public");

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 472 remaining solutions by signing in and submitting your own entry
#473 Urbanovics Péter / @UrbanovicsP - Score: 203 - 08/22/19 @ 11:03
:s/(\(.*)<Left>\<Right>, (.*<BS><BS><BS>\*<BS>(.*\))/<BS>'<BS>\(\2, \1<BS><BS><BS><BS><BS><BS>/2<BS><BS>\2 <BS>, '1<BS><BS>\1)/<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>%<Right><Right><Right><Right><Right><Right><Right><Right><Right><CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><CR>:<Up><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><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><BS>\<BS>/<CR>:wq<CR>

0 comments


Created by: @BradleySmall

473 active golfers, 1864 entries

Leaderboard (lowest score wins):
20
#211 - arsi arola / @mos_kiitto

10/18/2019 at 10:45AM

20
#212 - Saher El-Neklawy / @saherneklawy

10/22/2019 at 11:54AM

20
#213 - Lory / @Lory46845742

10/29/2019 at 03:33PM

20
#214 - Chris Covert / @covertcj

11/07/2019 at 03:43PM

20
#215 - fritz_carraldo / @fritz_carraldo

11/10/2019 at 11:12PM

20
#216 - Ebi / @ehan6

11/18/2019 at 09:47AM

20
#217 - 990 / @nisibasi990

12/03/2019 at 03:00PM

20
#218 - vim_golfer_1 / @vimgolfer12

12/05/2019 at 08:50AM

20
#219 - King Kang / @nobagtravel

12/11/2019 at 10:08AM

20
#220 - hokonch / @hokonch

12/24/2019 at 05:31PM

20
#221 - None / @sh1chuang

12/30/2019 at 11:20AM

20
#222 - Marius Jurgelenas / @MarenasLT

01/17/2020 at 02:48PM

20
#223 - Sander Vanhove / @SanderVhove

02/06/2020 at 10:22AM

20
#224 - stretchy / @stretch11013132

02/17/2020 at 03:36AM

20
#225 - Victor Chen / @VictorC89422342

03/04/2020 at 07:58PM

20
#226 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/15/2020 at 10:18PM

20
#227 - Ryan Nevius / @ryannevius

03/17/2020 at 06:42AM

20
#228 - BnnGolfer / @BnnGolfer

03/20/2020 at 02:07PM

20
#229 - vvaannaa3 / @vvaannaa3

03/20/2020 at 11:43PM

20
#230 - John Doe / @JohnDoe77150954

03/22/2020 at 05:20PM

20
#231 - Rodrigo V. Lopes / @rodvlopes

03/28/2020 at 02:11AM

20
#232 - 廖彥智 / @JeffYenchih

04/15/2020 at 09:50AM

20
#233 - Bhagwan / @El_Bhagwan

05/11/2020 at 06:19AM

20
#234 - Jeff Cui / @jeffacce

05/12/2020 at 01:49PM

20
#235 - Eric Lindgren / @kilombogypsy

05/15/2020 at 09:11PM

20
#236 - JLObject / @powful_panda

07/02/2020 at 01:43PM

20
#237 - Saurabh / @Saurabh09299

07/22/2020 at 03:49PM

20
#238 - Andy Yang / @yzwdroid

07/24/2020 at 04:35PM

20
#239 - Vinay Sharma / @VinaySh63956554

08/09/2020 at 06:03PM

20
#240 - Tanzeel Kazi / @tanzeelkazi

08/13/2020 at 03:56PM