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 4d4ab047795d626036000034

imports alignment (python)

Align as one import per line.

Start file
from random import randint, uniform, shuffle, sample
from math import ceil, pow
End file
from random import randint
from random import uniform
from random import shuffle
from random import sample
from math import ceil
from math import pow

View Diff

1,2c1,6
< from random import randint, uniform, shuffle, sample
< from math import ceil, pow
---
> from random import randint
> from random import uniform
> from random import shuffle
> from random import sample
> from math import ceil
> from math import pow

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 190 remaining solutions by signing in and submitting your own entry
#191 Misha (Mike) Granin / @Granin - Score: 91 - 04/28/11 @ 13:14
v3wy"+<CR>Mac OS X clipboard sharing<Up>uu<Esc>u<Left>vwww"*y:%s/, /\rfrom random import r<BS>/g<CR>wcwmath<Esc>:wq<CR>

0 comments


Created by: @vimgolfer

191 active golfers, 640 entries

Leaderboard (lowest score wins):
24
#121 - qed / @qed13308565

07/26/2018 at 02:43AM

25
#122 - Jacob Vosmaer / @jacobvosmaer

06/04/2012 at 08:12PM

25
#123 - Skúli Jóhannsson / @skulibj

06/28/2015 at 08:56PM

26
#124 - Thomas Schönwälder / @Masei1988

02/04/2011 at 07:34PM

26
#125 - Kevin Hamer / @khamer

02/04/2011 at 09:11PM

26
#126 - Yannis Chatzimichos / @feedward

07/06/2011 at 05:17PM

26
#127 - Daniel Lundin / @danielundin

12/26/2011 at 11:34PM

26
#128 - Gurukandhamoorthi / @Gurukandhamoor1

07/24/2017 at 04:01PM

26
#129 - shahanavaz m / @shahanavazm

02/20/2022 at 02:42AM

27
#130 - Mark Smith-Guerrero / @msmithgu

02/10/2011 at 10:22PM

27
#131 - Nicola Paolucci / @durdn

02/25/2011 at 08:03PM

27
#132 - Eivind Jahren / @HaskellElephant

03/23/2011 at 10:28PM

27
#133 - cj / @cj01101

08/21/2013 at 03:58AM

27
#134 - brett / @brettyukich

09/22/2013 at 09:21PM

27
#135 - Tyler / @tylerbindon

10/23/2013 at 03:23AM

27
#136 - we’re going to need a bigger bot / @assaflavie

04/28/2015 at 06:21PM

28
#137 - Zak Johnson / @zakj

04/21/2011 at 03:01AM

28
#138 - spriggo / @spriggo

05/01/2011 at 05:32AM

28
#139 - 無ん垢の叫び / @john_ababa

02/27/2012 at 08:21AM

28
#140 - DHM / @DHM29978992

05/01/2018 at 02:08AM

29
#141 - Ash Searle / @hexmen

03/13/2011 at 05:56PM

29
#142 - Martin Desrosiers / @mdesrosiers

02/21/2012 at 06:57AM

29
#143 - David Goonja / @davidgoonja

08/10/2013 at 05:42AM

30
#144 - Matthieu Honel / @ocus

02/03/2011 at 10:06PM

30
#145 - Toto l'haricot / @nico_le_terribl

02/05/2011 at 01:10PM

30
#146 - ajh / @AlexJHammel

12/23/2012 at 02:58PM

30
#147 - かしゅーなっつ@修行中 / @kashew_nuts

08/02/2014 at 07:53AM

30
#148 - Justin Knag / @justinknag

09/16/2014 at 06:07AM

30
#149 - ltn614 / @ltn614

09/24/2015 at 09:49AM

30
#150 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 05:03PM