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 9v0060da5177000000000209

Plotting some variables in python

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

Start file
def Plot_All():
    plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
    plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
    plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
    plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
End file
def Plot_All():
    plt.plot(x1,abs(y1),color='k',lw=0.8,label="line #1")
    plt.plot(x2,abs(y2),color='b',lw=0.8,label="line #2")
    plt.plot(x3,abs(y3),color='r',lw=0.8,label="line #3")
    plt.plot(x4,abs(y4),color='g',lw=0.8,label="line #4")

View Diff

2,5c2,5
<     plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
<     plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
<     plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
<     plt.plot(x1,y1,color='k',lw=0.8,label="line #1")
---
>     plt.plot(x1,abs(y1),color='k',lw=0.8,label="line #1")
>     plt.plot(x2,abs(y2),color='b',lw=0.8,label="line #2")
>     plt.plot(x3,abs(y3),color='r',lw=0.8,label="line #3")
>     plt.plot(x4,abs(y4),color='g',lw=0.8,label="line #4")

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 61 remaining solutions by signing in and submitting your own entry
#62 Calarasanu Andrei / @_fanfani4_ - Score: 181 - 06/29/21 @ 09:01
jfy<C-V>4jIabs(<Esc>[1;5C<Esc>u<Esc>w)bBBkkkwwwwwwwww)(jf,f,i)<Esc>j<C-A>bbbbbbbi<BS>2)<Esc>ji<BS>3)<Esc>ji<BS>4)<Esc>bbbbkkk<C-A>bbbb<C-A>bbbb<C-X>bbbbb<C-A>jkuj<C-A>jb<C-A><C-A>bj<C-A><C-A><C-A>$<Left><BS>4a<BS>4<Up><BS>3<Up><BS>2<Esc>:wq<Esc><Esc>k0fya<Del>1<Esc>f;'<Esc>f'ja<Del>b<Down><BS>r<Down><BS>g<Esc>:wq<Esc>2kwwww<Del>0<Esc><Esc><Esc>f.f.i0<Esc>:wq<CR>

0 comments


Created by: @AWhiteDwarf1

62 active golfers, 281 entries

Leaderboard (lowest score wins):
34
#1 - Jon Krause / @jkrause314

06/28/2021 at 11:55PM

34
#2 - sap / @sap38838304

06/30/2021 at 06:38PM

34
#3 - AAbraxas / @AAbraxas1

07/01/2021 at 08:12PM

34
#4 - John Braxler / @braxler

07/02/2021 at 05:16PM

34
#5 - Smylers / @Smylers2

07/06/2021 at 10:25PM

34
#6 - Ravi S Sinha / @ambidextrousTx

07/07/2021 at 09:14PM

34
#7 - 悟史 / @A1OBJTxN5fTg5EJ

07/10/2021 at 04:09PM

34
#8 - LittleMO / @LittleMotwo

07/11/2021 at 03:58AM

34
#9 - Nate Slager / @NateSlagr

07/12/2021 at 02:28AM

34
#10 - A A A / @37fatos

07/13/2021 at 12:28AM

34
#11 - gudvin32 / @gudvin32

07/13/2021 at 09:01PM

34
#12 - ボードゲーム! / @boardgame_JP

07/17/2021 at 01:21AM

34
#13 - Brogan / @Brogan79363502

07/18/2021 at 11:41AM

34
#14 - せいほう / @FICSQF

07/19/2021 at 08:03AM

34
#15 - Mechachleopteryx / @Mekachleopteryx

07/24/2021 at 01:03AM

34
#16 - Sean Gloumeau / @svarq428

07/25/2021 at 04:12AM

35
#17 - iBhagwan / @iiBhagwan

06/30/2021 at 03:30AM

35
#18 - Georg Bökman / @BokmanGeorg

07/06/2021 at 12:30PM

35
#19 - esquifit / @henroboke

07/13/2021 at 07:05AM

35
#20 - ゆに / @lededex

07/13/2021 at 05:44PM

35
#21 - Matrices Matlab #1 / @matrices_matlab

07/13/2021 at 06:22PM

36
#22 - Sadot Cortés / @sadotsoy

07/27/2021 at 03:05AM

37
#23 - Winnie Yeung / @vionwinnie

07/01/2021 at 11:30PM

38
#24 - Anson Yeung / @ShadowAssassinC

07/16/2021 at 02:53PM

39
#25 - Ethan Rietz / @EthanRietz

06/29/2021 at 02:51AM

39
#26 - Romain Heller / @Rom1deTroyes

06/29/2021 at 10:24AM

40
#27 - Felix Boers / @felixboers

07/06/2021 at 05:48PM

41
#28 - mevmev / @mevmev8

07/21/2021 at 10:37PM

41
#29 - Jeff Cui / @jeffacce

07/24/2021 at 08:41AM

43
#30 - Sergey Ryabko / @RyabkoSergey

07/08/2021 at 10:26AM