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

185 active golfers, 664 entries

Leaderboard (lowest score wins):
32
#151 - Peter Meehan / @22A

07/27/2019 at 04:51PM

32
#152 - Enoch / @_enocht

07/29/2019 at 06:01AM

32
#153 - HMSBoaty / @HMS_Boaty

08/08/2019 at 12:02PM

32
#154 - JS / @jjohsan

08/27/2019 at 10:48AM

33
#155 - mmaorc / @mmaorc1

07/20/2019 at 11:46AM

33
#156 - andresote / @andresote

07/20/2019 at 10:18PM

33
#157 - Jonathan Eidsness / @jonathaneidsnes

07/22/2019 at 05:39PM

33
#158 - Lukas Stratmann / @Lumpiluk

08/07/2019 at 01:25PM

34
#159 - joseph.cheng / @josephc89207523

07/20/2019 at 05:54AM

34
#160 - Ohan / @Br0han

07/30/2019 at 04:23AM

34
#161 - Viktor Fukala / @FukalaViktor

07/30/2019 at 10:27AM

34
#162 - Mike Hourahine / @mhourahine

08/11/2019 at 09:43PM

35
#163 - Bob Ren / @bobrenjc93

07/20/2019 at 02:16AM

35
#164 - wwilkins / @wwilkins

07/23/2019 at 09:40PM

36
#165 - abgold / @abgold43461328

09/04/2019 at 02:37AM

36
#166 - Gunnar Thoreson / @ThReGgOn

09/05/2019 at 12:43PM

38
#167 - blub / @agorilladriving

08/27/2019 at 12:13PM

39
#168 - FreeTheBSD / @FreeTheBSD

07/20/2019 at 02:29AM

39
#169 - crokobit / @crokobit11

07/27/2019 at 03:38AM

40
#170 - Nicolas 👨‍💻🇨🇦 / @martinni39

08/09/2019 at 06:42PM

40
#171 - Whitelea / @CloudPaal

08/12/2019 at 07:53AM

40
#172 - Ivan / @SpiritHNTR

09/03/2019 at 06:15PM

41
#173 - Victor Litvin / @litvin_victor

07/20/2019 at 08:53PM

42
#174 - Curtis Chong / @curtischong5

08/17/2019 at 10:23PM

43
#175 - David Needham / @davidmneedham

07/20/2019 at 02:04AM

43
#176 - Karan Gajwani / @karangb

08/16/2019 at 09:59AM

43
#177 - Bradley Cushing / @bradleycushing

09/08/2019 at 06:14PM

45
#178 - vimgolfacct / @vimgolfacct

07/27/2019 at 01:30PM

49
#179 - Vim Golfer / @VimGolfer6

07/19/2019 at 11:01AM

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

08/02/2019 at 09:22PM