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

212 active golfers, 783 entries

Leaderboard (lowest score wins):
19
#1 - Malcolm Sharpe / @blueblimpms

07/19/2019 at 02:39AM

19
#2 - Norbert / @mullno

07/19/2019 at 05:05AM

19
#3 - Jon Krause / @jkrause314

07/19/2019 at 06:01AM

19
#4 - Saki Gw / @Sakigw

07/19/2019 at 06:55AM

19
#5 - Jan Bundesmann / @janbundesmann

07/19/2019 at 07:58AM

19
#6 - Neil Struthers / @struthersneil

07/19/2019 at 08:41AM

19
#7 - Smylers / @Smylers2

07/19/2019 at 09:09AM

19
#8 - Tinko Minko / @tandikula

07/19/2019 at 07:10PM

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

07/19/2019 at 08:58PM

19
#10 - taka / @takaoutputblog

07/20/2019 at 01:20AM

19
#11 - Jure Zbontar / @jure_zbontar

07/20/2019 at 03:01AM

19
#12 - Rahul Dhir / @RahulDhir300

07/20/2019 at 05:03AM

19
#13 - Bence Nagy / @underyx

07/20/2019 at 09:27AM

19
#14 - Manan Khattar / @KhattarManan

07/20/2019 at 09:47AM

19
#15 - Hxhxhrra / @hxhxhrra

07/20/2019 at 06:11PM

19
#16 - james_bunch / @james_bunch

07/21/2019 at 05:21AM

19
#17 - asdkljsadladlaldcxmzwqewq / @asdkljsadladla1

07/21/2019 at 07:19AM

19
#18 - Matt Donahoe / @mdonahoe

07/21/2019 at 07:54AM

19
#19 - heppen / @heppen_He

07/21/2019 at 08:45AM

19
#20 - Miłosz Łakomy / @foobar01123

07/21/2019 at 09:00AM

19
#21 - Calum Halpin / @calumhalpin

07/21/2019 at 06:27PM

19
#22 - fisch@emacs / @WingsORC

07/21/2019 at 08:20PM

19
#23 - mkaminaga / @mkmng3

07/22/2019 at 07:05AM

19
#24 - Chester Yap / @Chest_ErYap

07/22/2019 at 11:49AM

19
#25 - Joe Fahnestock🌵 / @Joecupojoe

07/22/2019 at 04:42PM

19
#26 - grantopher orange / @grantopher

07/22/2019 at 09:57PM

19
#27 - Fan Zhang / @ffanzhang

07/23/2019 at 07:11AM

19
#28 - BaffaloP 🐃🎨 / @bbaffalopp

07/23/2019 at 09:25PM

19
#29 - Matt / @m4tty1c3

07/25/2019 at 07:12PM

19
#30 - Zhenkai W. / @Zhenkai_W

07/26/2019 at 04:20PM