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

169 active golfers, 639 entries

Leaderboard (lowest score wins):
38
#151 - Di Peng / @DCodier

10/31/2018 at 12:45PM

39
#152 - Chris Maher / @chrismaherthe

11/15/2018 at 02:38AM

39
#153 - venkatakrishnan / @venkatk_

04/15/2019 at 02:51AM

39
#154 - albalitz / @_albalitz

06/05/2019 at 08:37AM

40
#155 - Simon Ingelsson / @_DeVVaN_

08/15/2018 at 03:05PM

40
#156 - Ryan Daniels / @RyanNeilDaniels

08/28/2018 at 08:35AM

40
#157 - rg thomas / @rgt47

10/23/2018 at 03:46PM

40
#158 - Reportados123 / @reportados123

07/19/2019 at 08:57PM

41
#159 - Chirag Joshi / @thechijos

08/14/2018 at 04:59AM

41
#160 - zhenshan Xue / @xzs572

08/22/2018 at 05:15AM

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

08/22/2018 at 06:14PM

41
#162 - Brent Woo / @BrentPWoo

10/02/2018 at 02:21PM

41
#163 - dogmeat / @dogmeat11

10/30/2018 at 02:44PM

41
#164 - Bruno Cunha / @bruncun

11/20/2018 at 01:33AM

41
#165 - beew71493 / @beew71493

12/18/2018 at 08:27PM

49
#166 - Shunichi Kanade / @shunkana

11/04/2018 at 01:26AM

55
#167 - urandom / @ttyrandom

10/21/2018 at 10:12AM

58
#168 - The Joe / @computerjoe708

03/21/2019 at 02:51PM

59
#169 - Jurica / @Jurica34581259

11/14/2018 at 11:35PM