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):
27
#151 - vimgolfaccfekxh / @vimgolfaccfekxh

10/19/2022 at 10:58PM

29
#152 - vimGolfJosia / @JosiaVim6203

04/11/2023 at 08:40AM

31
#153 - ever0de / @ever0de

06/23/2021 at 04:37AM

31
#154 - Christopher Kolstad / @chriswk

02/03/2022 at 12:33PM

32
#155 - Tony Buranzon / @therealTbunz

03/19/2021 at 06:29AM

32
#156 - Derya / @dbmeral

04/02/2022 at 12:13PM