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 5f23f29e1e8861000c3105c5

Python: Def to Lambda

LAMBDA!!!

Start file
def f(x): return x ** 2
End file
f = lambda x: x ** 2

View Diff

1c1
< def f(x): return x ** 2
---
> f = lambda x: x ** 2

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 15 remaining solutions by signing in and submitting your own entry
#16 Matthias / @Matthia78044730 - Score: 25 - 07/31/20 @ 19:51
Cf = lambda x: x ** 2<C-C><C-C>ZZ

0 comments


Created by: @_rustemb

16 active golfers, 36 entries

Leaderboard (lowest score wins):
19
#1 - Saki Gw / @Sakigw

07/31/2020 at 11:00AM

19
#2 - Smylers / @Smylers2

07/31/2020 at 01:30PM

19
#3 - Jon Krause / @jkrause314

07/31/2020 at 03:52PM

19
#4 - analogpixel / @analogp1xel

07/31/2020 at 04:45PM

19
#5 - Daniel Steinberg / @dstein64

07/31/2020 at 06:46PM

19
#6 - Seve / @__Seve__

07/31/2020 at 08:43PM

19
#7 - MathijsHoogland / @MathijsHoogland

08/01/2020 at 07:43AM

19
#8 - Yannick / @Yannick88147038

08/02/2020 at 06:44PM

19
#9 - Jonáš Šerých / @serycjon

08/03/2020 at 01:07PM

19
#10 - Filipe Brandenburger / @filbranden

08/03/2020 at 04:25PM

19
#11 - TimMcGuire / @mcguire

08/03/2020 at 04:45PM

19
#12 - Ravi S Sinha / @ambidextrousTx

08/03/2020 at 10:53PM

20
#13 - Alex Harston / @alexharston

08/01/2020 at 11:04PM

20
#14 - Jason Zhang / @jiamingz721

08/02/2020 at 04:14AM

24
#15 - Rustem B. / @_rustemb

07/31/2020 at 10:31AM

25
#16 - Matthias / @Matthia78044730

07/31/2020 at 07:51PM