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):
22
#241 - Mark / @markfilus

07/29/2019 at 06:05PM

22
#242 - daniel / @daniel31464605

08/12/2019 at 07:36AM

22
#243 - Wistan Chou / @wisty97

08/15/2019 at 02:19AM

22
#244 - vim_ninja / @NinjaVim

08/25/2019 at 11:13PM

22
#245 - will / @willpnw

09/04/2019 at 03:01AM

22
#246 - Benjamin Pelletier / @benjipelletier

09/24/2019 at 02:14PM

22
#247 - Devistator / @Devistator5

10/08/2019 at 10:18AM

22
#248 - Jonathan Eidsness / @jonathaneidsnes

10/09/2019 at 04:25PM

22
#249 - Alex Schultz / @Pumpkinhead002

10/17/2019 at 02:55PM

22
#250 - s3n a6n / @0x12b

10/18/2019 at 10:29PM

22
#251 - yawryck / @yawryck

10/22/2019 at 01:44AM

22
#252 - Robert Clark / @rsclark2

10/25/2019 at 06:31PM

22
#253 - Harrison / @ardentcow

10/31/2019 at 03:18AM

22
#254 - mogitate / @mutemeat

11/14/2019 at 01:57PM

22
#255 - Dan Kilman / @dan_kilman

12/18/2019 at 04:56PM

22
#256 - Ali Kero / @stochastist

02/14/2020 at 07:09AM

22
#257 - Steffen / @Pions90

02/14/2020 at 04:03PM

22
#258 - golferN / @golferN3

02/25/2020 at 09:08PM

22
#259 - José / @AngelGaldamez

03/11/2020 at 02:36AM

22
#260 - Fabian Ahbeck / @FAhbeck

05/08/2020 at 11:46PM

23
#261 - Scott Schlesier / @sschlesier

07/21/2019 at 03:49AM

23
#262 - pjoe / @pjoe

07/21/2019 at 03:51PM

23
#263 - Clint Caudle / @ClintCaudle

07/22/2019 at 02:38AM

23
#264 - tllilleh / @tllilleh

07/25/2019 at 08:55PM

23
#265 - Paul Inc / @hiniol1982

08/14/2019 at 06:50PM

23
#266 - Christopher Weyand / @swordman378

08/21/2019 at 01:10PM

23
#267 - VeeDeltaVee / @VeeDeltaVee

08/24/2019 at 06:04PM

23
#268 - Preetham Maiya / @PreethamMaiya

08/25/2019 at 03:48PM

23
#269 - Iggy / @iggredible

09/12/2019 at 03:17AM

23
#270 - ^spew$ / @spew79241369

10/12/2019 at 10:09PM