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

77 active golfers, 260 entries

Leaderboard (lowest score wins):
32
#61 - Russell Helmstedter / @RHelmstedter

03/28/2021 at 01:05AM

32
#62 - Kağan / @kaganyanikmeout

04/28/2021 at 02:58AM

32
#63 - Tanmay Chordia / @TanmayChordia1

05/17/2021 at 04:17AM

32
#64 - :wq / @write_quit_22

05/18/2021 at 05:40AM

32
#65 - nedlog / @nedlog18

05/18/2021 at 08:23PM

32
#66 - Andrew Ouzts / @andrew_ouzts

05/20/2021 at 05:33AM

32
#67 - 44 / @e__oioi

05/22/2021 at 12:50PM

33
#68 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#69 - Łukasz / @srokadev

02/18/2021 at 08:15AM

34
#70 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

37
#71 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

38
#72 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

39
#73 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM

44
#74 - elqver / @elqver

05/16/2021 at 03:17PM

57
#75 - Sato Takayuki / @yukitaka1974

06/01/2021 at 07:34AM

67
#76 - qixiao / @qixiao986

05/31/2021 at 05:56AM

107
#77 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:12PM