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
#91 - Nick Yeow / @nickyeow

10/19/2019 at 01:13PM

19
#92 - harmony_krieg / @harmony_krieg

10/20/2019 at 07:17PM

19
#93 - Renan Cidale / @rnescalz

10/20/2019 at 10:29PM

20
#94 - Derek Schrock / @derekschrock

07/19/2019 at 02:34AM

20
#95 - Bradley M. Small / @BradleySmall

07/19/2019 at 03:16AM

20
#96 - mrrdl / @mrrdl5

07/19/2019 at 08:50PM

20
#97 - garry quested / @GQuested

07/20/2019 at 12:38PM

20
#98 - Jon Miller / @jmillxyz

07/21/2019 at 06:45PM

20
#99 - vana / @vana15129217

07/22/2019 at 11:35AM

20
#100 - Walker Boh / @walker_boh

07/22/2019 at 12:37PM

20
#101 - John Contad! / @JohnContad

07/25/2019 at 06:34AM

20
#102 - Jonathan Browning / @yungjig90

07/30/2019 at 12:12AM

20
#103 - matthew brett / @matthewbrett

08/07/2019 at 04:42AM

20
#104 - André Reigoto / @AndreReigoto

08/08/2019 at 02:46AM

20
#105 - Peter Demin / @peterdemin

08/08/2019 at 05:37PM

20
#106 - Noisome Possum / @NoisomePossum

08/09/2019 at 07:53PM

20
#107 - averageRandomPerson / @averageRandomP1

08/26/2019 at 12:06AM

20
#108 - lucca augusto / @LuccaAugusto6

10/05/2019 at 04:57PM

20
#109 - Michał Łowicki / @mlowicki

10/05/2019 at 09:26PM

20
#110 - arsi arola / @mos_kiitto

10/18/2019 at 10:45AM

21
#111 - Jason O'Brien / @jasonobrien

07/23/2019 at 04:36PM

21
#112 - Percelot / @percelot

07/24/2019 at 02:12PM

21
#113 - albalitz / @_albalitz

08/01/2019 at 07:49AM

21
#114 - forvimgolf / @forvimgolf2

08/01/2019 at 08:16PM

21
#115 - Ivo Blöchliger / @aigledesalpes

08/01/2019 at 08:21PM

21
#116 - Chris Shorrock / @EbinFlow

08/13/2019 at 04:50PM

21
#117 - Ralph Callaway / @RalphAtCCC

08/19/2019 at 08:23PM

21
#118 - Simon Wilkinson / @simondwilkinson

08/24/2019 at 02:03PM

21
#119 - theBecwar / @thebecwar

08/25/2019 at 05:54PM

21
#120 - Ariel Miculas / @ArielMiculas

09/18/2019 at 03:15PM