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 6013804df3308e0009368f1c

Python dataclasses

Simple challenge to extract fields from a Python class

Start file
from dataclasses import dataclass

@dataclass
class Student:
    student_id: str
    name: str
    age: int 
    score: float

fields = ""

End file
from dataclasses import dataclass

@dataclass
class Student:
    student_id: str
    name: str
    age: int 
    score: float

fields = "student_id,name,age,score"

View Diff

10c10
< fields = ""
---
> fields = "student_id,name,age,score"

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 178 remaining solutions by signing in and submitting your own entry
#179 Kenneth Hyman / @kjhyman - Score: 107 - 04/27/21 @ 14:12
jjjjebveyjjjjejekeeei<Esc>pkkkkbbbveduveyjjjeeeeebea,<Esc>pkkkbbbveduveyjjjeeeeeea,<Esc>p<Esc>kkbbbveyjjeeeeeeeea,<Esc>p:w<CR>:wq<CR>

0 comments


Created by: @__ngtrongkha

179 active golfers, 687 entries

Leaderboard (lowest score wins):
20
#61 - Rory Smith / @alan0buchanan

09/20/2021 at 11:14PM

20
#62 - Jean George / @JeanGeo20504212

11/19/2021 at 01:48PM

20
#63 - Patrick Rainey / @PatrickJRainey

11/30/2021 at 11:23AM

20
#64 - ys / @SYS_0704

12/05/2021 at 07:17AM

20
#65 - POSIX / @po6ix

01/07/2022 at 11:01AM

20
#66 - Paul Page / @theRealPaulPage

01/21/2022 at 10:58PM

20
#67 - JVIM / @JVIM101

02/24/2022 at 11:04AM

20
#68 - Janzen / @__Coos

10/07/2022 at 08:53AM

21
#69 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM

21
#70 - grsh / @girish_i_am

05/21/2021 at 03:58PM

21
#71 - 盧小小 / @VegetaLu

04/02/2022 at 09:12AM

21
#72 - John Xu / @xzzhiao

04/06/2022 at 05:58PM

21
#73 - James Duffy / @jduffy3

04/12/2022 at 02:32AM

22
#74 - Yannick / @Yannick88147038

07/19/2022 at 07:35PM

23
#75 - PINGU / @PINGU79544082

12/04/2021 at 04:15PM

23
#76 - Hossein Yousefi 💙 / @u_hossein

03/03/2022 at 04:52AM

23
#77 - Macunaíma / @Macunama11

05/06/2022 at 02:51PM

23
#78 - ShookerAndBeta / @Shooker2012

06/06/2022 at 03:39PM

24
#79 - Joshua Marple / @JoshuaMarple1

03/26/2021 at 07:46PM

24
#80 - Olle Wiklund / @Kabix

04/18/2021 at 04:18AM

24
#81 - Daniel Qu / @danielq9871

05/03/2021 at 02:49PM

24
#82 - François Marais / @maraisf

05/21/2021 at 12:36AM

24
#83 - ThatGuyWithAWeirdHat / @Mousakaaa

07/17/2021 at 06:09PM

24
#84 - François / @mortyZZ

08/01/2021 at 08:54PM

24
#85 - 야통이 / @gonnanailedit

12/03/2021 at 04:53PM

25
#86 - 蔡徐坤真是爱吃屎 / @Hashub7

02/01/2021 at 10:21AM

25
#87 - hamb / @hamb88140219

03/08/2021 at 02:11AM

25
#88 - tyfrasc15@gmail.com / @tyfrasc15

04/06/2021 at 06:25PM

25
#89 - Marcio M Pereira / @iviarcio

04/24/2021 at 03:54PM

25
#90 - Levi Wheeler / @LeviWhe68726437

05/24/2022 at 05:27PM