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

343 active golfers, 1361 entries

Leaderboard (lowest score wins):
26
#241 - band / @band26376522

07/24/2019 at 08:31PM

26
#242 - Matthew Grossman / @GrossmanMr

08/02/2019 at 04:32AM

26
#243 - ARK / @ARK69712394

08/04/2019 at 01:14PM

26
#244 - André Hedesand / @andrehhh

08/07/2019 at 11:28AM

26
#245 - Thomas Versteeg / @versteeg_t

08/21/2019 at 04:52PM

26
#246 - Geert Smelt / @gasmelt

10/11/2019 at 07:50PM

26
#247 - pysnow530 / @pysnow530

11/18/2019 at 11:06AM

26
#248 - Lion de Bell / @CLGBamboo

11/30/2019 at 11:09PM

26
#249 - ace_of_art_club / @aceofartclub1

12/17/2019 at 05:25PM

27
#250 - Korgan / @Korgan36725554

07/23/2019 at 02:49AM

27
#251 - MiloIgnis / @MiloIgnis

07/24/2019 at 04:36PM

27
#252 - Floyd Gantt / @fgantt

07/26/2019 at 07:02PM

27
#253 - Colby Brown / @colbyabrown

07/29/2019 at 07:07PM

27
#254 - さ / @opocopoco

08/05/2019 at 04:04AM

27
#255 - Ben Allan / @hellobenallan

08/19/2019 at 01:48PM

27
#256 - José / @AngelGaldamez

08/25/2019 at 02:02PM

27
#257 - Jonathan Medwig / @jmedwig

10/08/2019 at 09:22PM

27
#258 - Jonas Marcus / @JonasMarcus1

10/16/2019 at 08:00PM

27
#259 - Ahmed / @Ahmed16460759

10/21/2019 at 10:34AM

27
#260 - Coby Drexler / @CobyDrexler

12/26/2019 at 05:32PM

27
#261 - Jerry Zhu / @xpost2000games

01/21/2020 at 03:29AM

28
#262 - Harsha Nadimpalli / @Harsha_live

07/31/2019 at 06:06AM

28
#263 - John / @JohnJDoe2

07/31/2019 at 10:09AM

28
#264 - Chad Harris / @chad__harris

08/07/2019 at 01:01AM

28
#265 - Hector Davensburg / @hdavensburg

08/13/2019 at 09:34PM

28
#266 - Max Williams / @notmaxbutmax

10/15/2019 at 11:00PM

29
#267 - Charlie OConor / @charlieoconor

07/19/2019 at 07:09PM

29
#268 - antónio miranda / @ammutable

08/07/2019 at 09:29PM

29
#269 - Matt Tuttle / @Matt_Tuttle

08/09/2019 at 11:57PM

29
#270 - mathias / @mathias55990401

08/11/2019 at 09:46AM