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

420 active golfers, 1667 entries

Leaderboard (lowest score wins):
19
#151 - RaylanFox / @RaylanFox

04/06/2020 at 08:24AM

19
#152 - mury liang / @muryliang

04/07/2020 at 02:14PM

19
#153 - edvrds / @edvrds

04/13/2020 at 07:08PM

19
#154 - Moatvald / @moatvald

04/15/2020 at 05:37PM

19
#155 - John Sumner / @rjsumner

04/28/2020 at 04:21PM

19
#156 - Arthur Goodman / @ArthurGoodman3

04/29/2020 at 09:42PM

19
#157 - Kevin Keefe / @KevinKeefe5

05/20/2020 at 04:30PM

19
#158 - 于吉星 / @fishermryn

05/23/2020 at 12:21PM

19
#159 - samet ぷ / @jssamet

05/28/2020 at 02:48PM

19
#160 - Valdimar / @genkobar

06/01/2020 at 08:42AM

19
#161 - Robberechts Arne / @ArneRobberechts

06/14/2020 at 07:17PM

19
#162 - smlbrngr / @smlbrngr

06/15/2020 at 06:43PM

19
#163 - speisz / @speiszc

06/27/2020 at 11:01PM

19
#164 - mocihan / @mocihan

06/29/2020 at 03:04PM

19
#165 - Alexandre MERLIN / @AlxMerlin

07/03/2020 at 07:35AM

19
#166 - Mitchell Horning / @HorningMitchell

07/07/2020 at 02:27PM

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

07/07/2020 at 08:47PM

19
#168 - PK / @pkeugine

07/15/2020 at 02:21PM

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

07/24/2020 at 03:55PM

19
#170 - GenericHardwareGamer / @GnrikHrdwrGamer

08/06/2020 at 10:20PM

20
#171 - Derek Schrock / @derekschrock

07/19/2019 at 02:34AM

20
#172 - Bradley M. Small / @BradleySmall

07/19/2019 at 03:16AM

20
#173 - mrrdl / @mrrdl5

07/19/2019 at 08:50PM

20
#174 - garry quested / @GQuested

07/20/2019 at 12:38PM

20
#175 - Jon Miller / @jmillxyz

07/21/2019 at 06:45PM

20
#176 - vana / @vana15129217

07/22/2019 at 11:35AM

20
#177 - Walker Boh / @walker_boh

07/22/2019 at 12:37PM

20
#178 - John Contad! / @JohnContad

07/25/2019 at 06:34AM

20
#179 - Jonathan Browning / @yungjig90

07/30/2019 at 12:12AM

20
#180 - matthew brett / @matthewbrett

08/07/2019 at 04:42AM