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

140 active golfers, 520 entries

Leaderboard (lowest score wins):
33
#121 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#122 - Łukasz / @srokadev

02/18/2021 at 08:15AM

33
#123 - Swaraj Dash / @swarajdash_

11/17/2021 at 12:03AM

34
#124 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

37
#125 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

38
#126 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

38
#127 - A White Dwarf / @AWhiteDwarf1

06/27/2021 at 04:18PM

39
#128 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM

39
#129 - Jean-Francois Parent / @hacker_pyrat

07/20/2021 at 06:53PM

42
#130 - vimgolf_vinz / @VimgolfV

09/20/2021 at 04:29PM

44
#131 - elqver / @elqver

05/16/2021 at 03:17PM

44
#132 - Un Extraño / @link145m

07/30/2021 at 01:37AM

50
#133 - Joachim Nyborg / @jnyborg

06/16/2021 at 09:03AM

52
#134 - yeonlee / @yeonlee13820351

11/10/2021 at 12:59PM

54
#135 - 关红伟 / @speed2exe

09/09/2021 at 05:27PM

56
#136 - tarsiec / @tarsiec

07/12/2021 at 11:10AM

57
#137 - Sato Takayuki / @yukitaka1974

06/01/2021 at 07:34AM

67
#138 - qixiao / @qixiao986

05/31/2021 at 05:56AM

75
#139 - 宋彤雨 / @SDNAnyFlow

08/20/2021 at 04:51AM

107
#140 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:12PM