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):
95
#331 - Jose Javier Gonzalez / @jjgort

08/11/2021 at 04:12PM

99
#332 - K.Takao / @kit_tko

09/16/2022 at 02:20PM

102
#333 - panakin skywalker / @_j3ffrey

08/31/2021 at 02:43PM

102
#334 - D G G / @DGJourneyman

02/21/2023 at 05:54AM

104
#335 - ccn / @ccn24943163

07/13/2021 at 02:50AM

104
#336 - david ta / @tadavid

06/03/2022 at 05:02PM

106
#337 - tarotbybye / @tarotbybyeart

03/02/2022 at 02:40PM

107
#338 - 🇮🇳 Prax 🏳️‍🌈 / @Praxks

07/18/2021 at 08:45PM

116
#339 - วทททท / @uhTOWreLzQy0JN5

03/02/2022 at 01:45PM

117
#340 - pankace / @pankace_Frosted

03/02/2022 at 05:01PM

122
#341 - Thitichote Chaimuang / @ThitichoteC

03/02/2022 at 05:26PM

129
#342 - oleg / @oleg12573505

01/29/2022 at 03:09PM

139
#343 - dog / @coldplayingsong

10/29/2021 at 05:32PM

144
#344 - vineet / @vineet38383726

09/01/2021 at 03:20PM

159
#345 - CJ Avilla / @cjav_dev

05/08/2024 at 02:19PM

160
#346 - Álvaro Silva / @ricostynha1

07/25/2024 at 10:00PM

167
#347 - John Wohlfert / @jlwohlfert

11/28/2021 at 03:49AM

181
#348 - Calarasanu Andrei / @_fanfani4_

06/29/2021 at 09:01AM