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

183 active golfers, 710 entries

Leaderboard (lowest score wins):
33
#151 - Łukasz / @srokadev

02/18/2021 at 08:15AM

33
#152 - Swaraj Dash / @swarajdash_

11/17/2021 at 12:03AM

33
#153 - philip / @philip5530

03/03/2022 at 03:30AM

33
#154 - Abnermtj / @Abnerjr19

08/16/2022 at 05:58AM

34
#155 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

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

03/02/2022 at 12:04PM

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

03/03/2022 at 12:23AM

36
#158 - SaltyAom / @saltyAom

03/02/2022 at 03:22PM

36
#159 - pankace / @pankace_Frosted

03/02/2022 at 08:33PM

37
#160 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

37
#161 - Miaomiao@.dandan / @Miaomiao_dandan

01/24/2022 at 05:55AM

37
#162 - Joseph Baek / @joseph_sg_baek

03/23/2022 at 02:55PM

38
#163 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

38
#164 - A White Dwarf / @AWhiteDwarf1

06/27/2021 at 04:18PM

38
#165 - Matthew Stachowiak / @Drahlous1

11/05/2022 at 02:15AM

39
#166 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM

39
#167 - Jean-Francois Parent / @hacker_pyrat

07/20/2021 at 06:53PM

40
#168 - oleg / @oleg12573505

01/29/2022 at 05:12PM

42
#169 - vimgolf_vinz / @VimgolfV

09/20/2021 at 04:29PM

43
#170 - 윤승후 / @yunseunghu7

03/04/2022 at 05:50AM

44
#171 - elqver / @elqver

05/16/2021 at 03:17PM

44
#172 - Un Extraño / @link145m

07/30/2021 at 01:37AM

50
#173 - Joachim Nyborg / @jnyborg

06/16/2021 at 09:03AM

52
#174 - yeonlee / @yeonlee13820351

11/10/2021 at 12:59PM

54
#175 - 关红伟 / @speed2exe

09/09/2021 at 05:27PM

56
#176 - tarsiec / @tarsiec

07/12/2021 at 11:10AM

57
#177 - Sato Takayuki / @yukitaka1974

06/01/2021 at 07:34AM

60
#178 - steve bolo / @steve_bolo

08/04/2022 at 04:21PM

65
#179 - วทททท / @uhTOWreLzQy0JN5

03/02/2022 at 02:42PM

67
#180 - qixiao / @qixiao986

05/31/2021 at 05:56AM