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

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

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

  • Best score: 17
  • Best player score: 18
  • Position: #220 / 273
  • Number of attempts: 5
Paste a column after a column - 2262 entries

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

  • Best score: 14
  • Best player score: 19
  • Position: #238 / 491
  • Number of attempts: 11
Filter number combinations that don't add to 11 - 376 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

  • Best score: 27
  • Best player score: 83
  • Position: #103 / 110
  • Number of attempts: 4
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 32
  • Position: #248 / 370
  • Number of attempts: 14
Rural Post - 4368 entries

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

  • Best score: 9
  • Best player score: 11
  • Position: #485 / 1072
  • Number of attempts: 9
Satisfy the go linter - 2329 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: 29
  • Position: #349 / 457
  • Number of attempts: 7
Yo To Hello - 1115 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 12
  • Position: #469 / 518
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1098 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 74
  • Position: #222 / 225
  • Number of attempts: 1
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: 28
  • Position: #4449 / 7364
  • Number of attempts: 5
prepend * to every non-blank line - 6208 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #96 / 1517
  • Number of attempts: 19
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2280 / 3842
  • Number of attempts: 8
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #482 / 3044
  • Number of attempts: 8
Box it - 7828 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #761 / 1865
  • Number of attempts: 10
Team names - 1805 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #462 / 581
  • Number of attempts: 4
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1761 / 2101
  • Number of attempts: 10
One to Ten - 2165 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 12
  • Position: #313 / 662
  • Number of attempts: 4
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2003 / 4161
  • Number of attempts: 18
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 20
  • Position: #3305 / 3946
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #636 / 1736
  • Number of attempts: 4
Simple text editing with Vim - 12290 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Position: #1850 / 3581
  • Number of attempts: 2
David
Twitter:

entered into 20 challenges

contributed 0 challenges