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):
19
#61 - pankace / @pankace_Frosted

03/03/2022 at 01:36PM

19
#62 - pu๊b / @rtapayahc

03/03/2022 at 05:27PM

19
#63 - Auri Iodide / @auri_iodide

03/06/2022 at 07:45AM

19
#64 - Łukasz Eckert / @LukaszEckert

03/08/2022 at 03:01PM

19
#65 - Emil / @Emil_ojdk

04/22/2022 at 03:46AM

19
#66 - Max / @Max17868626

04/22/2022 at 03:55AM

19
#67 - quemeraisc / @quemeraisc

05/06/2022 at 08:24AM

19
#68 - russellzhaomao / @russellzhaomao

05/19/2022 at 01:11AM

19
#69 - Ryan Murphy / @RyanMur03026891

05/24/2022 at 11:17PM

19
#70 - Дмитрий Инютин / @DmitrijInutin

06/14/2022 at 08:14AM

19
#71 - Хью Джолли / @DzolliH

06/20/2022 at 11:42PM

19
#72 - Danilo J. S. Bellini / @danilobellini

07/14/2022 at 05:23AM

19
#73 - Alex / @AlexanderHeatl2

07/26/2022 at 09:40PM

19
#74 - Siddharth Murali / @SidTweetsALess

08/22/2022 at 12:15PM

19
#75 - Jean Michel Furtado M'Peko / @furtadojean1

09/30/2022 at 02:01AM

19
#76 - Janzen / @__Coos

10/06/2022 at 08:46AM

19
#77 - キムラ・OPEL・ユウジ / @kimurayuuji79

11/08/2022 at 03:55AM

19
#78 - Marco Meinardi / @chino_meinardi

12/30/2022 at 06:57PM

19
#79 - Ted / @TodorDukov

03/24/2023 at 10:11PM

19
#80 - reo101 / @reo101gamer

03/24/2023 at 11:03PM

19
#81 - jasonlee / @jasonle61136657

03/31/2023 at 06:00AM

20
#82 - Alex Harston / @alexharston

08/01/2020 at 11:04PM

20
#83 - Jason Zhang / @jiamingz721

08/02/2020 at 04:14AM

20
#84 - Maibritt Illner / @Maibritt_Illner

08/04/2020 at 06:34PM

20
#85 - Dionysus / @user101user

08/04/2020 at 09:41PM

20
#86 - Kenny Nguyen / @KennyNg72375669

08/05/2020 at 06:17PM

20
#87 - Golf Gopher / @GolfGopher3

08/17/2020 at 08:29PM

20
#88 - Borna Sadeghi / @borna_sadeghi

03/19/2021 at 07:23PM

20
#89 - warwickrulez / @warwickrulez

04/04/2021 at 06:07PM

20
#90 - tarsiec / @tarsiec

07/12/2021 at 10:59AM