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 - 115 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: #13 / 39
  • Number of attempts: 4
Rearrange array to one line - 477 entries

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

  • Best score: 13
  • Best player score: 27
  • Position: #95 / 122
  • Number of attempts: 1
Copy punctuation - 406 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: #28 / 99
  • Number of attempts: 8
Populate 3D bone names list - 580 entries

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

  • Best score: 21
  • Best player score: 34
  • Position: #110 / 147
  • Number of attempts: 4
Remove line numbers - 680 entries

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

  • Best score: 10
  • Best player score: 12
  • Position: #71 / 184
  • Number of attempts: 6
Find fix point of cos - 1308 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 / 384
  • Number of attempts: 3
Paste a column after a column - 2488 entries

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

  • Best score: 14
  • Best player score: 23
  • Position: #360 / 538
  • Number of attempts: 2
Reformat symbols in list - 1581 entries

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

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #410 / 555
  • 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 - 1929 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #84 / 651
  • Number of attempts: 3
Java Array2List - 232 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 - 477 entries

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

Fix timezone format - 115 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