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

326 active golfers, 1314 entries

Leaderboard (lowest score wins):
19
#121 - sapir malka / @sapir5522

12/26/2019 at 08:43AM

19
#122 - 임덕윤 / @SnLHUF5ZYJXqI1m

12/26/2019 at 08:26PM

19
#123 - Tefe / @tefetic

01/02/2020 at 09:52PM

19
#124 - caffeineism / @caffeineism

01/06/2020 at 03:49AM

19
#125 - nicosierra / @nicosierra84

01/09/2020 at 08:52PM

19
#126 - lev / @nouvelliu

01/10/2020 at 10:29AM

19
#127 - mowglian / @mowglian

01/11/2020 at 02:28PM

19
#128 - Arijus / @argshook

01/17/2020 at 02:50PM

19
#129 - Karnival K / @K4rnival

01/18/2020 at 08:01PM

19
#130 - Tyler Culdler / @culdler

01/19/2020 at 05:38AM

19
#131 - Rune Warhuus / @DinkDonkNorway

01/22/2020 at 11:29AM

20
#132 - Derek Schrock / @derekschrock

07/19/2019 at 02:34AM

20
#133 - Bradley M. Small / @BradleySmall

07/19/2019 at 03:16AM

20
#134 - mrrdl / @mrrdl5

07/19/2019 at 08:50PM

20
#135 - garry quested / @GQuested

07/20/2019 at 12:38PM

20
#136 - Jon Miller / @jmillxyz

07/21/2019 at 06:45PM

20
#137 - vana / @vana15129217

07/22/2019 at 11:35AM

20
#138 - Walker Boh / @walker_boh

07/22/2019 at 12:37PM

20
#139 - John Contad! / @JohnContad

07/25/2019 at 06:34AM

20
#140 - Jonathan Browning / @yungjig90

07/30/2019 at 12:12AM

20
#141 - matthew brett / @matthewbrett

08/07/2019 at 04:42AM

20
#142 - André Reigoto / @AndreReigoto

08/08/2019 at 02:46AM

20
#143 - Peter Demin / @peterdemin

08/08/2019 at 05:37PM

20
#144 - averageRandomPerson / @averageRandomP1

08/26/2019 at 12:06AM

20
#145 - lucca augusto / @LuccaAugusto6

10/05/2019 at 04:57PM

20
#146 - Michał Łowicki / @mlowicki

10/05/2019 at 09:26PM

20
#147 - arsi arola / @mos_kiitto

10/18/2019 at 10:45AM

20
#148 - Saher El-Neklawy / @saherneklawy

10/22/2019 at 11:54AM

20
#149 - Lory / @Lory46845742

10/29/2019 at 03:33PM

20
#150 - Chris Covert / @covertcj

11/07/2019 at 03:43PM