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 - 33982 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: 31
  • Position: #5701 / 7508
  • Number of attempts: 1
Swap values - 4703 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 26
  • Position: #1239 / 1291
  • Number of attempts: 1
One number per line - 18894 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 46
  • Position: #3850 / 3901
  • Number of attempts: 1
V to the i - 4864 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 12
  • Position: #1824 / 1912
  • Number of attempts: 3
Add semicolons - 10951 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1871 / 3096
  • Number of attempts: 5
remove lines containing the word "reader" - 3646 entries

easy stuff

  • Best score: 9
  • Best player score: 13
  • Position: #992 / 1183
  • Number of attempts: 7
Box it - 7999 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 41
  • Position: #1738 / 1899
  • Number of attempts: 1
Array propagate - 346 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 31
  • Position: #96 / 123
  • Number of attempts: 1
Extract argument from function - 2401 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 20
  • Position: #707 / 768
  • Number of attempts: 2
Search and Replace 0 - 5124 entries

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

  • Best score: 12
  • Best player score: 20
  • Position: #1518 / 1670
  • Number of attempts: 1
Number Sort - 322 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: 9
  • Position: #114 / 172
  • Number of attempts: 2
Collect List - 4333 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 20
  • Position: #1139 / 1197
  • Number of attempts: 2
I forgot quotes - 16185 entries

Oops.

  • Best score: 10
  • Best player score: 23
  • Position: #3932 / 4221
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10749 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2880 / 3712
  • Number of attempts: 2
Words in parens - 13033 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 29
  • Position: #3892 / 3987
  • Number of attempts: 1
Append semicolon after expressions - 1071 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 18
  • Position: #415 / 425
  • Number of attempts: 1
switch variable - 5120 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 18
  • Position: #1661 / 1761
  • Number of attempts: 2
Shebangs for all - 2098 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 28
  • Position: #517 / 531
  • Number of attempts: 5
Reverse and count - 489 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 38
  • Position: #166 / 180
  • Number of attempts: 3
Simple text editing with Vim - 13576 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1872 / 3892
  • Number of attempts: 8
Akshay Aurora
Twitter:

Data and AI Infrastructure, Previously @Databricks @Microsoft

entered into 20 challenges

contributed 0 challenges