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

410 active golfers, 1635 entries

Leaderboard (lowest score wins):
19
#121 - sapir malka / @sapir5522

12/26/2019 at 08:43AM

19
#122 - 임덕윤 / @SnLHUF5ZYJXqI1m

12/26/2019 at 08:26PM

19
#123 - Tefe / @tefetic

01/02/2020 at 09:52PM

19
#124 - caffeineism / @caffeineism

01/06/2020 at 03:49AM

19
#125 - nicosierra / @nicosierra84

01/09/2020 at 08:52PM

19
#126 - lev / @nouvelliu

01/10/2020 at 10:29AM

19
#127 - mowglian / @mowglian

01/11/2020 at 02:28PM

19
#128 - Arijus / @argshook

01/17/2020 at 02:50PM

19
#129 - Karnival K / @K4rnival

01/18/2020 at 08:01PM

19
#130 - Tyler Culdler / @culdler

01/19/2020 at 05:38AM

19
#131 - Rune Warhuus / @DinkDonkNorway

01/22/2020 at 11:29AM

19
#132 - おねさわ / @yama846

02/01/2020 at 02:24PM

19
#133 - jrddp / @jrddp0

02/14/2020 at 04:48AM

19
#134 - KingYames / @JamesZeHunter

02/17/2020 at 06:23AM

19
#135 - howanto / @ho_wan_

02/19/2020 at 09:38PM

19
#136 - Mushan Yang / @mushanyoung

02/26/2020 at 02:03AM

19
#137 - eshel / @EshelBM

02/27/2020 at 03:13PM

19
#138 - whale / @Hari84444713

03/01/2020 at 08:01PM

19
#139 - floyd / @floyd10086

03/02/2020 at 03:12AM

19
#140 - countime / @countime1

03/05/2020 at 04:46AM

19
#141 - Matthew / @Burfield12

03/07/2020 at 11:52AM

19
#142 - エターナル雑魚 / @eternalzako

03/08/2020 at 11:23AM

19
#143 - Paul Parker / @PaulDesmoParker

03/09/2020 at 01:36PM

19
#144 - finn.mertens / @finnmer22139082

03/13/2020 at 12:36AM

19
#145 - せいほう / @FICSQF

03/13/2020 at 03:08AM

19
#146 - Marco / @Marco24456514

03/22/2020 at 12:08PM

19
#147 - majo senf / @majo_senf

03/23/2020 at 02:27PM

19
#148 - antoine mas / @aneomas

03/25/2020 at 11:43AM

19
#149 - bluemartian / @bluemartianz59

03/27/2020 at 07:00PM

19
#150 - Nathan Hartman / @hnathan918

04/02/2020 at 04:30PM