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

448 active golfers, 1778 entries

Leaderboard (lowest score wins):
10
#1 - Kaustubh Murumkar / @k_austub_h

09/25/2020 at 11:19PM

18
#2 - akouryy / @akouryy1

09/15/2020 at 04:58AM

18
#3 - John Braxler / @braxler

09/15/2020 at 04:27PM

18
#4 - dezhonger / @dezhonger

09/17/2020 at 04:06PM

18
#5 - Ivan Kwong / @IvanKwong5

09/26/2020 at 05:37PM

18
#6 - 刘宏亮 / @CoyAkey

09/27/2020 at 03:18AM

18
#7 - Brendan Schaenzer / @bschaenzer

09/29/2020 at 10:35PM

18
#8 - mstronam / @mstronam

10/02/2020 at 10:23AM

18
#9 - lamtt77 / @lamtt77

10/09/2020 at 05:31AM

18
#10 - The Valencian Dev / @thevalenciandev

10/12/2020 at 01:23PM

18
#11 - Alice / @Alice92541388

10/19/2020 at 10:46PM

18
#12 - Leland Paul Kusmer / @lelandpaul

10/22/2020 at 02:22PM

19
#13 - Malcolm Sharpe / @blueblimpms

07/19/2019 at 02:39AM

19
#14 - Norbert / @mullno

07/19/2019 at 05:05AM

19
#15 - Jon Krause / @jkrause314

07/19/2019 at 06:01AM

19
#16 - Saki Gw / @Sakigw

07/19/2019 at 06:55AM

19
#17 - Jan Bundesmann / @janbundesmann

07/19/2019 at 07:58AM

19
#18 - Neil Struthers / @struthersneil

07/19/2019 at 08:41AM

19
#19 - Smylers / @Smylers2

07/19/2019 at 09:09AM

19
#20 - Tinko Minko / @tandikula

07/19/2019 at 07:10PM

19
#21 - Jonáš Šerých / @serycjon

07/19/2019 at 08:58PM

19
#22 - taka / @takaoutputblog

07/20/2019 at 01:20AM

19
#23 - Jure Zbontar / @jure_zbontar

07/20/2019 at 03:01AM

19
#24 - Rahul Dhir / @RahulDhir300

07/20/2019 at 05:03AM

19
#25 - Bence Nagy / @underyx

07/20/2019 at 09:27AM

19
#26 - Manan Khattar / @KhattarManan

07/20/2019 at 09:47AM

19
#27 - Hxhxhrra / @hxhxhrra

07/20/2019 at 06:11PM

19
#28 - james_bunch / @james_bunch

07/21/2019 at 05:21AM

19
#29 - asdkljsadladlaldcxmzwqewq / @asdkljsadladla1

07/21/2019 at 07:19AM

19
#30 - Matt Donahoe / @mdonahoe

07/21/2019 at 07:54AM