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

230 active golfers, 862 entries

Leaderboard (lowest score wins):
21
#121 - Daniel Beck / @daniel_beck_il

09/22/2019 at 01:21PM

21
#122 - Lorenzo Bertolino / @lo_bertolino

10/09/2019 at 04:03PM

21
#123 - Jörg Meyer / @JoergMy

10/19/2019 at 09:06PM

22
#124 - Jeff Schomay / @jschomay

07/21/2019 at 05:05PM

22
#125 - Maor Leger / @maor_leger

07/21/2019 at 06:25PM

22
#126 - Danny T / @son_of_torkel

07/28/2019 at 09:44PM

22
#127 - Mark / @markfilus

07/29/2019 at 06:05PM

22
#128 - daniel / @daniel31464605

08/12/2019 at 07:36AM

22
#129 - Wistan Chou / @wisty97

08/15/2019 at 02:19AM

22
#130 - vim_ninja / @NinjaVim

08/25/2019 at 11:13PM

22
#131 - will / @willpnw

09/04/2019 at 03:01AM

22
#132 - Benjamin Pelletier / @benjipelletier

09/24/2019 at 02:14PM

22
#133 - Devistator / @Devistator5

10/08/2019 at 10:18AM

22
#134 - Jonathan Eidsness / @jonathaneidsnes

10/09/2019 at 04:25PM

22
#135 - Alex Schultz / @Pumpkinhead002

10/17/2019 at 02:55PM

22
#136 - s3n a6n / @0x12b

10/18/2019 at 10:29PM

23
#137 - Scott Schlesier / @sschlesier

07/21/2019 at 03:49AM

23
#138 - pjoe / @pjoe

07/21/2019 at 03:51PM

23
#139 - Clint Caudle / @ClintCaudle

07/22/2019 at 02:38AM

23
#140 - tllilleh / @tllilleh

07/25/2019 at 08:55PM

23
#141 - Paul Inc / @hiniol1982

08/14/2019 at 06:50PM

23
#142 - Christopher Weyand / @swordman378

08/21/2019 at 01:10PM

23
#143 - VeeDeltaVee / @VeeDeltaVee

08/24/2019 at 06:04PM

23
#144 - Preetham Maiya / @PreethamMaiya

08/25/2019 at 03:48PM

23
#145 - Iggy / @iggredible

09/12/2019 at 03:17AM

23
#146 - ^spew$ / @spew79241369

10/12/2019 at 10:09PM

23
#147 - Alex Emelianov / @AlexEmelianov3

10/21/2019 at 04:23AM

24
#148 - Isaak Meier / @IsaakMeier

08/02/2019 at 03:29PM

24
#149 - Luiz Eduardo Amaral / @_luxedo

08/09/2019 at 05:49PM

24
#150 - freehaha / @freehaha

08/28/2019 at 04:25AM