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 [challenge ID]

Played Challenges

Swap function parameters and delete all comments in python. - 1079 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 25
  • Position: #114 / 264
  • Number of attempts: 1
Delete the last function argument in python. - 730 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 7
  • Position: #155 / 262
  • Number of attempts: 1
Find the devices that have no revoked time, and extract out the duration left on their leases. - 255 entries

Extract non-revoked devices and the duration of their leases.

  • Best score: 49
  • Best player score: 60
  • Position: #20 / 60
  • Number of attempts: 1
Reordering properties - 1385 entries

Arrange the CSS lines for the #topbar selector based on their complete line length, from shortest to longest.

  • Best score: 24
  • Best player score: 81
  • Position: #178 / 302
  • Number of attempts: 1
YAML to dotenv - 1654 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 20
  • Position: #119 / 347
  • Number of attempts: 3
Swap columns and transform to CSV format - 516 entries

Turn this spreadsheet output into a CSV file but first swap the columns

  • Best score: 16
  • Best player score: 19
  • Position: #104 / 184
  • Number of attempts: 1
Replace markdown sections with numbering - 348 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 48
  • Position: #27 / 93
  • Number of attempts: 2
Change class fields from snake case to camel case - 336 entries

Change the class fields in this Scala class from snake case to camel case

  • Best score: 13
  • Best player score: 14
  • Position: #85 / 127
  • Number of attempts: 1
Replace csv column if it's not empty - 317 entries

Replace the credit_score_percentile column with the value 0.0 but leave the empty ones untouched

  • Best score: 15
  • Best player score: 15
  • Position: #17 / 103
  • Number of attempts: 3
CaN yOuR ViM dO ThAt? #1 - 309 entries

Tsoding's famous "Can your Vim do that?" https://youtu.be/Bafo3hhheHU?si=DfcT4sUEMTSAevnx&t=1091

  • Best score: 41
  • Best player score: 46
  • Position: #62 / 123
  • Number of attempts: 1
Append leading hyphen count to each line - 157 entries

Append the number of leading hyphens to the end of each line.

  • Best score: 23
  • Best player score: 35
  • Position: #32 / 43
  • Number of attempts: 1
Fix timezone format - 385 entries

Add the missing T and Z in the datetime field. There should be a T instead of the space, and a Z at the end of the datetime. `2024-08-31 18:32:00;` -> `2024-08-31T18:32:00Z;`

  • Best score: 15
  • Best player score: 19
  • Position: #80 / 126
  • Number of attempts: 3
Remove adjacent duplicates - 732 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 43
  • Position: #153 / 187
  • Number of attempts: 1
Rearrange array to one line - 907 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 20
  • Position: #110 / 209
  • Number of attempts: 2
Copy punctuation - 760 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 41
  • Position: #112 / 188
  • Number of attempts: 1
Find anomalies - 187 entries

There is one special character per line

  • Best score: 30
  • Best player score: 57
  • Position: #33 / 48
  • Number of attempts: 1
New teacher - 1534 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 27
  • Position: #193 / 322
  • Number of attempts: 2
months to html list items - 1161 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 48
  • Position: #304 / 314
  • Number of attempts: 1
Find fix point of cos - 1486 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 16
  • Position: #295 / 435
  • Number of attempts: 1
Surround the 'z' character with brackets, quotes, and print as formatted string. - 584 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #236 / 330
  • Number of attempts: 1
Paste a column after a column - 2672 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 7
  • Best player score: 23
  • Position: #392 / 580
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1688 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 13
  • Position: #422 / 567
  • Number of attempts: 1
Space out the alphabet - 1700 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 25
  • Position: #408 / 460
  • Number of attempts: 1
Swaraj Dash
Github:

entered into 23 challenges

contributed 0 challenges