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

Simple, Practical, and Common - 33385 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 22
  • Position: #1066 / 7364
  • Number of attempts: 4
Get mail address from outlook format - 621 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 20
  • Position: #147 / 196
  • Number of attempts: 1
Swap values - 4543 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 15
  • Position: #882 / 1257
  • Number of attempts: 2
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1151 / 3842
  • Number of attempts: 5
citizen_hacks_2019_challenge2 - 189 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 7
  • Position: #73 / 99
  • Number of attempts: 1
citizen_hacks_2019_challenge3 - 35 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 4
  • Best player score: 4
  • Position: #9 / 32
  • Number of attempts: 1
Box it - 7828 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #666 / 1865
  • Number of attempts: 6
Array propagate - 319 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 26
  • Position: #54 / 115
  • Number of attempts: 4
Number Sort - 305 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 11
  • Position: #156 / 163
  • Number of attempts: 2
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2040 / 4164
  • Number of attempts: 1
Sort yaml structures alphabetically by root key names - 38 entries

sometimes we want to sort structures alphabetically in yaml files

  • Best score: 31
  • Best player score: 44
  • Position: #11 / 18
  • Number of attempts: 5
Interactive git rebase changing commands - 161 entries

How to change the action of some commits in git rebase dialog.

  • Best score: 15
  • Best player score: 15
  • Position: #3 / 77
  • Number of attempts: 2
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 19
  • Position: #1780 / 2101
  • Number of attempts: 2
lipsum lines - 252 entries

Convert a quoted block of text into strings in a list.

  • Best score: 28
  • Best player score: 40
  • Position: #84 / 91
  • Number of attempts: 1
citizen_hacks_2019_challenge4 - 88 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 5
  • Best player score: 5
  • Position: #9 / 61
  • Number of attempts: 1
citizen_hacks_2019_challenge5 - 137 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 8
  • Position: #68 / 73
  • Number of attempts: 1
citizen_hacks_2019_challenge6 - 59 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 3
  • Best player score: 3
  • Position: #11 / 47
  • Number of attempts: 1
Delete to the end of the current line - 791 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 5
  • Position: #7 / 385
  • Number of attempts: 2
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #326 / 1186
  • Number of attempts: 9
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 19
  • Position: #3436 / 4161
  • Number of attempts: 2
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1961 / 3946
  • Number of attempts: 4
Changing URL path in CSS - 129 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 49
  • Position: #41 / 59
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1581 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 15
  • Position: #384 / 439
  • Number of attempts: 3
citizen_hacks_2019_challenge1 - 48 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Position: #6 / 42
  • Number of attempts: 1
Switch function arguments - 2082 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 19
  • Position: #624 / 652
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #920 / 1736
  • Number of attempts: 4
The meaning - 558 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #99 / 356
  • Number of attempts: 1
CSV to JSON - 172 entries

A search for shortest vimissh way to convert CSV to JSON.

  • Best score: 56
  • Best player score: 166
  • Position: #57 / 65
  • Number of attempts: 2
A Simple One - 1001 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: #219 / 643
  • Number of attempts: 3
Table Reshuffle - 371 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 45
  • Position: #119 / 134
  • Number of attempts: 2
Deleting folded text - 341 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 30
  • Position: #106 / 113
  • Number of attempts: 1
Flodder-challenge - 1118 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 47
  • Position: #270 / 311
  • Number of attempts: 4

Contributed Challenges

Switch function arguments - 2082 entries

How to switch two arguments of a function.

Interactive git rebase changing commands - 161 entries

How to change the action of some commits in git rebase dialog.

Lajos Koszti
Twitter:

whatever, foo, bar, baz

entered into 32 challenges

contributed 2 challenges