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. - 554 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #250 / 309
  • Number of attempts: 5
Paste a column after a column - 2537 entries

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

  • Best score: 14
  • Best player score: 19
  • Position: #272 / 553
  • Number of attempts: 11
Filter number combinations that don't add to 11 - 408 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: #110 / 117
  • Number of attempts: 4
swap number pairs - 2103 entries

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

  • Best score: 16
  • Best player score: 32
  • Position: #254 / 380
  • Number of attempts: 14
Rural Post - 4479 entries

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

  • Best score: 9
  • Best player score: 11
  • Position: #500 / 1097
  • Number of attempts: 9
Satisfy the go linter - 2391 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: #359 / 471
  • Number of attempts: 7
Yo To Hello - 1130 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 12
  • Position: #475 / 524
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1146 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: #226 / 229
  • Number of attempts: 1
Simple, Practical, and Common - 33617 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: #4473 / 7421
  • Number of attempts: 5
prepend * to every non-blank line - 6312 entries

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

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2289 / 3864
  • Number of attempts: 8
Add semicolons - 10852 entries

Simply add a semicolon at the end of each line

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

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #762 / 1876
  • Number of attempts: 10
Team names - 1836 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 19
  • Position: #466 / 588
  • Number of attempts: 4
Vice versa - 7907 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1778 / 2128
  • Number of attempts: 10
One to Ten - 2219 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 / 672
  • Number of attempts: 4
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2007 / 4180
  • Number of attempts: 18
Words in parens - 12935 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 20
  • Position: #3319 / 3963
  • Number of attempts: 1
switch variable - 5071 entries

how fast can you switch two variable ?

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

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

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

entered into 20 challenges

contributed 0 challenges