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

230 active golfers, 862 entries

Leaderboard (lowest score wins):
19
#61 - Maxime Turquetil / @maturquetil

08/28/2019 at 09:30AM

19
#62 - sundeep routhu / @sundeep12005

08/29/2019 at 03:36PM

19
#63 - Andrew Blokzyl / @linuxKd

08/29/2019 at 06:30PM

19
#64 - Amil / @amilsil

08/29/2019 at 10:58PM

19
#65 - greengreen / @greengr09073862

08/30/2019 at 04:33PM

19
#66 - じんぺー / @jinpei0908

08/31/2019 at 01:12PM

19
#67 - Bill Ruddock / @biinari

08/31/2019 at 10:40PM

19
#68 - Andrzej Wąsowski / @AndrzejWasowski

09/02/2019 at 11:07AM

19
#69 - Baine Wedlock / @BaineWedlock

09/06/2019 at 09:38AM

19
#70 - Zach Ingbretsen / @ZIngbretsen

09/06/2019 at 04:56PM

19
#71 - Andac Safa / @SanDForcE94

09/11/2019 at 09:58PM

19
#72 - Cassandra / @kascein

09/17/2019 at 07:07AM

19
#73 - Viktor Styrud / @Visklol

09/20/2019 at 07:00AM

19
#74 - Ollin Boer Bohan / @madebyollin

09/23/2019 at 10:33PM

19
#75 - Miko / @_m_ik_o_

09/24/2019 at 07:20PM

19
#76 - vimgolfer / @vimgolfer7

09/28/2019 at 02:03PM

19
#77 - IronTiger Park / @IrontigerP

09/29/2019 at 05:33AM

19
#78 - Sebastien Baudray / @sbaudray

09/29/2019 at 08:25PM

19
#79 - Chen-Hung Wu / @utah12005

09/30/2019 at 08:09PM

19
#80 - dahan / @dahan74265266

10/08/2019 at 10:49AM

19
#81 - Skywalker 666 / @MemeMasterXXI

10/10/2019 at 12:25AM

19
#82 - Madelyn Freed / @EcoBummer

10/10/2019 at 05:29PM

19
#83 - Emil Braserud / @Erdustiggen

10/10/2019 at 06:31PM

19
#84 - Sam O'Malley / @Samuel_OMalley

10/12/2019 at 03:28AM

19
#85 - kkscr / @kkscr1

10/13/2019 at 01:18PM

19
#86 - Erik Engstrom / @eengstrom

10/15/2019 at 03:53AM

19
#87 - Mario Olofo / @mario_olofo

10/16/2019 at 04:52AM

19
#88 - leo / @leo28356948

10/17/2019 at 06:19AM

19
#89 - Константин / @pillar_vandyke

10/17/2019 at 06:22AM

19
#90 - Ivan Volosyuk / @IvanVolosyuk

10/19/2019 at 07:15AM