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
#31 - 김범준 / @kmbmjn

02/17/2021 at 05:04AM

19
#32 - Kha Nguyen / @__ngtrongkha

03/14/2021 at 07:21AM

19
#33 - pikjes / @pikjes2

03/21/2021 at 03:05PM

19
#34 - Tuure / @tuure_p

03/22/2021 at 12:38AM

19
#35 - nedlog / @nedlog18

05/18/2021 at 01:11PM

19
#36 - Arya Kumar / @SusSquirrel

05/19/2021 at 04:16PM

19
#37 - Ray Dennis / @raysden

05/19/2021 at 09:56PM

19
#38 - grsh / @girish_i_am

05/28/2021 at 05:28AM

19
#39 - Vgrbwat / @vgrbwat

06/11/2021 at 05:12PM

19
#40 - Roman Matzutt / @matzutt

06/13/2021 at 06:51PM

19
#41 - Joe Farnsworth / @JoeFarnsworth

06/21/2021 at 10:16PM

19
#42 - Michel Viktor / @tomkpz

07/25/2021 at 03:29AM

19
#43 - lydxn / @lydxn1

07/31/2021 at 12:17AM

19
#44 - John Braxler / @braxler

08/04/2021 at 02:15PM

19
#45 - Bspammer / @Bspammer

08/15/2021 at 03:14PM

19
#46 - Roman Privalov / @RomanPrivalov

08/25/2021 at 04:44AM

19
#47 - TonioLorde21 / @TLorde21

08/27/2021 at 08:46AM

19
#48 - vineet / @vineet38383726

09/16/2021 at 10:39AM

19
#49 - Francois Marais / @maraisf

10/07/2021 at 08:14PM

19
#50 - Jean George / @JeanGeo20504212

11/18/2021 at 08:34PM

19
#51 - ししぃ / @ShunIsii

12/16/2021 at 06:13AM

19
#52 - Humbaba / @humbabu

01/01/2022 at 12:15AM

19
#53 - POSIX / @po6ix

01/07/2022 at 03:05AM

19
#54 - Ken / @kenc_

01/14/2022 at 06:44AM

19
#55 - Brett Bender / @brttbndr

02/25/2022 at 01:48AM

19
#56 - ดิว - รุจิภาส / @deadbook60

03/03/2022 at 08:50AM

19
#57 - Thitichote Chaimuang / @ThitichoteC

03/03/2022 at 09:22AM

19
#58 - แฟน___คนโปรด / @WannaPlayGame_

03/03/2022 at 09:29AM

19
#59 - philip / @philip5530

03/03/2022 at 09:59AM

19
#60 - วทททท / @uhTOWreLzQy0JN5

03/03/2022 at 01:19PM