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):
23
#121 - abhijeet patil / @abhijeetptl5

09/04/2020 at 09:37AM

23
#122 - kafang plays vimgolf / @KafangV

12/18/2020 at 08:29PM

23
#123 - tom / @marlow_th

05/07/2021 at 04:54AM

23
#124 - m397 / @m39752809546

05/31/2021 at 07:40PM

23
#125 - Delon / @delonleonard

09/14/2021 at 12:35AM

23
#126 - Rory Smith / @alan0buchanan

09/15/2021 at 10:49PM

23
#127 - Swaraj Dash / @swarajdash_

11/14/2021 at 11:23PM

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

01/20/2022 at 02:41PM

23
#129 - Philipp Schilk / @philipp_schilk

04/27/2022 at 06:46AM

23
#130 - Abdelrahman Madkour / @A3Madkour

08/26/2022 at 09:14PM

23
#131 - James Marshall / @astrophd

10/21/2022 at 08:24PM

23
#132 - James / @Dronak

10/23/2022 at 04:04AM

23
#133 - KensStake / @kentaROyachyuni

07/16/2023 at 09:10AM

24
#134 - Rustem B. / @_rustemb

07/31/2020 at 10:31AM

24
#135 - バイロン / @Genius_Byron

06/06/2021 at 09:16PM

24
#136 - François / @mortyZZ

08/01/2021 at 07:53PM

24
#137 - Yochem van Rosmalen / @yoch3m

01/30/2022 at 08:24PM

24
#138 - tarotbybye / @tarotbybyeart

03/03/2022 at 10:44AM

24
#139 - 梅 / @umetosawara

04/17/2022 at 03:40AM

24
#140 - Иван / @wansmer

04/25/2023 at 09:34PM

24
#141 - 🥚 / @schmarles_

11/10/2024 at 10:13PM

25
#142 - Matthias / @Matthia78044730

07/31/2020 at 07:51PM

25
#143 - Christ / @Christ46234422

09/22/2020 at 02:02PM

25
#144 - José Medrano / @happylilmexican

12/08/2021 at 03:20AM

25
#145 - SmoggyFog / @SmoggyFog

06/12/2023 at 04:16AM

25
#146 - Duy nguyễn / @Duycld03

08/11/2023 at 02:05PM

25
#147 - Justin Choi / @Mcthecuber

07/01/2024 at 10:12PM

26
#148 - seenz / @lefton_sean

05/14/2022 at 07:51PM

27
#149 - Theo Sarrazin / @tshaero

08/18/2020 at 06:50PM

27
#150 - 김세훈 / @gimse_

06/06/2022 at 03:47PM