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

279 active golfers, 1113 entries

Leaderboard (lowest score wins):
32
#211 - nullcasa / @nullcasa

07/14/2021 at 11:01PM

32
#212 - Michel Desjardins / @M8_Ofthegarden

08/11/2021 at 01:12AM

32
#213 - panakin skywalker / @_j3ffrey

08/31/2021 at 03:04PM

32
#214 - Shreeram / @Shrimpraam

09/08/2021 at 07:03PM

32
#215 - Bo Xie / @iebox

09/11/2021 at 01:14PM

32
#216 - 윤경호 / @GH_Yun2

12/05/2021 at 01:13PM

32
#217 - tarotbybye / @tarotbybyeart

03/03/2022 at 04:13AM

32
#218 - good enough ; 🌿 / @daisyymint

03/03/2022 at 03:17PM

32
#219 - タケ / @Take3832

04/24/2022 at 05:22AM

32
#220 - Omar Alawadhi / @OmarAla59544225

09/10/2022 at 05:38PM

32
#221 - @grhkm@infosec.exchange / @grhkm21

12/19/2022 at 05:37PM

32
#222 - fredy / @locked_outside

01/30/2023 at 11:05PM

32
#223 - 李建宏 / @xx19971016

08/31/2023 at 07:39AM

32
#224 - fu2y / @fu2y

01/23/2024 at 01:22PM

32
#225 - im sung / @imsung751775

04/10/2024 at 06:52AM

33
#226 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#227 - Łukasz / @srokadev

02/18/2021 at 08:15AM

33
#228 - Swaraj Dash / @swarajdash_

11/17/2021 at 12:03AM

33
#229 - philip / @philip5530

03/03/2022 at 03:30AM

33
#230 - Abnermtj / @Abnerjr19

08/16/2022 at 05:58AM

33
#231 - jasonlee / @jasonle61136657

04/18/2023 at 02:31AM

34
#232 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

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

03/02/2022 at 12:04PM

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

03/03/2022 at 12:23AM

35
#235 - soonoo / @soonoo

01/25/2024 at 12:18AM

36
#236 - SaltyAom / @saltyAom

03/02/2022 at 03:22PM

36
#237 - pankace / @pankace_Frosted

03/02/2022 at 08:33PM

36
#238 - Erick Gonzalez / @eygl_erick

06/09/2023 at 03:26AM

36
#239 - Daniel Apt / @DanielApt

08/25/2023 at 08:42PM

37
#240 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM