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

422 active golfers, 1670 entries

Leaderboard (lowest score wins):
32
#361 - John Kevin Estrella / @kevsestrella

01/07/2020 at 03:09PM

32
#362 - Halfdan S. Bechmann / @HalfdanIsLame

01/14/2020 at 03:56PM

32
#363 - Rob Pilling / @bobrippling

04/23/2020 at 09:33AM

33
#364 - mmaorc / @mmaorc1

07/20/2019 at 11:46AM

33
#365 - andresote / @andresote

07/20/2019 at 10:18PM

33
#366 - Lukas Stratmann / @Lumpiluk

08/07/2019 at 01:25PM

33
#367 - Josefina Alconada / @jochiAlconada

10/03/2019 at 10:53AM

33
#368 - Aaron / @_Lordofthevoid_

12/17/2019 at 05:39PM

33
#369 - JimmyGymglish / @JGymglish

12/27/2019 at 03:52PM

33
#370 - volandkit / @volandkit

04/20/2020 at 05:30PM

34
#371 - joseph.cheng / @josephc89207523

07/20/2019 at 05:54AM

34
#372 - Ohan / @Br0han

07/30/2019 at 04:23AM

34
#373 - Viktor Fukala / @FukalaViktor

07/30/2019 at 10:27AM

34
#374 - Mike Hourahine / @mhourahine

08/11/2019 at 09:43PM

34
#375 - meow / @xckodut

12/29/2019 at 06:36PM

34
#376 - DosLin / @hidoslin

01/21/2020 at 07:31AM

34
#377 - Ticktockrobotsnot99 / @akashrrao

02/19/2020 at 04:11AM

34
#378 - Dionysus / @user101user

05/07/2020 at 11:19PM

34
#379 - drGsus / @drGsus

07/25/2020 at 07:22AM

35
#380 - Bob Ren / @bobrenjc93

07/20/2019 at 02:16AM

35
#381 - wwilkins / @wwilkins

07/23/2019 at 09:40PM

35
#382 - Eliseo / @Eliseohh_A

11/26/2019 at 06:54PM

35
#383 - Jason / @roosjason

04/07/2020 at 09:53AM

36
#384 - abgold / @abgold43461328

09/04/2019 at 02:37AM

36
#385 - Gunnar Thoreson / @ThReGgOn

09/05/2019 at 12:43PM

36
#386 - Laura Fiuza / @thelaurafiuza

12/22/2019 at 05:07AM

38
#387 - blub / @agorilladriving

08/27/2019 at 12:13PM

38
#388 - dule2607 / @dule26071

04/30/2020 at 09:43AM

39
#389 - FreeTheBSD / @FreeTheBSD

07/20/2019 at 02:29AM

39
#390 - crokobit / @crokobit11

07/27/2019 at 03:38AM