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

326 active golfers, 1314 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

19
#94 - yousef Ibrahim / @YucefIbrahim

10/24/2019 at 12:50PM

19
#95 - vicver09 / @vicver091

10/25/2019 at 03:34AM

19
#96 - vimgolfer / @vimgolfer8

10/26/2019 at 06:34PM

19
#97 - Gregory Furter / @gfurter

10/27/2019 at 10:20AM

19
#98 - TimMcGuire / @mcguire

10/29/2019 at 06:26PM

19
#99 - Mmskl / @mrokati

10/29/2019 at 11:44PM

19
#100 - trafficone / @trafficone

11/02/2019 at 05:13AM

19
#101 - skamgolf / @skamgolf

11/02/2019 at 06:21AM

19
#102 - Melvin Cheung / @MelvinCheung

11/07/2019 at 02:18PM

19
#103 - Matt Aschmann / @ma7hatter

11/07/2019 at 05:51PM

19
#104 - shoji541 / @shoji541

11/08/2019 at 05:31PM

19
#105 - Daniel Klepacki / @daniel_klepacki

11/11/2019 at 12:50PM

19
#106 - Sebastien Premont / @spremont

11/12/2019 at 08:59PM

19
#107 - Dan Correll / @heavyd1001

11/15/2019 at 06:10AM

19
#108 - bassnecter / @lothedr

11/23/2019 at 08:21AM

19
#109 - shota_ogswr / @shota_ogasawara

11/24/2019 at 02:09PM

19
#110 - Eviber / @youvaaaaa

11/27/2019 at 09:50AM

19
#111 - Hector Ricardo / @Hector_Ricardo3

11/30/2019 at 12:15AM

19
#112 - Roger Bongers / @RogerBongers

12/01/2019 at 03:22AM

19
#113 - Nicolas Pagny / @NicolasPagny

12/03/2019 at 01:36PM

19
#114 - Noisome Possum / @NoisomePossum

12/13/2019 at 05:15PM

19
#115 - Jason Neylon / @jasonneylon

12/15/2019 at 10:01AM

19
#116 - John Otters / @OttersJohn

12/15/2019 at 10:20PM

19
#117 - vimRunnerUp3000 / @VUp3000

12/18/2019 at 12:31PM

19
#118 - Vasily / @wolvschool

12/20/2019 at 09:18AM

19
#119 - Delon / @delonleonard

12/22/2019 at 07:49AM

19
#120 - rirze / @SourabhWasTaken

12/25/2019 at 02:29AM