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):
23
#271 - Alex Emelianov / @AlexEmelianov3

10/21/2019 at 04:23AM

23
#272 - xiote / @xiote2

11/13/2019 at 11:19AM

23
#273 - Minyi Zhong / @minyi_zhong

11/22/2019 at 06:57AM

23
#274 - zigford / @zigford_org

12/05/2019 at 11:49AM

23
#275 - Andrei Popescu / @AndreiTheory

12/09/2019 at 05:29PM

23
#276 - Daniel Latzer / @tournqat

12/19/2019 at 01:59PM

23
#277 - Moye_ / @moye_

01/06/2020 at 11:01PM

23
#278 - Gytis Vinclovas / @GytisVinclovas

01/17/2020 at 02:48PM

23
#279 - Renns / @Renns95250521

02/08/2020 at 10:11AM

23
#280 - perTheGolfer / @GolferPer

02/27/2020 at 07:28AM

23
#281 - pady. 🇪🇺 🇩🇪 🇷🇴 / @hundertzwoelf_

05/26/2020 at 02:52PM

23
#282 - Brennan Barker / @BrennanJBarker

07/05/2020 at 03:21AM

24
#283 - Isaak Meier / @IsaakMeier

08/02/2019 at 03:29PM

24
#284 - Luiz Eduardo Amaral / @_luxedo

08/09/2019 at 05:49PM

24
#285 - freehaha / @freehaha

08/28/2019 at 04:25AM

24
#286 - Scott Rosenquist / @scottrosenquist

10/18/2019 at 01:33PM

24
#287 - MasterFox / @MaestroZorro_

10/22/2019 at 12:56PM

24
#288 - Kevin Yokley / @kyokley19

11/03/2019 at 05:48PM

24
#289 - Magnus / @praktiskt

11/17/2019 at 05:51PM

24
#290 - 鏡崎ましろ / @KagamisakiMsr

01/27/2020 at 07:09AM

24
#291 - Daniel Amkær Sørensen / @AmkRensen

02/04/2020 at 12:49PM

24
#292 - Falafel Palapel / @falafelpalapel

02/12/2020 at 08:30PM

24
#293 - khedd / @sinan_khedd

07/04/2020 at 01:59PM

24
#294 - Daniel Habib / @danielhvs

07/21/2020 at 03:15AM

25
#295 - Prabhakar Kumar / @prab97

07/19/2019 at 10:09PM

25
#296 - Nik Skoufis / @niksko

07/25/2019 at 01:50AM

25
#297 - Matt Vaughn / @mattttvaughn

07/28/2019 at 11:20PM

25
#298 - Masi Valkonen / @masivalkonen

08/27/2019 at 10:04PM

25
#299 - Rustem B. / @_rustemb

07/31/2020 at 06:51PM

25
#300 - mindgitrwx / @mindgitrwx

08/03/2020 at 01:33PM