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):
24
#331 - Daniel Habib / @danielhvs

07/21/2020 at 03:15AM

24
#332 - roy twt / @roytwt1

10/18/2020 at 12:28PM

24
#333 - Kapildev Neupane / @KapildevNeupane

01/01/2021 at 02:28PM

25
#334 - Prabhakar Kumar / @prab97

07/19/2019 at 10:09PM

25
#335 - Nik Skoufis / @niksko

07/25/2019 at 01:50AM

25
#336 - Matt Vaughn / @mattttvaughn

07/28/2019 at 11:20PM

25
#337 - Masi Valkonen / @masivalkonen

08/27/2019 at 10:04PM

25
#338 - Rustem B. / @_rustemb

07/31/2020 at 06:51PM

25
#339 - mindgitrwx / @mindgitrwx

08/03/2020 at 01:33PM

25
#340 - Edan Sneh / @edan_sneh

09/04/2020 at 06:31PM

26
#341 - Not real / @Notreal70353016

07/23/2019 at 04:04AM

26
#342 - band / @band26376522

07/24/2019 at 08:31PM

26
#343 - Matthew Grossman / @GrossmanMr

08/02/2019 at 04:32AM

26
#344 - ARK / @ARK69712394

08/04/2019 at 01:14PM

26
#345 - André Hedesand / @andrehhh

08/07/2019 at 11:28AM

26
#346 - Thomas Versteeg / @versteeg_t

08/21/2019 at 04:52PM

26
#347 - Geert Smelt / @gasmelt

10/11/2019 at 07:50PM

26
#348 - pysnow530 / @pysnow530

11/18/2019 at 11:06AM

26
#349 - Lion de Bell / @CLGBamboo

11/30/2019 at 11:09PM

26
#350 - ace_of_art_club / @aceofartclub1

12/17/2019 at 05:25PM

26
#351 - かぎりん / @kagilinn

03/02/2020 at 01:24AM

26
#352 - Sean Dewar / @seandewar

03/13/2020 at 03:47PM

27
#353 - Korgan / @Korgan36725554

07/23/2019 at 02:49AM

27
#354 - MiloIgnis / @MiloIgnis

07/24/2019 at 04:36PM

27
#355 - Floyd Gantt / @fgantt

07/26/2019 at 07:02PM

27
#356 - Colby Brown / @colbyabrown

07/29/2019 at 07:07PM

27
#357 - さ / @opocopoco

08/05/2019 at 04:04AM

27
#358 - Ben Allan / @hellobenallan

08/19/2019 at 01:48PM

27
#359 - Jonathan Medwig / @jmedwig

10/08/2019 at 09:22PM

27
#360 - Jonas Marcus / @JonasMarcus1

10/16/2019 at 08:00PM