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

420 active golfers, 1667 entries

Leaderboard (lowest score wins):
20
#211 - JLObject / @powful_panda

07/02/2020 at 01:43PM

20
#212 - Saurabh / @Saurabh09299

07/22/2020 at 03:49PM

20
#213 - Andy Yang / @yzwdroid

07/24/2020 at 04:35PM

21
#214 - Jason O'Brien / @jasonobrien

07/23/2019 at 04:36PM

21
#215 - Percelot / @percelot

07/24/2019 at 02:12PM

21
#216 - albalitz / @_albalitz

08/01/2019 at 07:49AM

21
#217 - forvimgolf / @forvimgolf2

08/01/2019 at 08:16PM

21
#218 - Ivo Blöchliger / @aigledesalpes

08/01/2019 at 08:21PM

21
#219 - Chris Shorrock / @EbinFlow

08/13/2019 at 04:50PM

21
#220 - Ralph Callaway / @RalphAtCCC

08/19/2019 at 08:23PM

21
#221 - Simon Wilkinson / @simondwilkinson

08/24/2019 at 02:03PM

21
#222 - theBecwar / @thebecwar

08/25/2019 at 05:54PM

21
#223 - Ariel Miculas / @ArielMiculas

09/18/2019 at 03:15PM

21
#224 - Daniel Beck / @daniel_beck_il

09/22/2019 at 01:21PM

21
#225 - Lorenzo Bertolino / @lo_bertolino

10/09/2019 at 04:03PM

21
#226 - Jörg Meyer / @JoergMy

10/19/2019 at 09:06PM

21
#227 - Scott Taylor / @scott11X8

10/26/2019 at 02:22AM

21
#228 - Max Coplan / @mchcopl

11/03/2019 at 11:41PM

21
#229 - Mike Deakin / @Mick_Deak

11/20/2019 at 02:12PM

21
#230 - Rishabh Dwivedi / @Rishabh45312910

11/23/2019 at 09:35PM

21
#231 - Laurent Atlan / @laurentatlan1

12/06/2019 at 11:41PM

21
#232 - James Casey / @hanavi

12/20/2019 at 10:09PM

21
#233 - Lars Haalck / @larshulk

01/09/2020 at 01:59PM

21
#234 - Touroux Nathan / @xayon40_12

01/27/2020 at 09:33AM

21
#235 - RockerZZY / @rocker_zzy

05/27/2020 at 02:13PM

21
#236 - Christophe Robillard / @krichtof

05/29/2020 at 01:16PM

21
#237 - tullie / @tulliemurrell

07/15/2020 at 02:31PM

22
#238 - Jeff Schomay / @jschomay

07/21/2019 at 05:05PM

22
#239 - Maor Leger / @maor_leger

07/21/2019 at 06:25PM

22
#240 - Danny T / @son_of_torkel

07/28/2019 at 09:44PM