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):
43
#151 - Pieter-Jan Lavaerts / @Pumpkin_Pie_Eat

09/26/2022 at 11:46AM

43
#152 - Karan / @Karan22350073

09/30/2022 at 04:35PM

43
#153 - Test Subject / @TestSub10347886

12/09/2022 at 09:09PM

43
#154 - RosaTryp / @RosaTryp

06/08/2023 at 04:06PM

43
#155 - DavidJArnold / @DavidJArnold

03/29/2024 at 09:11AM

44
#156 - thevan96 / @thevan96gmailc1

07/26/2021 at 09:08AM

44
#157 - tpoeiras / @tpoeirass

07/31/2021 at 04:47AM

44
#158 - Kevin Ilphrin Pellet / @Kilphrin

08/04/2021 at 07:09AM

44
#159 - Tommy / @Tommy75962547

08/23/2021 at 10:57AM

44
#160 - Phil / @Phil417956031

10/12/2021 at 08:58PM

44
#161 - Winston / @sequentialchaos

10/29/2021 at 02:36PM

44
#162 - Der Natsch / @dernatsch

12/07/2021 at 05:55PM

44
#163 - Hossein Yousefi 💙 / @u_hossein

03/02/2022 at 05:20AM

44
#164 - Siddharth Murali / @SidTweetsALess

06/26/2022 at 02:21PM

44
#165 - Andrew Morris / @andrew_morris

07/13/2022 at 11:35PM

44
#166 - James / @Dronak

11/18/2022 at 09:35PM

44
#167 - @grhkm@infosec.exchange / @grhkm21

03/24/2024 at 03:37AM

44
#168 - ubaldot / @ubaldot

03/28/2024 at 11:57AM

45
#169 - Miles Edland / @asmilespeaks

07/13/2021 at 04:21AM

45
#170 - ดิว - รุจิภาส / @deadbook60

03/02/2022 at 11:39AM

45
#171 - steve / @steve35773420

11/12/2022 at 07:20PM

46
#172 - Niklas Gustafson / @GustafsonNiklas

04/09/2022 at 07:06AM

46
#173 - Joshua Philpott / @jphil529

12/12/2022 at 04:52PM

46
#174 - tneeds / @tneeds12

02/06/2023 at 01:54PM

46
#175 - usermod / @g_usermod

02/10/2023 at 07:48AM

46
#176 - 으앙 / @meri2727

10/12/2023 at 06:38AM

47
#177 - Clmi / @c_decaf

08/05/2021 at 04:57AM

47
#178 - Quentin Leroy / @qnleroy

08/20/2021 at 03:13PM

47
#179 - Gaulish_Coder / @GaulishC

11/15/2021 at 10:10PM

47
#180 - 박기창 / @baggichang3

12/02/2021 at 01:05PM