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.
#105 Avinash Baliga / @avinashbaliga - Score: 32 - 03/25/11 @ 22:55
y3wqqf,i<NL><Del><Del><Esc>Pq2@qj0y3wf,i<NL><Del><Del><Esc>PZZ
0 comments
#106 David Xia / @davidxia_ - Score: 32 - 03/23/12 @ 18:24
y3wqqf,i<CR><Del><Del><Esc>Pq2@qj0y3wf,i<CR><Del><Del><Esc>PZZ
0 comments
#107 bestform / @bestform - Score: 33 - 02/05/11 @ 13:11
:%s/, /\r/g<CR>kqay3wjPqgg@aj0Pj0PZZ
0 comments
#108 Vu Huan / @huanvn - Score: 33 - 04/12/11 @ 03:04
:%s/, /\r/g<NL>kqay3wjPqgg@aj0Pj0PZZ
0 comments
#109 Nomen Nescio / @vadtusan - Score: 33 - 04/14/11 @ 15:05
"ay3wqqf,s<CR><Esc>"aPq2@qj@q2bcwmath<Esc>ZZ
0 comments
#110 Tesnorth / @Tesnorth - Score: 33 - 01/30/12 @ 16:14
Y3pf,daWj..j3.kE<C-V>kkDGYpf,daWkEDZZ
0 comments
#111 Mike Cooper / @mythmon - Score: 35 - 02/14/11 @ 13:46
y3f f,r<CR>Pf,r<CR>Pf,r<CR>P<Tab>j0y3f f,r<CR>P:wq<CR>
0 comments
#112 tdirrenb / @tdirrenb - Score: 35 - 05/14/11 @ 12:19
3yw:s/, /\="\r".getreg(0)/g<CR>j3yw&ZZ
0 comments
#113 Torben Rasmussen / @rasmustorben - Score: 35 - 08/12/11 @ 16:42
3ywf,r<NL>f,r<NL>f,r<NL>Pk0Pk0PGf,r<NL>k3ywjPZZ
0 comments
#114 Jason Wolf / @zephyr_wolf - Score: 35 - 11/08/12 @ 09:41
y3f :%s/, /\r/g<CR>kk<C-V>kkI<C-R>"<Esc>5Gy3f jPZZ
0 comments
#115 Pasha Klets / @p01nt - Score: 36 - 02/04/11 @ 02:43
3yw:%s/, /\r/g<CR>:2<CR>Pj^Pj^Pj^3ywjP:wq<CR>
0 comments
#116 rdt / @rdtft - Score: 37 - 02/08/11 @ 04:04
3yw:%s/, /\r/g<CR>:2<CR>P:3<CR>P:4<CR>P:5<CR>3ywjPZZ
0 comments
#117 Tom Duijf / @tomduijf - Score: 37 - 02/12/11 @ 07:32
:%s/, /\r/g<CR>ggv18<Right>y<Down>P<Down>^P<Down>^P<Down><Left><Left>v^y<Down>PZZ
0 comments
#118 Andrew / @cobbal - Score: 37 - 08/22/11 @ 02:56
y3wf,lpf p;pj0y3wf,lp:%s/, /\r/g<CR>:wq<CR>
0 comments
#119 Burkhard Zimmermann / @BurkZimm - Score: 37 - 12/26/11 @ 09:39
yy3p3jyyp3wdWkkw3dWk2.k.u1.:%s/,.*<CR>ZZ
0 comments
#120 R / @7vies - Score: 40 - 07/17/11 @ 17:52
3ye:s/m<BS>,/\r/g<CR>0Pk0Pk0P:5<CR>y33yw03ye&0PZZ
0 comments
#121 Alekseyka2 / @Alekseyka2 - Score: 41 - 02/06/11 @ 09:53
y3e4ea<CR><Esc>pea<CR><Esc>pea<CR><Esc>p^x<Up>x<Up>x3jyyp3w6xkel5xZZ
0 comments
#122 Oliver Mader / @dotb52 - Score: 44 - 07/17/12 @ 00:38
ypypyyppp3Wd3Wkd2Wkd1W5Gyyp3WdW:$<BS>%s/,.\+<CR>ZZ
0 comments
#123 Will Gray / @graywh - Score: 45 - 03/14/11 @ 14:35
:%s/\(\(\w* \w* \w*\) \w*\),/\1\r\2/g<CR>g&g&:x<CR>
0 comments
#124 Johnny Tong / @johnnytong - Score: 45 - 03/24/11 @ 23:15
3yw:%s/, /\r/g<CR>:2<CR><CR>Pj^P2<Esc>:2<CR>P5:<Esc><Esc>:5<CR>y3wjP:<BS>ZZ
0 comments
#125 Golf Sinteppadon / @MiniGolf2000 - Score: 46 - 05/02/12 @ 13:48
yy3pkf,d$jb2dwwd$jb4dwwd$jb6dwjyyp3w2dwkwd$<Esc>ZZ
0 comments
#126 Nicolas Friedli / @NicolasFriedli - Score: 46 - 10/28/12 @ 07:46
yy3p3wd2w<Down>d4w<Down>d6w<Up>wd$<Up><Right>.<Up><Right>.Gyyp4w<Left><Left><Left><Left>dw.<Up>wd$ZZ
0 comments
#127 Steve J at RF / @rfsteve - Score: 47 - 04/24/11 @ 23:53
qq:%s/\v([^,]* )([^,]*), (.*)/\1\2\r\1\3<CR>q2@qZZ
0 comments
#128 Christian Oudard / @ChristianOudard - Score: 54 - 04/15/11 @ 08:21
yyPPPfrwwwwDjnbdWwDjbdW.j...kd<Esc>elDjjyyp`<Esc>$bdBkdeuelDZZ
0 comments
#129 Joseph Reddington / @joereddington - Score: 67 - 08/21/12 @ 13:08
:s/,/<C-V><CR>from random import /g<CR><Down>:s/,/<C-V><CR>from math import<CR>:%s/ / /g<CR>ZZ
0 comments
VimGolf