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

128 active golfers, 635 entries

Leaderboard (lowest score wins):
44
#61 - Phil / @Phil417956031

10/12/2021 at 08:58PM

45
#62 - Miles Edland / @asmilespeaks

07/13/2021 at 04:21AM

47
#63 - Clmi / @c_decaf

08/05/2021 at 04:57AM

47
#64 - Quentin Leroy / @qnleroy

08/20/2021 at 03:13PM

48
#65 - jd / @jdseamless

09/01/2021 at 03:19PM

48
#66 - Nick Repetti / @nick_repetti

09/24/2021 at 01:02AM

48
#67 - Fabian Ahbeck / @FAhbeck

10/08/2021 at 04:22PM

49
#68 - drumstix576 / @drumstix576

10/10/2021 at 10:33AM

50
#69 - MrRubiksSC / @RubiksSc

08/14/2021 at 02:02PM

51
#70 - editor3D / @editor3D

07/13/2021 at 04:23PM

51
#71 - Michel Desjardins / @M8_Ofthegarden

08/10/2021 at 11:51PM

52
#72 - Un Extra├▒o / @link145m

07/30/2021 at 11:22PM

52
#73 - Connor / @ronnocthered

08/15/2021 at 04:12AM

54
#74 - Dominic Nunes / @domi91c

07/23/2021 at 03:15AM

54
#75 - Arryue / @Arryue2

07/31/2021 at 05:18PM

54
#76 - Craig Euler / @euler_craig

09/26/2021 at 02:08AM

54
#77 - cowai / @cowai

10/14/2021 at 06:51PM

55
#78 - Sergio / @SergioVl12

07/24/2021 at 05:00AM

55
#79 - e1mnos / @e1mnos

08/10/2021 at 11:20AM

55
#80 - jdfgjhsbd / @bli231957

09/04/2021 at 03:04PM

56
#81 - Patrick Martin / @PatrickDMartin

06/29/2021 at 08:03AM

56
#82 - Michael / @thscuriousquest

07/25/2021 at 03:21PM

56
#83 - Bo Xie / @iebox

09/04/2021 at 02:53PM

57
#84 - brent / @brent65628714

07/25/2021 at 01:30PM

57
#85 - Alaris Morissette / @Alaris_Villain

08/12/2021 at 05:11AM

58
#86 - Henry Blevins / @HenryBlevins

07/04/2021 at 05:50PM

59
#87 - Theo Sarrazin / @tshaero

08/25/2021 at 08:39PM

59
#88 - Andrius / @Andrius28757706

09/03/2021 at 11:20AM

59
#89 - zeko / @zeknife

09/03/2021 at 09:34PM

60
#90 - A White Dwarf / @AWhiteDwarf1

06/28/2021 at 10:58PM