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

271 active golfers, 1272 entries

Leaderboard (lowest score wins):
35
#61 - Ramtin Martin / @martin_ramtin

03/23/2022 at 02:33PM

35
#62 - John Xu / @xzzhiao

04/06/2022 at 04:34PM

35
#63 - ._. / @Katharsic

04/24/2022 at 07:18AM

35
#64 - Youssef Magdy / @youssef_magdy29

04/29/2022 at 01:05AM

35
#65 - sapir malka / @sapir5522

06/14/2022 at 12:55PM

35
#66 - vimgolfaccfekxh / @vimgolfaccfekxh

10/27/2022 at 09:38PM

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

11/08/2022 at 03:21PM

36
#68 - Sadot Cortés / @sadotsoy

07/27/2021 at 03:05AM

36
#69 - Humbaba / @humbabu

12/31/2021 at 09:22PM

36
#70 - Sammit / @somemeatjain

01/24/2022 at 05:45PM

36
#71 - chamow / @sbakeugs

04/13/2022 at 08:03PM

37
#72 - Winnie Yeung / @vionwinnie

07/01/2021 at 11:30PM

37
#73 - Ferran / @dillunsos

07/29/2021 at 12:20PM

37
#74 - ippachi / @ippachi1018

08/04/2021 at 11:56PM

37
#75 - Михаил Чупринский / @nelser_by

10/09/2021 at 08:01PM

37
#76 - migoo / @migoo00668679

10/11/2021 at 08:48AM

37
#77 - TimMcGuire / @mcguire

11/22/2021 at 10:24PM

37
#78 - vian / @cocatrip

01/23/2022 at 06:27PM

37
#79 - quemeraisc / @quemeraisc

05/03/2022 at 01:26PM

37
#80 - bastien batardier / @supercamarche

10/08/2022 at 06:43PM

38
#81 - Anson Yeung / @ShadowAssassinC

07/16/2021 at 02:53PM

38
#82 - Shrutesh Patil / @patil_shrutesh

12/03/2021 at 12:06PM

38
#83 - maksimka / @maksimk91158264

02/14/2022 at 12:45PM

39
#84 - Ethan Rietz / @EthanRietz

06/29/2021 at 02:51AM

39
#85 - Romain Heller / @Rom1deTroyes

06/29/2021 at 10:24AM

39
#86 - vimgolf_vinz / @VimgolfV

09/20/2021 at 03:42PM

39
#87 - Justin / @jtmusky

02/19/2022 at 09:21PM

39
#88 - nihilistkitten / @nihilistkitten1

04/16/2022 at 12:23AM

39
#89 - sdfghjk / @sdfghjk88424595

05/19/2022 at 05:00PM

40
#90 - Felix Boers / @felixboers

07/06/2021 at 05:48PM