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 - 33801 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: #5679 / 7459
  • Number of attempts: 1
Swap values - 4651 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 26
  • Position: #1230 / 1278
  • Number of attempts: 1
One number per line - 18811 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 46
  • Position: #3832 / 3883
  • Number of attempts: 1
V to the i - 4826 entries

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

  • Best score: 7
  • Best player score: 12
  • Position: #1815 / 1900
  • Number of attempts: 3
Add semicolons - 10905 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1860 / 3079
  • Number of attempts: 5
remove lines containing the word "reader" - 3616 entries

easy stuff

  • Best score: 9
  • Best player score: 13
  • Position: #984 / 1174
  • Number of attempts: 7
Box it - 7956 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 41
  • Position: #1727 / 1887
  • Number of attempts: 1
Array propagate - 343 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 31
  • Position: #94 / 121
  • Number of attempts: 1
Extract argument from function - 2372 entries

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

  • Best score: 13
  • Best player score: 20
  • Position: #697 / 757
  • Number of attempts: 2
Search and Replace 0 - 5010 entries

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

  • Best score: 12
  • Best player score: 20
  • Position: #1484 / 1632
  • Number of attempts: 1
Number Sort - 319 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 / 170
  • Number of attempts: 2
Collect List - 4312 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 20
  • Position: #1135 / 1193
  • Number of attempts: 2
I forgot quotes - 16075 entries

Oops.

  • Best score: 10
  • Best player score: 23
  • Position: #3913 / 4198
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10703 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2870 / 3696
  • Number of attempts: 2
Words in parens - 12980 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 29
  • Position: #3878 / 3972
  • Number of attempts: 1
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 18
  • Position: #411 / 421
  • Number of attempts: 1
switch variable - 5089 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 18
  • Position: #1652 / 1751
  • Number of attempts: 2
Shebangs for all - 2049 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: #510 / 523
  • Number of attempts: 5
Reverse and count - 486 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: #165 / 179
  • Number of attempts: 3
Simple text editing with Vim - 13183 entries

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

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

Data and AI Infrastructure, Previously @Databricks @Microsoft

entered into 20 challenges

contributed 0 challenges