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

474 active golfers, 1872 entries

Leaderboard (lowest score wins):
27
#361 - Jonas Marcus / @JonasMarcus1

10/16/2019 at 08:00PM

27
#362 - Ahmed / @Ahmed16460759

10/21/2019 at 10:34AM

27
#363 - Coby Drexler / @CobyDrexler

12/26/2019 at 05:32PM

27
#364 - Jerry Zhu / @xpost2000games

01/21/2020 at 03:29AM

27
#365 - diwa / @Di_nate_

02/27/2020 at 08:48AM

27
#366 - Kaustubh Murumkar / @k_austub_h

08/31/2020 at 06:49PM

27
#367 - Christ / @Christ46234422

09/08/2020 at 12:27AM

28
#368 - Harsha Nadimpalli / @Harsha_live

07/31/2019 at 06:06AM

28
#369 - John / @JohnJDoe2

07/31/2019 at 10:09AM

28
#370 - Chad Harris / @chad__harris

08/07/2019 at 01:01AM

28
#371 - Hector Davensburg / @hdavensburg

08/13/2019 at 09:34PM

28
#372 - Max Williams / @notmaxbutmax

10/15/2019 at 11:00PM

28
#373 - fedja golf / @fedjagolf

04/13/2020 at 01:59AM

28
#374 - Manish Baghel / @ManishBaghelz

05/15/2020 at 11:31AM

29
#375 - Charlie OConor / @charlieoconor

07/19/2019 at 07:09PM

29
#376 - antónio miranda / @ammutable

08/07/2019 at 09:29PM

29
#377 - Matt Tuttle / @Matt_Tuttle

08/09/2019 at 11:57PM

29
#378 - mathias / @mathias55990401

08/11/2019 at 09:46AM

29
#379 - Alexey Kuntsevich / @jezzarax

08/27/2019 at 12:21PM

29
#380 - wsg / @wsg31986835

11/29/2019 at 12:10AM

29
#381 - Steve Racanovic / @steve_racanovic

12/19/2019 at 01:14AM

29
#382 - Wesley Runnels / @wesleyrunnels

05/03/2020 at 05:34PM

29
#383 - Quentin Leroy / @qnleroy

05/13/2020 at 06:32AM

29
#384 - Pouya Rostam / @PouyaRostam

05/15/2020 at 09:49PM

30
#385 - Przemek Kurek / @PrzemekKurek

07/27/2019 at 10:01PM

30
#386 - Tencent / @JiezhiG

08/08/2019 at 09:59AM

30
#387 - nebbii / @nebbii_

09/26/2019 at 03:28PM

30
#388 - Laura Skillington / @lauraskills1

11/29/2020 at 10:40PM

30
#389 - fff / @fff51460170

01/13/2021 at 04:03AM

31
#390 - Mr_Djez / @DjezMr

08/05/2019 at 11:19AM