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):
36
#91 - naka / @nak38223985244

07/04/2023 at 01:06PM

36
#92 - bonettimrc / @bonettimrc

04/24/2024 at 07:10PM

37
#93 - Winnie Yeung / @vionwinnie

07/01/2021 at 11:30PM

37
#94 - Ferran / @dillunsos

07/29/2021 at 12:20PM

37
#95 - ippachi / @ippachi1018

08/04/2021 at 11:56PM

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

10/09/2021 at 08:01PM

37
#97 - migoo / @migoo00668679

10/11/2021 at 08:48AM

37
#98 - TimMcGuire / @mcguire

11/22/2021 at 10:24PM

37
#99 - vian / @cocatrip

01/23/2022 at 06:27PM

37
#100 - quemeraisc / @quemeraisc

05/03/2022 at 01:26PM

37
#101 - bastien batardier / @supercamarche

10/08/2022 at 06:43PM

37
#102 - ­김수현 / 학생 / 건설환경공학부 / @gimsuhyeonhags1

03/23/2023 at 03:20AM

37
#103 - Anaritus / @Anaritus

02/24/2024 at 06:25PM

38
#104 - Anson Yeung / @ShadowAssassinC

07/16/2021 at 02:53PM

38
#105 - Shrutesh Patil / @patil_shrutesh

12/03/2021 at 12:06PM

38
#106 - maksimka / @maksimk91158264

02/14/2022 at 12:45PM

38
#107 - 马海洋 / @LG41bT7ZvqOdFl3

02/07/2023 at 08:22PM

38
#108 - John Oatey / @JojoMakesGames

11/10/2023 at 09:24PM

39
#109 - Ethan Rietz / @EthanRietz

06/29/2021 at 02:51AM

39
#110 - Romain Heller / @Rom1deTroyes

06/29/2021 at 10:24AM

39
#111 - vimgolf_vinz / @VimgolfV

09/20/2021 at 03:42PM

39
#112 - Justin / @jtmusky

02/19/2022 at 09:21PM

39
#113 - nihilistkitten / @nihilistkitten1

04/16/2022 at 12:23AM

39
#114 - sdfghjk / @sdfghjk88424595

05/19/2022 at 05:00PM

39
#115 - Jorge Peña / @wkynrocks

02/21/2024 at 04:32AM

40
#116 - Felix Boers / @felixboers

07/06/2021 at 05:48PM

40
#117 - Manas / @weirdsmiley_

07/29/2021 at 09:41AM

40
#118 - Andreas Siegrist / @andreaszwei

10/03/2021 at 02:10PM

40
#119 - BryanYan / @BryanGoesPlaces

10/15/2021 at 05:29AM

40
#120 - redraw / @redraw_

11/13/2021 at 04:16AM