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

260 active golfers, 1012 entries

Leaderboard (lowest score wins):
30
#211 - nebbii / @nebbii_

09/26/2019 at 03:28PM

31
#212 - Mr_Djez / @DjezMr

08/05/2019 at 11:19AM

31
#213 - Stefan Krist / @nerdyness_sk

08/20/2019 at 08:36PM

31
#214 - Oleg Skillup / @skill_up

08/23/2019 at 06:27PM

31
#215 - ENSORIZATION / @ensorization

11/01/2019 at 10:53PM

32
#216 - Miki Tebeka / @tebeka

07/21/2019 at 07:12AM

32
#217 - Peter Meehan / @22A

07/27/2019 at 04:51PM

32
#218 - Enoch / @_enocht

07/29/2019 at 06:01AM

32
#219 - HMSBoaty / @HMS_Boaty

08/08/2019 at 12:02PM

32
#220 - JS / @jjohsan

08/27/2019 at 10:48AM

33
#221 - mmaorc / @mmaorc1

07/20/2019 at 11:46AM

33
#222 - andresote / @andresote

07/20/2019 at 10:18PM

33
#223 - Lukas Stratmann / @Lumpiluk

08/07/2019 at 01:25PM

33
#224 - Josefina Alconada / @jochiAlconada

10/03/2019 at 10:53AM

34
#225 - joseph.cheng / @josephc89207523

07/20/2019 at 05:54AM

34
#226 - Ohan / @Br0han

07/30/2019 at 04:23AM

34
#227 - Viktor Fukala / @FukalaViktor

07/30/2019 at 10:27AM

34
#228 - Mike Hourahine / @mhourahine

08/11/2019 at 09:43PM

35
#229 - Bob Ren / @bobrenjc93

07/20/2019 at 02:16AM

35
#230 - wwilkins / @wwilkins

07/23/2019 at 09:40PM

36
#231 - abgold / @abgold43461328

09/04/2019 at 02:37AM

36
#232 - Gunnar Thoreson / @ThReGgOn

09/05/2019 at 12:43PM

38
#233 - blub / @agorilladriving

08/27/2019 at 12:13PM

39
#234 - FreeTheBSD / @FreeTheBSD

07/20/2019 at 02:29AM

39
#235 - crokobit / @crokobit11

07/27/2019 at 03:38AM

39
#236 - Temp / @San5nom

09/25/2019 at 06:20PM

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

08/09/2019 at 06:42PM

40
#238 - Whitelea / @CloudPaal

08/12/2019 at 07:53AM

40
#239 - Ivan / @SpiritHNTR

09/03/2019 at 06:15PM

41
#240 - Victor Litvin / @litvin_victor

07/20/2019 at 08:53PM