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):
19
#181 - Robberechts Arne / @ArneRobberechts

06/14/2020 at 07:17PM

19
#182 - smlbrngr / @smlbrngr

06/15/2020 at 06:43PM

19
#183 - speisz / @speiszc

06/27/2020 at 11:01PM

19
#184 - mocihan / @mocihan

06/29/2020 at 03:04PM

19
#185 - Alexandre MERLIN / @AlxMerlin

07/03/2020 at 07:35AM

19
#186 - Mitchell Horning / @HorningMitchell

07/07/2020 at 02:27PM

19
#187 - 大矢元海 / @008Genkai

07/07/2020 at 08:47PM

19
#188 - PK / @pkeugine

07/15/2020 at 02:21PM

19
#189 - Виталий Макаров / @avada_keda_bra

07/24/2020 at 03:55PM

19
#190 - GenericHardwareGamer / @GnrikHrdwrGamer

08/06/2020 at 10:20PM

19
#191 - Theo Sarrazin / @tshaero

08/20/2020 at 06:56AM

19
#192 - AAbraxas / @AAbraxas1

10/13/2020 at 08:19PM

19
#193 - quemeraisc / @quemeraisc

11/23/2020 at 01:42PM

19
#194 - hepebexè / @hepebexe

11/28/2020 at 08:38PM

19
#195 - chocolate / @chocola81394123

01/06/2021 at 07:05AM

20
#196 - Derek Schrock / @derekschrock

07/19/2019 at 02:34AM

20
#197 - Bradley M. Small / @BradleySmall

07/19/2019 at 03:16AM

20
#198 - mrrdl / @mrrdl5

07/19/2019 at 08:50PM

20
#199 - garry quested / @GQuested

07/20/2019 at 12:38PM

20
#200 - Jon Miller / @jmillxyz

07/21/2019 at 06:45PM

20
#201 - vana / @vana15129217

07/22/2019 at 11:35AM

20
#202 - Walker Boh / @walker_boh

07/22/2019 at 12:37PM

20
#203 - John Contad! / @JohnContad

07/25/2019 at 06:34AM

20
#204 - Jonathan Browning / @yungjig90

07/30/2019 at 12:12AM

20
#205 - matthew brett / @matthewbrett

08/07/2019 at 04:42AM

20
#206 - André Reigoto / @AndreReigoto

08/08/2019 at 02:46AM

20
#207 - Peter Demin / @peterdemin

08/08/2019 at 05:37PM

20
#208 - averageRandomPerson / @averageRandomP1

08/26/2019 at 12:06AM

20
#209 - lucca augusto / @LuccaAugusto6

10/05/2019 at 04:57PM

20
#210 - Michał Łowicki / @mlowicki

10/05/2019 at 09:26PM