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

420 active golfers, 1667 entries

Leaderboard (lowest score wins):
20
#181 - André Reigoto / @AndreReigoto

08/08/2019 at 02:46AM

20
#182 - Peter Demin / @peterdemin

08/08/2019 at 05:37PM

20
#183 - averageRandomPerson / @averageRandomP1

08/26/2019 at 12:06AM

20
#184 - lucca augusto / @LuccaAugusto6

10/05/2019 at 04:57PM

20
#185 - Michał Łowicki / @mlowicki

10/05/2019 at 09:26PM

20
#186 - arsi arola / @mos_kiitto

10/18/2019 at 10:45AM

20
#187 - Saher El-Neklawy / @saherneklawy

10/22/2019 at 11:54AM

20
#188 - Lory / @Lory46845742

10/29/2019 at 03:33PM

20
#189 - Chris Covert / @covertcj

11/07/2019 at 03:43PM

20
#190 - fritz_carraldo / @fritz_carraldo

11/10/2019 at 11:12PM

20
#191 - Ebi / @ehan6

11/18/2019 at 09:47AM

20
#192 - 990 / @nisibasi990

12/03/2019 at 03:00PM

20
#193 - vim_golfer_1 / @vimgolfer12

12/05/2019 at 08:50AM

20
#194 - King Kang / @nobagtravel

12/11/2019 at 10:08AM

20
#195 - hokonch / @hokonch

12/24/2019 at 05:31PM

20
#196 - None / @sh1chuang

12/30/2019 at 11:20AM

20
#197 - Marius Jurgelenas / @MarenasLT

01/17/2020 at 02:48PM

20
#198 - Sander Vanhove / @SanderVhove

02/06/2020 at 10:22AM

20
#199 - stretchy / @stretch11013132

02/17/2020 at 03:36AM

20
#200 - Victor Chen / @VictorC89422342

03/04/2020 at 07:58PM

20
#201 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/15/2020 at 10:18PM

20
#202 - Ryan Nevius / @ryannevius

03/17/2020 at 06:42AM

20
#203 - BnnGolfer / @BnnGolfer

03/20/2020 at 02:07PM

20
#204 - vvaannaa3 / @vvaannaa3

03/20/2020 at 11:43PM

20
#205 - John Doe / @JohnDoe77150954

03/22/2020 at 05:20PM

20
#206 - Rodrigo V. Lopes / @rodvlopes

03/28/2020 at 02:11AM

20
#207 - 廖彥智 / @JeffYenchih

04/15/2020 at 09:50AM

20
#208 - Bhagwan / @El_Bhagwan

05/11/2020 at 06:19AM

20
#209 - Jeff Cui / @jeffacce

05/12/2020 at 01:49PM

20
#210 - Eric Lindgren / @kilombogypsy

05/15/2020 at 09:11PM