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 5b71fa9105b5ca000ce4a7a1

convert yml into java pojo field

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

Start file
- browser: Chrome
  browserVersion: 63
  os: window7
  osVersion: 2012
  lang: en
End file
private String browser;
private String browserVersion;
private String os;
private String osVersion;
private String lang;

View Diff

1,5c1,5
< - browser: Chrome
<   browserVersion: 63
<   os: window7
<   osVersion: 2012
<   lang: en
---
> private String browser;
> private String browserVersion;
> private String os;
> private String osVersion;
> private String lang;

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 138 remaining solutions by signing in and submitting your own entry
#139 Jurica / @Jurica34581259 - Score: 59 - 11/14/18 @ 23:35
:%s/:.*//g<CR>0qaxxkq4@a:%s/^/private String /g<CR>:%s/$/;/g<CR>:wq<CR>

0 comments


Created by: @saurabh908583

139 active golfers, 525 entries

Leaderboard (lowest score wins):
37
#121 - 永森 / @nagakei05

11/17/2018 at 07:15AM

37
#122 - tuyen / @tuyen66827418

11/22/2018 at 02:40PM

37
#123 - Oren Koriat / @KoriatOren

12/06/2018 at 02:00PM

38
#124 - Vanildo S. Mangueira / @vanildo_souto

08/14/2018 at 02:26PM

38
#125 - Di Peng / @DCodier

10/31/2018 at 12:45PM

39
#126 - Chris Maher / @chrismaherthe

11/15/2018 at 02:38AM

40
#127 - Simon Ingelsson / @_DeVVaN_

08/15/2018 at 03:05PM

40
#128 - Ryan Daniels / @RyanNeilDaniels

08/28/2018 at 08:35AM

40
#129 - rg thomas / @rgt47

10/23/2018 at 03:46PM

41
#130 - Chirag Joshi / @thechijos

08/14/2018 at 04:59AM

41
#131 - zhenshan Xue / @xzs572

08/22/2018 at 05:15AM

41
#132 - Ленар / @LShagiev

08/22/2018 at 06:14PM

41
#133 - Brent Woo / @BrentPWoo

10/02/2018 at 02:21PM

41
#134 - dogmeat / @dogmeat11

10/30/2018 at 02:44PM

41
#135 - Bruno Cunha / @bruncun

11/20/2018 at 01:33AM

41
#136 - beew71493 / @beew71493

12/18/2018 at 08:27PM

49
#137 - Shunichi Kanade / @shunkana

11/04/2018 at 01:26AM

55
#138 - urandom / @ttyrandom

10/21/2018 at 10:12AM

59
#139 - Jurica / @Jurica34581259

11/14/2018 at 11:35PM