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

265 active golfers, 1034 entries

Leaderboard (lowest score wins):
25
#181 - Prabhakar Kumar / @prab97

07/19/2019 at 10:09PM

25
#182 - Nik Skoufis / @niksko

07/25/2019 at 01:50AM

25
#183 - Matt Vaughn / @mattttvaughn

07/28/2019 at 11:20PM

25
#184 - Masi Valkonen / @masivalkonen

08/27/2019 at 10:04PM

26
#185 - Not real / @Notreal70353016

07/23/2019 at 04:04AM

26
#186 - band / @band26376522

07/24/2019 at 08:31PM

26
#187 - Matthew Grossman / @GrossmanMr

08/02/2019 at 04:32AM

26
#188 - ARK / @ARK69712394

08/04/2019 at 01:14PM

26
#189 - André Hedesand / @andrehhh

08/07/2019 at 11:28AM

26
#190 - Thomas Versteeg / @versteeg_t

08/21/2019 at 04:52PM

26
#191 - Geert Smelt / @gasmelt

10/11/2019 at 07:50PM

26
#192 - 吴建明 / @pysnow530

11/18/2019 at 11:06AM

27
#193 - Korgan / @Korgan36725554

07/23/2019 at 02:49AM

27
#194 - MiloIgnis / @MiloIgnis

07/24/2019 at 04:36PM

27
#195 - Floyd Gantt / @fgantt

07/26/2019 at 07:02PM

27
#196 - Colby Brown / @colbyabrown

07/29/2019 at 07:07PM

27
#197 - さ / @opocopoco

08/05/2019 at 04:04AM

27
#198 - Ben Allan / @hellobenallan

08/19/2019 at 01:48PM

27
#199 - José / @AngelGaldamez

08/25/2019 at 02:02PM

27
#200 - Jonathan Medwig / @jmedwig

10/08/2019 at 09:22PM

27
#201 - Jonas Marcus / @JonasMarcus1

10/16/2019 at 08:00PM

27
#202 - Ahmed / @Ahmed16460759

10/21/2019 at 10:34AM

28
#203 - Harsha Nadimpalli / @Harsha_live

07/31/2019 at 06:06AM

28
#204 - John / @JohnJDoe2

07/31/2019 at 10:09AM

28
#205 - Chad Harris / @chad__harris

08/07/2019 at 01:01AM

28
#206 - Hector Davensburg / @hdavensburg

08/13/2019 at 09:34PM

28
#207 - Max Williams / @notmaxbutmax

10/15/2019 at 11:00PM

29
#208 - Charlie OConor / @charlieoconor

07/19/2019 at 07:09PM

29
#209 - antónio miranda / @ammutable

08/07/2019 at 09:29PM

29
#210 - Matt Tuttle / @Matt_Tuttle

08/09/2019 at 11:57PM