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

343 active golfers, 1361 entries

Leaderboard (lowest score wins):
34
#301 - Mike Hourahine / @mhourahine

08/11/2019 at 09:43PM

34
#302 - meow / @xckodut

12/29/2019 at 06:36PM

34
#303 - DosLin / @hidoslin

01/21/2020 at 07:31AM

34
#304 - Ticktockrobotsnot99 / @akashrrao

02/19/2020 at 04:11AM

35
#305 - Bob Ren / @bobrenjc93

07/20/2019 at 02:16AM

35
#306 - wwilkins / @wwilkins

07/23/2019 at 09:40PM

35
#307 - Eliseo / @Eliseohh_A

11/26/2019 at 06:54PM

36
#308 - abgold / @abgold43461328

09/04/2019 at 02:37AM

36
#309 - Gunnar Thoreson / @ThReGgOn

09/05/2019 at 12:43PM

36
#310 - Laura Fiuza / @thelaurafiuza

12/22/2019 at 05:07AM

38
#311 - blub / @agorilladriving

08/27/2019 at 12:13PM

39
#312 - FreeTheBSD / @FreeTheBSD

07/20/2019 at 02:29AM

39
#313 - crokobit / @crokobit11

07/27/2019 at 03:38AM

39
#314 - Temp / @San5nom

09/25/2019 at 06:20PM

39
#315 - Algimantas Krasauskas / @AlgimantasKras1

01/17/2020 at 02:37PM

40
#316 - Nicolas 👨‍💻🇨🇦 / @martinni39

08/09/2019 at 06:42PM

40
#317 - Whitelea / @CloudPaal

08/12/2019 at 07:53AM

40
#318 - Ivan / @SpiritHNTR

09/03/2019 at 06:15PM

41
#319 - Victor Litvin / @litvin_victor

07/20/2019 at 08:53PM

41
#320 - Kevin Jung / @KevinJung15

09/28/2019 at 09:01AM

41
#321 - d / @d51524477

11/01/2019 at 03:45PM

41
#322 - damien / @GreatTestyTest

11/10/2019 at 08:26PM

42
#323 - Curtis Chong / @curtischong5

08/17/2019 at 10:23PM

43
#324 - David Needham / @davidmneedham

07/20/2019 at 02:04AM

43
#325 - Karan Gajwani / @karangb

08/16/2019 at 09:59AM

43
#326 - Bradley Cushing / @bradleycushing

09/08/2019 at 06:14PM

45
#327 - vimgolfacct / @vimgolfacct

07/27/2019 at 01:30PM

45
#328 - Keith Klassen / @Collegekid491

11/02/2019 at 11:33PM

49
#329 - Vim Golfer / @VimGolfer6

07/19/2019 at 11:01AM

49
#330 - Scott Smith / @Scottaino

12/20/2019 at 09:53PM