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

77 active golfers, 299 entries

Leaderboard (lowest score wins):
43
#61 - 5S-PETER-PALFY / @5S-PETER-PALFY

10/16/2024 at 01:40PM

43
#62 - Ban / @Rheriel

10/19/2024 at 06:26PM

43
#63 - timonjamjam1 / @timonjamjam1

10/24/2024 at 10:33PM

50
#64 - Jq / @corsac_ua

10/23/2024 at 10:19PM

50
#65 - IroncladDev / @IroncladDev

10/26/2024 at 05:10PM

55
#66 - Linxiaokee / @Linxiaokee

12/14/2024 at 04:05PM

61
#67 - Katie Janzen / @347Online

11/17/2024 at 05:56AM

62
#68 - Jake Nixon / @thejakenixon

01/13/2025 at 08:09PM

64
#69 - Johan Nordén / @thaprau

10/16/2024 at 11:40AM

71
#70 - bgptr / @bgptr

10/22/2024 at 12:27PM

73
#71 - Christian Foster / @fosteeco

12/22/2024 at 01:19AM

77
#72 - Michael McGlinchey / @klawhau5

10/30/2024 at 03:11AM

91
#73 - MichaelNewbold / @MichaelNewbold

10/21/2024 at 05:57PM

92
#74 - Reed Boyer / @rpboyer15

11/03/2024 at 04:12AM

217
#75 - sue-23 / @sue-23

10/16/2024 at 04:17AM

288
#76 - Badita Marin-Georgian / @GeorgianBadita

11/19/2024 at 10:52PM

395
#77 - Alex Li / @1liale

10/21/2024 at 07:47PM