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

Change class fields from camel case to snake case - 42 entries

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

  • Best score: 18
  • Best player score: 23
  • Position: #11 / 15
  • Number of attempts: 2
Reorganize Pokémon - 68 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 21
  • Position: #9 / 20
  • Number of attempts: 5
Replace csv column if it's not empty - 36 entries

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

  • Best score: 15
  • Best player score: 37
  • Position: #14 / 15
  • Number of attempts: 1
Change readonly files - 3 entries

Try to write a file that was marked as read-only.

  • Best score: 21
  • Best player score: 53
  • Position: #2 / 3
  • Number of attempts: 1
extract struct tag in go - 11 entries

Can you extract all struct tags in the fewest keystrokes possible?

  • Best score: 33
  • Best player score: 40
  • Position: #3 / 4
  • Number of attempts: 7
CaN yOuR ViM dO ThAt? #1 - 27 entries

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

  • Best score: 41
  • Best player score: 45
  • Position: #8 / 11
  • Number of attempts: 2
Append leading hyphen count to each line - 15 entries

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

  • Best score: 23
  • Best player score: 25
  • Position: #5 / 8
  • Number of attempts: 3
Move list of uuids into a SQL query - 39 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

  • Best score: 57
  • Best player score: 65
  • Position: #7 / 18
  • Number of attempts: 2
Markdown Blog Editing - 197 entries

Convert the given link text in start file to a markdown link list.

  • Best score: 30
  • Best player score: 42
  • Position: #21 / 52
  • Number of attempts: 5
Fix timezone format - 186 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: 17
  • Position: #27 / 61
  • Number of attempts: 3
Search different SQL column with similar where clause - 116 entries

Replace a column in the where clause and convert all numbers from text to numeric, by replacing the leading 0 with the code 359.

  • Best score: 22
  • Best player score: 25
  • Position: #20 / 36
  • Number of attempts: 2
Rearrange array to single level - 1094 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 59
  • Position: #169 / 186
  • Number of attempts: 2
Rearrange array to one line - 521 entries

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

  • Best score: 13
  • Best player score: 30
  • Position: #112 / 129
  • Number of attempts: 2
Copy punctuation - 419 entries

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

  • Best score: 19
  • Best player score: 145
  • Position: #101 / 106
  • Number of attempts: 1
Column wise pasting - 143 entries

Make a table from 3 columns

  • Best score: 17
  • Best player score: 44
  • Position: #30 / 33
  • Number of attempts: 1
New teacher - 836 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 21
  • Position: #37 / 174
  • Number of attempts: 8
months to html list items - 957 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 25
  • Position: #117 / 254
  • Number of attempts: 5
Populate 3D bone names list - 598 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 31
  • Position: #96 / 152
  • Number of attempts: 2
Find fix point of cos - 1359 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: 15
  • Position: #242 / 394
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 538 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #256 / 300
  • Number of attempts: 1
Paste a column after a column - 2511 entries

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

  • Best score: 14
  • Best player score: 24
  • Position: #378 / 547
  • Number of attempts: 3
HS exam question - 1577 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 61
  • Position: #133 / 415
  • Number of attempts: 6
Reformat symbols in list - 1606 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 32
  • Position: #206 / 344
  • Number of attempts: 3
delete swap - 1768 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #375 / 548
  • Number of attempts: 6
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 42
  • Position: #425 / 589
  • Number of attempts: 2
Satisfy the go linter - 2374 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 28
  • Position: #352 / 469
  • Number of attempts: 5
Add quotes to ansible playbook - 952 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 10
  • Position: #255 / 304
  • Number of attempts: 4
Multiline to Single Line - 700 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #256 / 302
  • Number of attempts: 3
Data reformat - 294 entries

Reformat this copy-paste data! #csv

  • Best score: 36
  • Best player score: 62
  • Position: #48 / 65
  • Number of attempts: 1
xrandr outputs and dashes - 704 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 12
  • Position: #150 / 221
  • Number of attempts: 9

Contributed Challenges

Move list of uuids into a SQL query - 39 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

Convert plain text into a markdown table - 5 entries

Convert the table to markdown to make it more usable

Replace csv column if it's not empty - 36 entries

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

Change class fields from snake case to camel case - 22 entries

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

Change class fields from camel case to snake case - 42 entries

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

Pablo Acuna
Github:

entered into 30 challenges

contributed 5 challenges