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

344 active golfers, 1364 entries

Leaderboard (lowest score wins):
23
#211 - Christopher Weyand / @swordman378

08/21/2019 at 01:10PM

23
#212 - VeeDeltaVee / @VeeDeltaVee

08/24/2019 at 06:04PM

23
#213 - Preetham Maiya / @PreethamMaiya

08/25/2019 at 03:48PM

23
#214 - Iggy / @iggredible

09/12/2019 at 03:17AM

23
#215 - ^spew$ / @spew79241369

10/12/2019 at 10:09PM

23
#216 - Alex Emelianov / @AlexEmelianov3

10/21/2019 at 04:23AM

23
#217 - xiote / @xiote2

11/13/2019 at 11:19AM

23
#218 - Minyi Zhong / @minyi_zhong

11/22/2019 at 06:57AM

23
#219 - zigford / @zigford_org

12/05/2019 at 11:49AM

23
#220 - Andrei Popescu / @AndreiTheory

12/09/2019 at 05:29PM

23
#221 - Daniel Latzer / @tournqat

12/19/2019 at 01:59PM

23
#222 - Moye_ / @moye_

01/06/2020 at 11:01PM

23
#223 - Gytis Vinclovas / @GytisVinclovas

01/17/2020 at 02:48PM

23
#224 - Renns / @Renns95250521

02/08/2020 at 10:11AM

24
#225 - Isaak Meier / @IsaakMeier

08/02/2019 at 03:29PM

24
#226 - Luiz Eduardo Amaral / @_luxedo

08/09/2019 at 05:49PM

24
#227 - freehaha / @freehaha

08/28/2019 at 04:25AM

24
#228 - Scott Rosenquist / @scottrosenquist

10/18/2019 at 01:33PM

24
#229 - MasterFox / @MaestroZorro_

10/22/2019 at 12:56PM

24
#230 - Kevin Yokley / @kyokley19

11/03/2019 at 05:48PM

24
#231 - Magnus / @praktiskt

11/17/2019 at 05:51PM

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

01/27/2020 at 07:09AM

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

02/04/2020 at 12:49PM

24
#234 - Falafel Palapel / @falafelpalapel

02/12/2020 at 08:30PM

25
#235 - Prabhakar Kumar / @prab97

07/19/2019 at 10:09PM

25
#236 - Nik Skoufis / @niksko

07/25/2019 at 01:50AM

25
#237 - Matt Vaughn / @mattttvaughn

07/28/2019 at 11:20PM

25
#238 - Masi Valkonen / @masivalkonen

08/27/2019 at 10:04PM

25
#239 - whale / @Hari84444713

01/11/2020 at 08:01PM

26
#240 - Not real / @Notreal70353016

07/23/2019 at 04:04AM