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

348 active golfers, 1661 entries

Leaderboard (lowest score wins):
35
#61 - Georg Bökman / @BokmanGeorg

07/06/2021 at 12:30PM

35
#62 - esquifit / @henroboke

07/13/2021 at 07:05AM

35
#63 - ゆに / @lededex

07/13/2021 at 05:44PM

35
#64 - Matrices Matlab #1 / @matrices_matlab

07/13/2021 at 06:22PM

35
#65 - Michael Carey / @Mick_Carey

08/05/2021 at 01:46PM

35
#66 - Baxter / @Baxter79512802

08/20/2021 at 12:38AM

35
#67 - まじで≡すごい(mod🌗) / @i_wanna_be_a_jk

08/25/2021 at 05:41AM

35
#68 - SwordSwordSwordBird / @SwordSwordBird

09/04/2021 at 05:41AM

35
#69 - Vahan / @Vahan00900245

10/05/2021 at 06:47PM

35
#70 - 박세영 / @bagseyeong10

11/26/2021 at 01:28PM

35
#71 - 深窓の令嬢@ドクター / @arbino1031

11/28/2021 at 02:01PM

35
#72 - ししぃ / @ShunIsii

12/23/2021 at 06:46AM

35
#73 - Jianfeng / @Jianfen22425058

12/24/2021 at 02:30AM

35
#74 - 勉强掩盖 / @NROOhu88PhVQYLT

01/12/2022 at 11:36AM

35
#75 - Ramtin Martin / @martin_ramtin

03/23/2022 at 02:33PM

35
#76 - John Xu / @xzzhiao

04/06/2022 at 04:34PM

35
#77 - ._. / @Katharsic

04/24/2022 at 07:18AM

35
#78 - Youssef Magdy / @youssef_magdy29

04/29/2022 at 01:05AM

35
#79 - sapir malka / @sapir5522

06/14/2022 at 12:55PM

35
#80 - vimgolfaccfekxh / @vimgolfaccfekxh

10/27/2022 at 09:38PM

35
#81 - andrewalker@mastodon.green / @andrewalkernet

11/08/2022 at 03:21PM

35
#82 - Daniel Grothe / @grothe6_

12/16/2022 at 11:51PM

35
#83 - くりち / 栗原佑弥 / @kurichi97

06/29/2023 at 01:48PM

35
#84 - moh ayaya / @AyayaMoh

08/23/2023 at 05:42PM

35
#85 - Luoyb / @Luoyb

10/23/2023 at 02:24AM

35
#86 - Remus Dalrymple / @bornintheflames

12/12/2023 at 12:36AM

36
#87 - Sadot Cortés / @sadotsoy

07/27/2021 at 03:05AM

36
#88 - Humbaba / @humbabu

12/31/2021 at 09:22PM

36
#89 - Sammit / @somemeatjain

01/24/2022 at 05:45PM

36
#90 - chamow / @sbakeugs

04/13/2022 at 08:03PM