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

152 active golfers, 754 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

34
#17 - Sergey Nichiporchik / @SnichOne

07/31/2021 at 06:48PM

34
#18 - Hourann Lin / @HourannLin

08/05/2021 at 10:14AM

34
#19 - Peter Pandorum / @PeterPandorum

08/07/2021 at 03:39PM

34
#20 - garry quested / @GQuested

08/08/2021 at 04:23PM

34
#21 - Miłosz Łakomy / @foobar01123

08/14/2021 at 10:10AM

34
#22 - Trần Chí Thiện / @tecix

08/17/2021 at 02:58PM

34
#23 - DC1RW / @monokai3

08/23/2021 at 07:18AM

34
#24 - Roman Privalov / @RomanPrivalov

08/24/2021 at 02:29AM

34
#25 - Yeontaek Kim / @YeontaekK

08/25/2021 at 07:27AM

34
#26 - 关红伟 / @speed2exe

09/11/2021 at 05:23PM

34
#27 - miko417 / @mikeo404

09/28/2021 at 04:22AM

34
#28 - Jean George / @JeanGeo20504212

10/18/2021 at 08:36PM

34
#29 - Hommels / @pseudohommels

10/26/2021 at 01:05AM

34
#30 - hector / @w29975700

11/26/2021 at 10:49PM