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 by @nickandbro:

Unlock 54 remaining solutions by signing in and submitting your own entry
Created by: @AWhiteDwarf1

348 active golfers, 1661 entries

Solutions by @nickandbro:
34
#59 - nickGPT / @nickandbro

08/24/2024 at 02:26AM

35
#>86 - nickGPT / @nickandbro

08/24/2024 at 02:26AM

36
#>92 - nickGPT / @nickandbro

08/24/2024 at 02:25AM

37
#>103 - nickGPT / @nickandbro

08/24/2024 at 02:25AM

38
#>108 - nickGPT / @nickandbro

08/24/2024 at 02:25AM

39
#>115 - nickGPT / @nickandbro

08/24/2024 at 02:25AM

41
#>139 - nickGPT / @nickandbro

08/24/2024 at 02:25AM

42
#>147 - nickGPT / @nickandbro

08/24/2024 at 02:25AM

43
#>155 - nickGPT / @nickandbro

08/24/2024 at 02:24AM

44
#>168 - nickGPT / @nickandbro

08/24/2024 at 02:24AM

45
#>171 - nickGPT / @nickandbro

08/24/2024 at 02:24AM

46
#>176 - nickGPT / @nickandbro

08/24/2024 at 02:24AM

47
#>184 - nickGPT / @nickandbro

08/24/2024 at 02:24AM

48
#>196 - nickGPT / @nickandbro

08/24/2024 at 02:24AM

49
#>203 - nickGPT / @nickandbro

08/24/2024 at 02:23AM

50
#>210 - nickGPT / @nickandbro

08/24/2024 at 02:23AM

51
#>218 - nickGPT / @nickandbro

08/24/2024 at 02:23AM

52
#>223 - nickGPT / @nickandbro

08/24/2024 at 02:23AM

53
#>228 - nickGPT / @nickandbro

08/24/2024 at 02:23AM

54
#>232 - nickGPT / @nickandbro

08/24/2024 at 02:23AM

55
#>240 - nickGPT / @nickandbro

08/24/2024 at 02:22AM

56
#>244 - nickGPT / @nickandbro

08/24/2024 at 02:22AM

57
#>248 - nickGPT / @nickandbro

08/24/2024 at 02:22AM

58
#>253 - nickGPT / @nickandbro

08/24/2024 at 02:22AM

59
#>262 - nickGPT / @nickandbro

08/24/2024 at 02:22AM

60
#>272 - nickGPT / @nickandbro

08/24/2024 at 02:21AM

61
#>278 - nickGPT / @nickandbro

08/24/2024 at 02:21AM

62
#>286 - nickGPT / @nickandbro

08/24/2024 at 02:21AM

63
#>291 - nickGPT / @nickandbro

08/24/2024 at 02:21AM

64
#>294 - nickGPT / @nickandbro

08/24/2024 at 02:21AM

65
#>300 - nickGPT / @nickandbro

08/24/2024 at 02:21AM

66
#>307 - nickGPT / @nickandbro

08/24/2024 at 02:20AM

67
#>309 - nickGPT / @nickandbro

08/24/2024 at 02:20AM

68
#>310 - nickGPT / @nickandbro

08/24/2024 at 02:20AM

69
#>311 - nickGPT / @nickandbro

08/24/2024 at 02:20AM

70
#>312 - nickGPT / @nickandbro

08/24/2024 at 02:20AM

71
#>314 - nickGPT / @nickandbro

08/24/2024 at 02:19AM

72
#>316 - nickGPT / @nickandbro

08/24/2024 at 02:19AM

74
#>319 - nickGPT / @nickandbro

08/24/2024 at 02:19AM

76
#>320 - nickGPT / @nickandbro

08/24/2024 at 02:19AM

77
#>321 - nickGPT / @nickandbro

08/24/2024 at 02:19AM

80
#>322 - nickGPT / @nickandbro

08/24/2024 at 02:19AM

81
#>323 - nickGPT / @nickandbro

08/24/2024 at 02:18AM

85
#>327 - nickGPT / @nickandbro

08/24/2024 at 02:18AM

88
#>328 - nickGPT / @nickandbro

08/24/2024 at 02:18AM

90
#>329 - nickGPT / @nickandbro

08/24/2024 at 02:18AM

94
#>329 - nickGPT / @nickandbro

08/24/2024 at 02:18AM

129
#>342 - nickGPT / @nickandbro

08/24/2024 at 02:17AM

139
#>343 - nickGPT / @nickandbro

08/24/2024 at 02:17AM

144
#>344 - nickGPT / @nickandbro

08/24/2024 at 02:17AM

159
#>345 - nickGPT / @nickandbro

08/24/2024 at 02:17AM

160
#>346 - nickGPT / @nickandbro

08/24/2024 at 02:16AM

167
#>347 - nickGPT / @nickandbro

08/24/2024 at 02:16AM

178
#>347 - nickGPT / @nickandbro

08/24/2024 at 02:16AM