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 246 remaining solutions by signing in and submitting your own entry
#247 Meshan Naidoo / @realmeshan - Score: 227 - 01/14/24 @ 15:03
<Esc>jkjjjjwlyawjjjjjaa<Esc>uuujkkkkkkywa<Esc><Esc>jkyawjjjjjwwlhpa,<Esc>jkkkkkbhhhyawjjjjwwlllllllllllp<Esc>jkkkkkkjjbbhyawjjj4$<Esc>jkkjha,vimgolf put 6013804df3308e0009368f1c<Esc><Esc>ua<Esc>ha,<Esc>jkkkb<Esc>kbbjkhyawjjjwwwlllllllllllllllp<Esc>jkkkkjhhhhhhhhyawjj$<Esc>ha,<Esc>p<Esc>:wq<CR>

0 comments


Created by: @__ngtrongkha

247 active golfers, 972 entries

Leaderboard (lowest score wins):
20
#91 - 지선우 / @poom1937

04/08/2023 at 03:50PM

20
#92 - sjdfd / @sjdfd190584

04/14/2023 at 07:16AM

20
#93 - naka / @nak38223985244

07/20/2023 at 01:12PM

20
#94 - Geoff Liu / @geoff_liu

09/24/2023 at 03:30AM

20
#95 - Remus Dalrymple / @bornintheflames

12/17/2023 at 09:04AM

20
#96 - Matt Shen / @mattshen

01/23/2024 at 09:27AM

21
#97 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM

21
#98 - grsh / @girish_i_am

05/21/2021 at 03:58PM

21
#99 - 盧小小 / @VegetaLu

04/02/2022 at 09:12AM

21
#100 - John Xu / @xzzhiao

04/06/2022 at 05:58PM

21
#101 - James Duffy / @jduffy3

04/12/2022 at 02:32AM

22
#102 - Yannick / @Yannick88147038

07/19/2022 at 07:35PM

23
#103 - PINGU / @PINGU79544082

12/04/2021 at 04:15PM

23
#104 - Hossein Yousefi 💙 / @u_hossein

03/03/2022 at 04:52AM

23
#105 - Macunaíma / @Macunama11

05/06/2022 at 02:51PM

23
#106 - ShookerAndBeta / @Shooker2012

06/06/2022 at 03:39PM

23
#107 - مرجان / @IEnfantTerribIe

08/03/2023 at 03:24PM

24
#108 - Joshua Marple / @JoshuaMarple1

03/26/2021 at 07:46PM

24
#109 - Olle Wiklund / @Kabix

04/18/2021 at 04:18AM

24
#110 - Daniel Qu / @danielq9871

05/03/2021 at 02:49PM

24
#111 - Francois Marais / @maraisf

05/21/2021 at 12:36AM

24
#112 - ThatGuyWithAWeirdHat / @Mousakaaa

07/17/2021 at 06:09PM

24
#113 - François / @mortyZZ

08/01/2021 at 08:54PM

24
#114 - 야통이 / @gonnanailedit

12/03/2021 at 04:53PM

24
#115 - Chris Braissant / @braissac

10/18/2023 at 10:12PM

24
#116 - jackyhevey / @jackyhevey

03/01/2024 at 05:31PM

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

02/01/2021 at 10:21AM

25
#118 - hamb / @hamb88140219

03/08/2021 at 02:11AM

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

04/06/2021 at 06:25PM

25
#120 - Marcio M Pereira / @iviarcio

04/24/2021 at 03:54PM