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

164 active golfers, 629 entries

Leaderboard (lowest score wins):
42
#151 - vimgolf_vinz / @VimgolfV

09/20/2021 at 04:29PM

43
#152 - 윤승후 / @yunseunghu7

03/04/2022 at 05:50AM

44
#153 - elqver / @elqver

05/16/2021 at 03:17PM

44
#154 - Un Extraño / @link145m

07/30/2021 at 01:37AM

50
#155 - Joachim Nyborg / @jnyborg

06/16/2021 at 09:03AM

52
#156 - yeonlee / @yeonlee13820351

11/10/2021 at 12:59PM

54
#157 - 关红伟 / @speed2exe

09/09/2021 at 05:27PM

56
#158 - tarsiec / @tarsiec

07/12/2021 at 11:10AM

57
#159 - Sato Takayuki / @yukitaka1974

06/01/2021 at 07:34AM

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

03/02/2022 at 02:42PM

67
#161 - qixiao / @qixiao986

05/31/2021 at 05:56AM

69
#162 - Thitichote Chaimuang / @ThitichoteC

03/02/2022 at 04:51PM

75
#163 - 宋彤雨 / @SDNAnyFlow

08/20/2021 at 04:51AM

107
#164 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:12PM