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

118 active golfers, 418 entries

Leaderboard (lowest score wins):
32
#91 - :wq / @write_quit_22

05/18/2021 at 05:40AM

32
#92 - nedlog / @nedlog18

05/18/2021 at 08:23PM

32
#93 - Andrew Ouzts / @andrew_ouzts

05/20/2021 at 05:33AM

32
#94 - 44 / @e__oioi

05/22/2021 at 12:50PM

32
#95 - Adam / @Adam75625825

06/26/2021 at 08:03PM

32
#96 - nullcasa / @nullcasa

07/14/2021 at 11:01PM

32
#97 - Michel Desjardins / @M8_Ofthegarden

08/11/2021 at 01:12AM

32
#98 - panakin skywalker / @_j3ffrey

08/31/2021 at 03:04PM

32
#99 - Shreeram / @Shrimpraam

09/08/2021 at 07:03PM

32
#100 - Bo Xie / @iebox

09/11/2021 at 01:14PM

33
#101 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#102 - Łukasz / @srokadev

02/18/2021 at 08:15AM

34
#103 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

37
#104 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

38
#105 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

38
#106 - A White Dwarf / @AWhiteDwarf1

06/27/2021 at 04:18PM

39
#107 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM

39
#108 - Jean-Francois Parent / @hacker_pyrat

07/20/2021 at 06:53PM

42
#109 - vimgolf_vinz / @VimgolfV

09/20/2021 at 04:29PM

44
#110 - elqver / @elqver

05/16/2021 at 03:17PM

44
#111 - Un Extraño / @link145m

07/30/2021 at 01:37AM

50
#112 - Joachim Nyborg / @jnyborg

06/16/2021 at 09:03AM

54
#113 - 关红伟 / @speed2exe

09/09/2021 at 05:27PM

56
#114 - tarsiec / @tarsiec

07/12/2021 at 11:10AM

57
#115 - Sato Takayuki / @yukitaka1974

06/01/2021 at 07:34AM

67
#116 - qixiao / @qixiao986

05/31/2021 at 05:56AM

75
#117 - 宋彤雨 / @SDNAnyFlow

08/20/2021 at 04:51AM

107
#118 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:12PM