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

477 active golfers, 1881 entries

Leaderboard (lowest score wins):
18
#1 - akouryy / @akouryy1

09/15/2020 at 04:58AM

18
#2 - John Braxler / @braxler

09/15/2020 at 04:27PM

18
#3 - dezhonger / @dezhonger

09/17/2020 at 04:06PM

18
#4 - Ivan Kwong / @IvanKwong5

09/26/2020 at 05:37PM

18
#5 - 刘宏亮 / @CoyAkey

09/27/2020 at 03:18AM

18
#6 - Brendan Schaenzer / @bschaenzer

09/29/2020 at 10:35PM

18
#7 - mstronam / @mstronam

10/02/2020 at 10:23AM

18
#8 - lamtt77 / @lamtt77

10/09/2020 at 05:31AM

18
#9 - The Valencian Dev / @thevalenciandev

10/12/2020 at 01:23PM

18
#10 - Alice / @Alice92541388

10/19/2020 at 10:46PM

18
#11 - Leland Paul Kusmer / @lelandpaul

10/22/2020 at 02:22PM

18
#12 - Miłosz Łakomy / @foobar01123

11/15/2020 at 04:44AM

18
#13 - David Kutschke / @D4KU_

11/15/2020 at 09:34PM

18
#14 - Ihor / @Ihor96382508

12/04/2020 at 09:18AM

18
#15 - Neverlandrunner / @neverlandrunner

12/06/2020 at 09:32AM

18
#16 - roudens / @roudens2

12/06/2020 at 03:09PM

18
#17 - Filipe Brandenburger / @filbranden

12/21/2020 at 04:59AM

18
#18 - pherapont / @pherapont1

12/23/2020 at 07:21AM

18
#19 - 영훈 / @odjfnrtm

12/29/2020 at 03:30PM

18
#20 - Jung Yeon Park / @park_jungy

01/01/2021 at 09:44PM

18
#21 - Andac Safa / @SanDForcE94

01/03/2021 at 03:44PM

18
#22 - Björn Struckmeier / @BjrnStruckmeie1

01/04/2021 at 06:02PM

18
#23 - Ray Dennis / @raysden

01/07/2021 at 11:51PM

18
#24 - Nicolas Pagny / @NicolasPagny

01/08/2021 at 11:21PM

18
#25 - Ravi S Sinha / @ambidextrousTx

01/19/2021 at 11:04PM

18
#26 - Andreas Siegrist / @andreaszwei

01/21/2021 at 08:25PM

18
#27 - 蔡徐坤真是爱吃屎 / @Hashub7

01/22/2021 at 02:23AM

19
#28 - Malcolm Sharpe / @blueblimpms

07/19/2019 at 02:39AM

19
#29 - Norbert / @mullno

07/19/2019 at 05:05AM

19
#30 - Jon Krause / @jkrause314

07/19/2019 at 06:01AM