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 154 remaining solutions by signing in and submitting your own entry
#155 Tony Buranzon / @therealTbunz - Score: 32 - 03/19/21 @ 06:29
dtfli =<Esc>llctxlambda x: <Esc>lldfx<Esc>ZZ

0 comments


#156 Derya / @dbmeral - Score: 32 - 04/02/22 @ 12:13
dexldexr=i <Esc>llldeilambda x:<Esc>:wq<CR>

0 comments


Created by: @_rustemb

156 active golfers, 455 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 - Dan / @dstein64

07/31/2020 at 06:46PM

19
#6 - Seve / @Seve_py

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

19
#13 - Du Phan / @fehiepsi

08/04/2020 at 11:13PM

19
#14 - GenericHardwareGamer / @GnrikHrdwrGamer

08/05/2020 at 08:56AM

19
#15 - Vinay Sharma / @VinaySh63956554

08/08/2020 at 06:20PM

19
#16 - Tinko Minko / @tandikula

08/10/2020 at 06:11AM

19
#17 - Tanzeel Kazi / @tanzeelkazi

08/11/2020 at 08:35AM

19
#18 - Muhsin AbdulMohammed / @muhsin____

08/17/2020 at 08:50AM

19
#19 - lz2ggf / @lz2ggf

08/25/2020 at 06:10PM

19
#20 - Tom Dalling / @tom_dalling

08/31/2020 at 12:08PM

19
#21 - Kaustubh Murumkar / @k_austub_h

08/31/2020 at 08:03PM

19
#22 - speisz / @speiszc

09/05/2020 at 10:01PM

19
#23 - Sean Dewar / @seandewar

09/18/2020 at 09:11PM

19
#24 - lamtt77 / @lamtt77

10/12/2020 at 08:12AM

19
#25 - Roger Stoltz / @rogsto1

11/09/2020 at 07:17PM

19
#26 - hepebexè / @hepebexe

01/01/2021 at 12:58PM

19
#27 - A A A / @37fatos

01/21/2021 at 12:33AM

19
#28 - Jung Yeon Park / @park_jungy

01/27/2021 at 01:59AM

19
#29 - AAbraxas / @AAbraxas1

02/08/2021 at 07:22PM

19
#30 - せいほう / @FICSQF

02/09/2021 at 06:41AM