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

Put a newline after every 10 lines in vim - 1668 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #282 / 561
  • Number of attempts: 1
hello-world-vimgolf - 2513 entries

Simple number generation

  • Best score: 10
  • Best player score: 11
  • Position: #373 / 717
  • Number of attempts: 3
Transpose a python matrix - 873 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 66
  • Position: #106 / 138
  • Number of attempts: 3
Inverting Lines - 1932 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #87 / 518
  • Number of attempts: 8
Python dataclasses - 1229 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #29 / 308
  • Number of attempts: 11
swap number pairs - 2146 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 27
  • Position: #214 / 390
  • Number of attempts: 5
HS Final exam vimgolf - 913 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 23
  • Position: #99 / 241
  • Number of attempts: 3
Rural Post - 4572 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 10
  • Position: #443 / 1116
  • Number of attempts: 4
Multiline to Single Line - 747 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #141 / 318
  • Number of attempts: 2
Add semicolons - 10916 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1755 / 3085
  • Number of attempts: 2
Box it - 7962 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #807 / 1891
  • Number of attempts: 4
Search and Replace 0 - 5027 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #674 / 1637
  • Number of attempts: 3
Flip the bit - 137 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 8
  • Position: #31 / 78
  • Number of attempts: 2
Just the middle - 11541 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3178 / 4230
  • Number of attempts: 3
Words in parens - 12992 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 13
  • Position: #5 / 3977
  • Number of attempts: 4
NATO phonetic alphabet - 538 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #107 / 197
  • Number of attempts: 3
The name of the game - 678 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #257 / 363
  • Number of attempts: 1
Aligning function arguments to match a specific coding style - 259 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

  • Best score: 16
  • Best player score: 16
  • Position: #7 / 72
  • Number of attempts: 8
Numbering a List - 1940 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 25
  • Position: #554 / 656
  • Number of attempts: 2
A Simple One - 1067 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #516 / 671
  • Number of attempts: 2
Reverse characters in a line - 789 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 17
  • Position: #176 / 269
  • Number of attempts: 2
時空裂縫
Twitter:

entered into 21 challenges

contributed 0 challenges