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

473 active golfers, 1864 entries

Leaderboard (lowest score wins):
31
#391 - Oleg Skillup / @skill_up

08/23/2019 at 06:27PM

31
#392 - ENSORIZATION / @ensorization

11/01/2019 at 10:53PM

31
#393 - Jose Javier Gonzalez / @jjgort

12/30/2019 at 02:03AM

31
#394 - Sebastien Nicoud / @sebnukem

01/04/2020 at 11:32PM

31
#395 - Bitt Faulk / @bittfaulk

03/16/2020 at 07:08PM

31
#396 - Алексей Кашуба / @Alex_Kashuba

04/02/2020 at 11:26PM

32
#397 - Miki Tebeka / @tebeka

07/21/2019 at 07:12AM

32
#398 - Peter Meehan / @22A

07/27/2019 at 04:51PM

32
#399 - Enoch / @_enocht

07/29/2019 at 06:01AM

32
#400 - HMSBoaty / @HMS_Boaty

08/08/2019 at 12:02PM

32
#401 - JS / @jjohsan

08/27/2019 at 10:48AM

32
#402 - Ageless O₂ Absorber / @dr_barnowl

12/16/2019 at 06:20PM

32
#403 - John Kevin Estrella / @kevsestrella

01/07/2020 at 03:09PM

32
#404 - Halfdan S. Bechmann / @HalfdanIsLame

01/14/2020 at 03:56PM

32
#405 - Rob Pilling / @bobrippling

04/23/2020 at 09:33AM

32
#406 - abhijeet patil / @abhijeetptl5

09/03/2020 at 12:43PM

32
#407 - jksnapp / @jksnapp2

12/21/2020 at 02:51AM

33
#408 - mmaorc / @mmaorc1

07/20/2019 at 11:46AM

33
#409 - andresote / @andresote

07/20/2019 at 10:18PM

33
#410 - Lukas Stratmann / @Lumpiluk

08/07/2019 at 01:25PM

33
#411 - Josefina Alconada / @jochiAlconada

10/03/2019 at 10:53AM

33
#412 - Aaron / @_Lordofthevoid_

12/17/2019 at 05:39PM

33
#413 - JimmyGymglish / @JGymglish

12/27/2019 at 03:52PM

33
#414 - volandkit / @volandkit

04/20/2020 at 05:30PM

34
#415 - joseph.cheng / @josephc89207523

07/20/2019 at 05:54AM

34
#416 - Ohan / @Br0han

07/30/2019 at 04:23AM

34
#417 - Viktor Fukala / @FukalaViktor

07/30/2019 at 10:27AM

34
#418 - Mike Hourahine / @mhourahine

08/11/2019 at 09:43PM

34
#419 - meow / @xckodut

12/29/2019 at 06:36PM

34
#420 - DosLin / @hidoslin

01/21/2020 at 07:31AM