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 9v0067056336000000000514

Change class fields from camel case to snake case

This is the reverse of the previous challenge: https://www.vimgolf.com/challenges/9v006705493c000000000513

Start file
case class User(
  id: Long,
  username: String,
  email: String,
  firstName: String,
  lastName: String,
  age: Int,
  gender: String,
  phoneNumber: String,
  address: String,
  city: String,
  country: String,
  postalCode: String,
  occupation: String,
  company: String,
  salary: Double,
  isActive: Boolean,
  registrationDate: java.time.LocalDate,
  lastLoginDate: java.time.LocalDateTime,
  preferences: Map[String, String],
  roles: List[String]
)
End file
case class User(
  id: Long,
  username: String,
  email: String,
  first_name: String,
  last_name: String,
  age: Int,
  gender: String,
  phone_number: String,
  address: String,
  city: String,
  country: String,
  postal_code: String,
  occupation: String,
  company: String,
  salary: Double,
  is_active: Boolean,
  registration_date: java.time.LocalDate,
  last_login_date: java.time.LocalDateTime,
  preferences: Map[String, String],
  roles: List[String]
)

View Diff

5,6c5,6
<   firstName: String,
<   lastName: String,
---
>   first_name: String,
>   last_name: String,
9c9
<   phoneNumber: String,
---
>   phone_number: String,
13c13
<   postalCode: String,
---
>   postal_code: String,
17,19c17,19
<   isActive: Boolean,
<   registrationDate: java.time.LocalDate,
<   lastLoginDate: java.time.LocalDateTime,
---
>   is_active: Boolean,
>   registration_date: java.time.LocalDate,
>   last_login_date: java.time.LocalDateTime,

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 101 remaining solutions by signing in and submitting your own entry
#102 Alex Li / @1liale - Score: 395 - 10/21/24 @ 19:47
<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up>/fl<BS><CR>lllli<Right>-<BS>_<Right><BS>n<Down><Left><Left><Left>_<Right><BS>n<Down><Down><Down><Left>_<Right><BS>n<Down><Down><Down><Down><Left>_<Right><BS>c<Down><Down><Down><Down><Left><Left><Left><Left><Left><Left>_<Right><BS>a<Down><Right><Right><Right><Right><Right><Right><Right><Right>_<Right><BS>d<Down><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>_<Right><BS>l<Right><Right><Right><Right>_<Right><BS>d<Down><Left><Left><Left><Esc><Down><Down><Down>:wq<CR>

0 comments


Created by: @pacuna

102 active golfers, 420 entries

Leaderboard (lowest score wins):
69
#91 - Vinny Meller / @vinnymeller

04/14/2025 at 07:29AM

71
#92 - bgptr / @bgptr

10/22/2024 at 12:27PM

73
#93 - Christian Foster / @fosteeco

12/22/2024 at 01:19AM

77
#94 - Michael McGlinchey / @klawhau5

10/30/2024 at 03:11AM

82
#95 - carterg / @carterg

02/19/2025 at 08:15PM

86
#96 - dudu1001 / @dudu1001

04/19/2025 at 11:23PM

91
#97 - MichaelNewbold / @MichaelNewbold

10/21/2024 at 05:57PM

92
#98 - Reed Boyer / @rpboyer15

11/03/2024 at 04:12AM

98
#99 - Leo / @Leoduck

02/14/2025 at 12:07PM

217
#100 - sue-23 / @sue-23

10/16/2024 at 04:17AM

288
#101 - Badita Marin-Georgian / @GeorgianBadita

11/19/2024 at 10:52PM

395
#102 - Alex Li / @1liale

10/21/2024 at 07:47PM