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

339 active golfers, 1592 entries

Leaderboard (lowest score wins):
57
#241 - Vinay Sridhar / @kewllip

03/12/2023 at 12:41PM

58
#242 - Henry Blevins / @HenryBlevins

07/04/2021 at 05:50PM

58
#243 - 盧小小 / @VegetaLu

04/01/2022 at 06:07PM

58
#244 - Jonathan Elliott / @jon__elliott

05/04/2022 at 09:57AM

58
#245 - Spam Mail / @mrfdot

05/26/2023 at 12:57AM

58
#246 - cykirk / @cykirk

01/15/2024 at 03:34AM

59
#247 - Theo Sarrazin / @tshaero

08/25/2021 at 08:39PM

59
#248 - Andrius / @Andrius28757706

09/03/2021 at 11:20AM

59
#249 - zeko / @zeknife

09/03/2021 at 09:34PM

59
#250 - 야통이 / @gonnanailedit

12/03/2021 at 03:44PM

59
#251 - Nougatine Naja / @NougatineNaja

01/11/2022 at 12:31PM

59
#252 - Brett Bender / @brttbndr

02/25/2022 at 05:14AM

59
#253 - Fedleder / @fedleder

04/24/2022 at 11:50AM

59
#254 - 𓁹 / @antograb

11/09/2022 at 06:42PM

59
#255 - satake0916 / @satake0916

12/26/2023 at 03:48AM

60
#256 - A White Dwarf / @AWhiteDwarf1

06/28/2021 at 10:58PM

60
#257 - br_bookbinder / @br_bookbinder

07/02/2021 at 06:20AM

60
#258 - Rick de chez Gnous / @GnousRick

07/09/2021 at 10:07AM

60
#259 - noname / @1____NULL____0

07/11/2021 at 07:41PM

60
#260 - Bruce Lee / @BruceLeeIII

07/21/2021 at 10:08PM

60
#261 - Pretend it's Beef / @EthanMcQuarrie

08/13/2021 at 04:38AM

60
#262 - Michael / @triorph

11/09/2021 at 07:35AM

60
#263 - PINGU / @PINGU79544082

12/04/2021 at 03:43PM

60
#264 - 초롱이 / @treebird82

02/01/2022 at 12:42AM

60
#265 - jonas-grobe / @jonas-grobe

02/01/2024 at 09:26PM

61
#266 - CDRdude / @CDRdude

07/07/2021 at 06:34PM

61
#267 - 真原 / @mahala_coder

09/03/2021 at 10:26AM

61
#268 - zai / @zaidhaaan

09/11/2021 at 04:55PM

61
#269 - Brendan Holmes / @bdholmes

02/02/2022 at 10:18PM

61
#270 - Zhou Jiazheng / @ZhouJiazheng0

02/21/2023 at 09:22AM