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

345 active golfers, 1366 entries

Leaderboard (lowest score wins):
20
#151 - arsi arola / @mos_kiitto

10/18/2019 at 10:45AM

20
#152 - Saher El-Neklawy / @saherneklawy

10/22/2019 at 11:54AM

20
#153 - Lory / @Lory46845742

10/29/2019 at 03:33PM

20
#154 - Chris Covert / @covertcj

11/07/2019 at 03:43PM

20
#155 - fritz_carraldo / @fritz_carraldo

11/10/2019 at 11:12PM

20
#156 - Ebi / @ehan6

11/18/2019 at 09:47AM

20
#157 - 990 / @nisibasi990

12/03/2019 at 03:00PM

20
#158 - vim_golfer_1 / @vimgolfer12

12/05/2019 at 08:50AM

20
#159 - King Kang / @nobagtravel

12/11/2019 at 10:08AM

20
#160 - hokonch / @hokonch

12/24/2019 at 05:31PM

20
#161 - None / @sh1chuang

12/30/2019 at 11:20AM

20
#162 - Marius Jurgelenas / @MarenasLT

01/17/2020 at 02:48PM

20
#163 - Sander Vanhove / @SanderVhove

02/06/2020 at 10:22AM

20
#164 - stretchy / @stretch11013132

02/17/2020 at 03:36AM

21
#165 - Jason O'Brien / @jasonobrien

07/23/2019 at 04:36PM

21
#166 - Percelot / @percelot

07/24/2019 at 02:12PM

21
#167 - albalitz / @_albalitz

08/01/2019 at 07:49AM

21
#168 - forvimgolf / @forvimgolf2

08/01/2019 at 08:16PM

21
#169 - Ivo Blöchliger / @aigledesalpes

08/01/2019 at 08:21PM

21
#170 - Chris Shorrock / @EbinFlow

08/13/2019 at 04:50PM

21
#171 - Ralph Callaway / @RalphAtCCC

08/19/2019 at 08:23PM

21
#172 - Simon Wilkinson / @simondwilkinson

08/24/2019 at 02:03PM

21
#173 - theBecwar / @thebecwar

08/25/2019 at 05:54PM

21
#174 - Ariel Miculas / @ArielMiculas

09/18/2019 at 03:15PM

21
#175 - Daniel Beck / @daniel_beck_il

09/22/2019 at 01:21PM

21
#176 - Lorenzo Bertolino / @lo_bertolino

10/09/2019 at 04:03PM

21
#177 - Jörg Meyer / @JoergMy

10/19/2019 at 09:06PM

21
#178 - Scott Taylor / @scott11X8

10/26/2019 at 02:22AM

21
#179 - Max Coplan / @mchcopl

11/03/2019 at 11:41PM

21
#180 - Mike Deakin / @Mick_Deak

11/20/2019 at 02:12PM