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

295 active golfers, 1192 entries

Leaderboard (lowest score wins):
33
#241 - philip / @philip5530

03/03/2022 at 03:30AM

33
#242 - Abnermtj / @Abnerjr19

08/16/2022 at 05:58AM

33
#243 - jasonlee / @jasonle61136657

04/18/2023 at 02:31AM

34
#244 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

34
#245 - ดิว - รุจิภาส / @deadbook60

03/02/2022 at 12:04PM

34
#246 - แฟน___คนโปรด / @WannaPlayGame_

03/03/2022 at 12:23AM

35
#247 - soonoo / @soonoo

01/25/2024 at 12:18AM

36
#248 - SaltyAom / @saltyAom

03/02/2022 at 03:22PM

36
#249 - pankace / @pankace_Frosted

03/02/2022 at 08:33PM

36
#250 - Erick Gonzalez / @eygl_erick

06/09/2023 at 03:26AM

36
#251 - Daniel Apt / @DanielApt

08/25/2023 at 08:42PM

36
#252 - lovebigwei / @lovebigwei

04/25/2025 at 03:52AM

37
#253 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

37
#254 - Miaomiao@.dandan / @Miaomiao_dandan

01/24/2022 at 05:55AM

37
#255 - Joseph Baek / @joseph_sg_baek

03/23/2022 at 02:55PM

37
#256 - Duy nguyễn / @Duycld03

07/19/2023 at 07:42PM

38
#257 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

38
#258 - A White Dwarf / @AWhiteDwarf1

06/27/2021 at 04:18PM

38
#259 - Matthew Stachowiak / @Drahlous1

11/05/2022 at 02:15AM

38
#260 - justgamer248 / @justgamer248

04/11/2024 at 11:50AM

39
#261 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM

39
#262 - Jean-Francois Parent / @hacker_pyrat

07/20/2021 at 06:53PM

39
#263 - Adrián Fidalgo-Díaz / @adrianFD22

12/15/2023 at 06:18PM

39
#264 - jonas-grobe / @jonas-grobe

02/01/2024 at 11:14PM

40
#265 - oleg / @oleg12573505

01/29/2022 at 05:12PM

41
#266 - e_e / @eleloi

02/12/2023 at 06:09PM

42
#267 - vimgolf_vinz / @VimgolfV

09/20/2021 at 04:29PM

43
#268 - 윤승후 / @yunseunghu7

03/04/2022 at 05:50AM

43
#269 - Peter Szerzo / @peterszerzo

07/06/2023 at 05:44AM

44
#270 - elqver / @elqver

05/16/2021 at 03:17PM