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 282 remaining solutions by signing in and submitting your own entry
#283 Meshan Naidoo / @realmeshan - Score: 227 - 01/14/24 @ 15:03
<Esc>jkjjjjwlyawjjjjjaa<Esc>uuujkkkkkkywa<Esc><Esc>jkyawjjjjjwwlhpa,<Esc>jkkkkkbhhhyawjjjjwwlllllllllllp<Esc>jkkkkkkjjbbhyawjjj4$<Esc>jkkjha,vimgolf put 6013804df3308e0009368f1c<Esc><Esc>ua<Esc>ha,<Esc>jkkkb<Esc>kbbjkhyawjjjwwwlllllllllllllllp<Esc>jkkkkjhhhhhhhhyawjj$<Esc>ha,<Esc>p<Esc>:wq<CR>

0 comments


Created by: @__ngtrongkha

283 active golfers, 1127 entries

Leaderboard (lowest score wins):
19
#61 - bpking1 / @bpking1

11/20/2023 at 03:30AM

19
#62 - tien / @tien40766111

12/04/2023 at 12:52PM

19
#63 - masatosis / @masatosis

12/20/2023 at 04:15AM

19
#64 - epsilonshnepsilon / @epsilonshnepsilon

01/16/2024 at 03:09PM

19
#65 - tkin91e55 / @tkin91e55

01/18/2024 at 08:44AM

19
#66 - EtherFan / @ether_fan

02/25/2024 at 12:37PM

19
#67 - tgYun783 / @tgYun783

04/08/2024 at 10:20AM

19
#68 - HeyJunN / @HeyJunN

04/08/2024 at 01:49PM

19
#69 - 녹법칙 / @Rules_of_Green

04/08/2024 at 04:49PM

19
#70 - 3.14 / @pi-ratio

04/11/2024 at 01:28PM

19
#71 - kangsancheon / @kangsancheon

04/12/2024 at 12:52PM

19
#72 - Park Min-Heoyk / @TheStupi

04/12/2024 at 06:04PM

19
#73 - qaz2222 / @qaz2222

04/13/2024 at 10:54AM

19
#74 - jiwon_kim / @Ji1WonKim

04/13/2024 at 12:48PM

19
#75 - 유채운 / @painkiller_2357

04/13/2024 at 01:09PM

19
#76 - lazely / @lazely

04/14/2024 at 07:44AM

19
#77 - HyoHune / @HyoHune

04/15/2024 at 02:07AM

19
#78 - Peppa Pig / @PeppaPi95550250

05/07/2024 at 04:19AM

19
#79 - Aly Thobani / @alythobani

05/29/2024 at 10:18AM

20
#80 - geosucker / @geosucker

02/25/2021 at 06:33PM

20
#81 - der tanzbaer / @der_tanzbaer

03/10/2021 at 08:01PM

20
#82 - せいほう / @FICSQF

03/11/2021 at 07:54AM

20
#83 - treb / @treb03683130

03/12/2021 at 03:01PM

20
#84 - Paul Adlene / @AdlenePaul

03/15/2021 at 05:04PM

20
#85 - warwickrulez / @warwickrulez

03/30/2021 at 03:01PM

20
#86 - Jackmarocks / @jackmarocks

04/05/2021 at 01:34PM

20
#87 - Sven Kõiv / @KoivSven

05/09/2021 at 03:52PM

20
#88 - ゆに / @lededex

07/13/2021 at 08:13PM

20
#89 - ippachi / @ippachi1018

08/08/2021 at 10:07AM

20
#90 - mevmev / @mevmev8

08/12/2021 at 05:19PM