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 191 remaining solutions by signing in and submitting your own entry
#192 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

192 active golfers, 761 entries

Leaderboard (lowest score wins):
20
#61 - mevmev / @mevmev8

08/12/2021 at 05:19PM

20
#62 - Quentin Leroy / @qnleroy

08/22/2021 at 09:34AM

20
#63 - Rory Smith / @alan0buchanan

09/20/2021 at 11:14PM

20
#64 - Jean George / @JeanGeo20504212

11/19/2021 at 01:48PM

20
#65 - Patrick Rainey / @PatrickJRainey

11/30/2021 at 11:23AM

20
#66 - ys / @SYS_0704

12/05/2021 at 07:17AM

20
#67 - POSIX / @po6ix

01/07/2022 at 11:01AM

20
#68 - Paul Page / @theRealPaulPage

01/21/2022 at 10:58PM

20
#69 - JVIM / @JVIM101

02/24/2022 at 11:04AM

20
#70 - Janzen / @__Coos

10/07/2022 at 08:53AM

20
#71 - mindgitrwx / @mindgitrwx

12/06/2022 at 10:32AM

20
#72 - Florian Leitner / @flowing

12/06/2022 at 09:57PM

21
#73 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM

21
#74 - grsh / @girish_i_am

05/21/2021 at 03:58PM

21
#75 - 盧小小 / @VegetaLu

04/02/2022 at 09:12AM

21
#76 - John Xu / @xzzhiao

04/06/2022 at 05:58PM

21
#77 - James Duffy / @jduffy3

04/12/2022 at 02:32AM

22
#78 - Yannick / @Yannick88147038

07/19/2022 at 07:35PM

23
#79 - PINGU / @PINGU79544082

12/04/2021 at 04:15PM

23
#80 - Hossein Yousefi 💙 / @u_hossein

03/03/2022 at 04:52AM

23
#81 - Macunaíma / @Macunama11

05/06/2022 at 02:51PM

23
#82 - ShookerAndBeta / @Shooker2012

06/06/2022 at 03:39PM

24
#83 - Joshua Marple / @JoshuaMarple1

03/26/2021 at 07:46PM

24
#84 - Olle Wiklund / @Kabix

04/18/2021 at 04:18AM

24
#85 - Daniel Qu / @danielq9871

05/03/2021 at 02:49PM

24
#86 - Francois Marais / @maraisf

05/21/2021 at 12:36AM

24
#87 - ThatGuyWithAWeirdHat / @Mousakaaa

07/17/2021 at 06:09PM

24
#88 - François / @mortyZZ

08/01/2021 at 08:54PM

24
#89 - 야통이 / @gonnanailedit

12/03/2021 at 04:53PM

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

02/01/2021 at 10:21AM