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 5fa95fbdd285680008e41e4b

swap number pairs

Swap the numbers in a bunch of 2-element arrays.

Start file
[2, 1], [5, 4]
[6, 3]
[7, 4]
[8, 2], [12, 11]
End file
[1, 2], [4, 5]
[3, 6]
[4, 7]
[2, 8], [11, 12]

View Diff

1,4c1,4
< [2, 1], [5, 4]
< [6, 3]
< [7, 4]
< [8, 2], [12, 11]
---
> [1, 2], [4, 5]
> [3, 6]
> [4, 7]
> [2, 8], [11, 12]

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 357 remaining solutions by signing in and submitting your own entry
#358 Khalin George / @Khalin_George - Score: 116 - 12/02/20 @ 18:42
<Right><Left>]ewwweWWv<Esc><Esc>bbbbbbbvllxpx<Left>x<Left>i, <Esc>:w<CR>wlllllr4<Right><Right><Right>45r5<Left><Right>5<Down><Up><Up><Up>r5<Left><Right>r5jhhhhr3lllr6jr7jkhhhr4jr2lllljhr8llllllr1llllr2<Esc>:wq<CR>

0 comments


#359 藤田拓郎 / @FujitaTakuro - Score: 116 - 05/23/21 @ 11:30
l<C-V>3l4jhxlpuhp<C-V>4jlI, <Esc>;lll<C-V>lljhjjxllllLjhk1jhjjkkk;;;;lllllllll<C-V>llxlPlxxhi, <Esc>Gwwwwwl<C-V>llllxu<C-V>lllxllp<C-U>uPi, l<BS><Esc>lllxx:wq<CR>

0 comments


Created by: @wedesoft

359 active golfers, 1945 entries

Leaderboard (lowest score wins):
32
#241 - __VimGolfer__ / @VimGolfer19

11/30/2020 at 11:56AM

32
#242 - ‎ً / @zanzb

11/30/2020 at 07:11PM

32
#243 - Petru-Armand Bancila / @petruarmand

12/01/2020 at 06:36PM

32
#244 - nd183 / @nd1832

12/03/2020 at 12:25PM

32
#245 - justinhj / @justinhj

12/15/2020 at 06:55AM

32
#246 - yxke / @_yxke

01/14/2021 at 09:21AM

32
#247 - JingChen / @ilovejingle

01/18/2021 at 06:17AM

32
#248 - Josh Swift / @Swiftyfish14

01/26/2021 at 06:00PM

32
#249 - Sylvain Dangin / @Sylvaner03

05/18/2021 at 07:21PM

32
#250 - Ryan Cleary / @ry_guy41

12/14/2021 at 01:06AM

32
#251 - Simon / @mopsdiv

12/14/2021 at 10:19PM

32
#252 - Ken / @kenc_

01/20/2022 at 06:46AM

32
#253 - 우정민 / @jeongmin2021

10/02/2022 at 07:58PM

32
#254 - Yāsky / @Yaasky

01/17/2023 at 07:55PM

32
#255 - sap / @sap38838304

06/09/2023 at 07:13AM

32
#256 - Olivier Bégassat / @zk_evm

06/11/2023 at 02:58PM

32
#257 - Flimsy Giraffe / @flimsy_giraffe

10/04/2023 at 07:34PM

33
#258 - Riley John Gibbs / @RileyJohnGibbs

11/20/2020 at 11:35PM

33
#259 - Norman Liu / @normanwliu

12/06/2020 at 06:16AM

33
#260 - Bharath / @Bharath15952517

12/12/2020 at 03:04PM

33
#261 - John Smith / @JohnSmi38307095

03/19/2021 at 02:21PM

33
#262 - Siddharth Murali / @SidTweetsALess

06/25/2022 at 03:23PM

34
#263 - Jonathan Ketner / @Chariotrunner

12/03/2020 at 01:46AM

34
#264 - said / @said13664960

12/16/2020 at 03:24PM

34
#265 - Marcin Dostojewski / @MarcinekAGH

01/10/2021 at 02:55PM

34
#266 - Martin LOUAZEL / @Zbrahark

02/18/2021 at 07:56AM

34
#267 - Vgrbwat / @vgrbwat

06/03/2021 at 03:57AM

34
#268 - François / @mortyZZ

08/01/2021 at 05:41PM

34
#269 - Yochem van Rosmalen / @yoch3m

01/31/2022 at 12:09PM

34
#270 - Joe Bushi / @joebushi

12/01/2022 at 07:49PM