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

419 active golfers, 1664 entries

Leaderboard (lowest score wins):
40
#391 - Whitelea / @CloudPaal

08/12/2019 at 07:53AM

40
#392 - Ivan / @SpiritHNTR

09/03/2019 at 06:15PM

41
#393 - Victor Litvin / @litvin_victor

07/20/2019 at 08:53PM

41
#394 - Kevin Jung / @KevinJung15

09/28/2019 at 09:01AM

41
#395 - d / @d51524477

11/01/2019 at 03:45PM

41
#396 - damien / @GreatTestyTest

11/10/2019 at 08:26PM

42
#397 - Curtis Chong / @curtischong5

08/17/2019 at 10:23PM

43
#398 - David Needham / @davidmneedham

07/20/2019 at 02:04AM

43
#399 - Karan Gajwani / @karangb

08/16/2019 at 09:59AM

43
#400 - Bradley Cushing / @bradleycushing

09/08/2019 at 06:14PM

45
#401 - vimgolfacct / @vimgolfacct

07/27/2019 at 01:30PM

45
#402 - Keith Klassen / @Collegekid491

11/02/2019 at 11:33PM

46
#403 - Jacob Shomstein / @jshoms

07/26/2020 at 05:53PM

49
#404 - Vim Golfer / @VimGolfer6

07/19/2019 at 11:01AM

49
#405 - Scott Smith / @Scottaino

12/20/2019 at 09:53PM

52
#406 - bjarne stroustrup (dj set) / @scarletdenizen

08/02/2019 at 09:22PM

54
#407 - Tri Le / @Tri_Le

07/25/2019 at 11:11PM

55
#408 - Aaron Harris / @TheJoyOfPython

12/09/2019 at 02:31PM

57
#409 - Thomas Edlich / @grumpybavarian

09/27/2019 at 10:56PM

62
#410 - Stephen Westhead / @CraziCrow

10/08/2019 at 03:39PM

62
#411 - Alvaro Melendez / @alvaromelendezh

02/21/2020 at 05:54PM

69
#412 - dahara / @kuma_moooon

08/06/2019 at 03:34PM

74
#413 - Paul Teehan / @paulteehan

07/26/2019 at 01:51PM

76
#414 - KlondikeBaer / @BaerKlondike

10/13/2019 at 04:54PM

76
#415 - Nala Nil / @nala_nil

02/12/2020 at 03:55PM

78
#416 - Ozzy Walsh / @Novigradian

08/02/2019 at 09:22AM

140
#417 - Martin Huter / @marhat87

02/05/2020 at 12:16PM

149
#418 - Cnetwork / @WShuguang

11/08/2019 at 07:40AM

203
#419 - Urbanovics Péter / @UrbanovicsP

08/22/2019 at 11:03AM