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
#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 / @Kee__no

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

19
#82 - moh ayaya / @AyayaMoh

08/27/2023 at 02:45PM

19
#83 - 0xf00ff00f / @0xf00ff00f

10/19/2023 at 02:41PM

19
#84 - Luoyb / @Luoyb

10/25/2023 at 07:44AM

19
#85 - EtherFan / @ether_fan

02/25/2024 at 04:19PM

19
#86 - tk555 / @tk55513

05/04/2024 at 01:03PM

19
#87 - Peppa Pig / @PeppaPigSg

05/07/2024 at 09:13AM

19
#88 - Aly Thobani / @alythobani

05/29/2024 at 12:04AM

19
#89 - Guru Senthil / @gurukoushik

06/28/2024 at 09:53PM

19
#90 - nickGPT / @nickandbro

08/24/2024 at 04:40AM