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

265 active golfers, 1034 entries

Leaderboard (lowest score wins):
22
#151 - vim_ninja / @NinjaVim

08/25/2019 at 11:13PM

22
#152 - will / @willpnw

09/04/2019 at 03:01AM

22
#153 - Benjamin Pelletier / @benjipelletier

09/24/2019 at 02:14PM

22
#154 - Devistator / @Devistator5

10/08/2019 at 10:18AM

22
#155 - Jonathan Eidsness / @jonathaneidsnes

10/09/2019 at 04:25PM

22
#156 - Alex Schultz / @Pumpkinhead002

10/17/2019 at 02:55PM

22
#157 - s3n a6n / @0x12b

10/18/2019 at 10:29PM

22
#158 - yawryck / @yawryck

10/22/2019 at 01:44AM

22
#159 - Robert Clark / @rsclark2

10/25/2019 at 06:31PM

22
#160 - Harrison / @ardentcow

10/31/2019 at 03:18AM

22
#161 - mogitate / @mutemeat

11/14/2019 at 01:57PM

23
#162 - Scott Schlesier / @sschlesier

07/21/2019 at 03:49AM

23
#163 - pjoe / @pjoe

07/21/2019 at 03:51PM

23
#164 - Clint Caudle / @ClintCaudle

07/22/2019 at 02:38AM

23
#165 - tllilleh / @tllilleh

07/25/2019 at 08:55PM

23
#166 - Paul Inc / @hiniol1982

08/14/2019 at 06:50PM

23
#167 - Christopher Weyand / @swordman378

08/21/2019 at 01:10PM

23
#168 - VeeDeltaVee / @VeeDeltaVee

08/24/2019 at 06:04PM

23
#169 - Preetham Maiya / @PreethamMaiya

08/25/2019 at 03:48PM

23
#170 - Iggy / @iggredible

09/12/2019 at 03:17AM

23
#171 - ^spew$ / @spew79241369

10/12/2019 at 10:09PM

23
#172 - Alex Emelianov / @AlexEmelianov3

10/21/2019 at 04:23AM

23
#173 - xiote / @xiote2

11/13/2019 at 11:19AM

24
#174 - Isaak Meier / @IsaakMeier

08/02/2019 at 03:29PM

24
#175 - Luiz Eduardo Amaral / @_luxedo

08/09/2019 at 05:49PM

24
#176 - freehaha / @freehaha

08/28/2019 at 04:25AM

24
#177 - Scott Rosenquist / @scottrosenquist

10/18/2019 at 01:33PM

24
#178 - MasterFox / @MaestroZorro_

10/22/2019 at 12:56PM

24
#179 - Kevin Yokley / @kyokley19

11/03/2019 at 05:48PM

24
#180 - Magnus / @praktiskt

11/17/2019 at 05:51PM