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

0 comments


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

0 comments


Created by: @_rustemb

142 active golfers, 410 entries

Leaderboard (lowest score wins):
20
#91 - mevmev / @mevmev8

09/09/2021 at 01:49PM

20
#92 - vimbroesel / @vimbroesel

01/23/2022 at 12:08PM

20
#93 - Даня Ефимов / @Abberatus

02/19/2022 at 03:35PM

20
#94 - nd183 / @nd1832

03/07/2022 at 02:12PM

20
#95 - math is what I hate / @mpnmbn

03/13/2022 at 02:47PM

20
#96 - タケ / @Take3832

05/13/2022 at 03:24AM

20
#97 - bitquence / @_bitquence

06/04/2022 at 11:56PM

21
#98 - Martin Bielik / @mabielik

08/06/2020 at 09:26PM

21
#99 - Zach Kirby / @zkirby2020

08/20/2020 at 05:38AM

21
#100 - Pepe / @PedroVassena

09/08/2020 at 07:50AM

21
#101 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 02:25PM

21
#102 - Captain Proton / @CaptainProton5

09/03/2021 at 09:53PM

21
#103 - chaotic / @laersn

11/04/2021 at 10:52AM

21
#104 - good enough ; 🌿 / @daisyymint

03/03/2022 at 01:38PM

21
#105 - Gunter Kluge / @KlugeGunter

04/06/2022 at 06:37PM

21
#106 - Irakli Chigvaria / @tchigvaria

05/23/2022 at 06:16PM

22
#107 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 06:23PM

22
#108 - Selvaganapathy P / @canabady

02/20/2021 at 09:49AM

22
#109 - aravindthangavel / @aravindpt

04/15/2022 at 04:13PM

22
#110 - Brandon / @Brandon10678836

08/25/2022 at 11:18AM

22
#111 - Vinay Sridhar / @kewllip

03/31/2023 at 03:49PM

23
#112 - abhijeet patil / @abhijeetptl5

09/04/2020 at 09:37AM

23
#113 - kafang plays vimgolf / @KafangV

12/18/2020 at 08:29PM

23
#114 - tom / @marlow_th

05/07/2021 at 04:54AM

23
#115 - m397 / @m39752809546

05/31/2021 at 07:40PM

23
#116 - Delon / @delonleonard

09/14/2021 at 12:35AM

23
#117 - Rory Smith / @alan0buchanan

09/15/2021 at 10:49PM

23
#118 - Swaraj Dash / @swarajdash_

11/14/2021 at 11:23PM

23
#119 - mattp (part of the 💉💉💉 club) / @mattpep

01/20/2022 at 02:41PM

23
#120 - Philipp Schilk / @TheSchilk

04/27/2022 at 06:46AM