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

Fix timezone format - 220 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 / 73
  • Number of attempts: 4
Rearrange array to one line - 588 entries

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

  • Best score: 13
  • Best player score: 27
  • Position: #115 / 142
  • Number of attempts: 1
Copy punctuation - 483 entries

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

  • Best score: 19
  • Best player score: 30
  • Position: #32 / 119
  • Number of attempts: 8
Populate 3D bone names list - 623 entries

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

  • Best score: 21
  • Best player score: 34
  • Position: #118 / 161
  • Number of attempts: 4
Remove line numbers - 716 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 9
  • Best player score: 12
  • Position: #72 / 192
  • Number of attempts: 6
Find fix point of cos - 1392 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: 14
  • Position: #71 / 409
  • Number of attempts: 3
Paste a column after a column - 2526 entries

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

  • Best score: 14
  • Best player score: 23
  • Position: #368 / 551
  • Number of attempts: 2
Reformat symbols in list - 1614 entries

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

  • Best score: 24
  • Best player score: 39
  • Position: #267 / 347
  • Number of attempts: 2
Put a newline after every 10 lines in vim - 1657 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #410 / 556
  • Number of attempts: 1
Java to JavaScript - 267 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 130
  • Position: #63 / 72
  • Number of attempts: 1
Split line with dots - 2144 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 28
  • Position: #587 / 634
  • Number of attempts: 3
imports alignment (python) - 700 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 46
  • Position: #192 / 198
  • Number of attempts: 1
Numbering a List - 1931 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #84 / 652
  • Number of attempts: 3
Java Array2List - 233 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 113
  • Position: #59 / 87
  • Number of attempts: 1

Contributed Challenges

Rearrange array to one line - 588 entries

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

Fix timezone format - 220 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;`

Alexandre GV.
Github:

entered into 14 challenges

contributed 2 challenges