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

473 active golfers, 1864 entries

Leaderboard (lowest score wins):
19
#91 - Baine Wedlock / @BaineWedlock

09/06/2019 at 09:38AM

19
#92 - Zach Ingbretsen / @ZIngbretsen

09/06/2019 at 04:56PM

19
#93 - Cassandra / @kascein

09/17/2019 at 07:07AM

19
#94 - Viktor Styrud / @ViktorStyrud

09/20/2019 at 07:00AM

19
#95 - Ollin Boer Bohan / @madebyollin

09/23/2019 at 10:33PM

19
#96 - Miko / @_m_ik_o_

09/24/2019 at 07:20PM

19
#97 - vimgolfer / @vimgolfer7

09/28/2019 at 02:03PM

19
#98 - IronTiger Park / @IrontigerP

09/29/2019 at 05:33AM

19
#99 - Sebastien Baudray / @sbaudray

09/29/2019 at 08:25PM

19
#100 - Chen-Hung Wu / @utah12005

09/30/2019 at 08:09PM

19
#101 - dahan / @dahan74265266

10/08/2019 at 10:49AM

19
#102 - Skywalker 666 / @MemeMasterXXI

10/10/2019 at 12:25AM

19
#103 - Madelyn Freed / @EcoBummer

10/10/2019 at 05:29PM

19
#104 - Emil Braserud / @Erdustiggen

10/10/2019 at 06:31PM

19
#105 - Sam O'Malley / @Samuel_OMalley

10/12/2019 at 03:28AM

19
#106 - kkscr / @kkscr1

10/13/2019 at 01:18PM

19
#107 - Erik Engstrom / @eengstrom

10/15/2019 at 03:53AM

19
#108 - Mario Olofo / @mario_olofo

10/16/2019 at 04:52AM

19
#109 - leo / @leo28356948

10/17/2019 at 06:19AM

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

10/17/2019 at 06:22AM

19
#111 - Ivan Volosyuk / @IvanVolosyuk

10/19/2019 at 07:15AM

19
#112 - Nick Yeow / @nickyeow

10/19/2019 at 01:13PM

19
#113 - harmony_krieg / @harmony_krieg

10/20/2019 at 07:17PM

19
#114 - Renan Cidale / @rnescalz

10/20/2019 at 10:29PM

19
#115 - yousef Ibrahim / @YucefIbrahim

10/24/2019 at 12:50PM

19
#116 - vicver09 / @vicver091

10/25/2019 at 03:34AM

19
#117 - vimgolfer / @vimgolfer8

10/26/2019 at 06:34PM

19
#118 - Gregory Furter / @gfurter

10/27/2019 at 10:20AM

19
#119 - TimMcGuire / @mcguire

10/29/2019 at 06:26PM

19
#120 - Mmskl / @mrokati

10/29/2019 at 11:44PM