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

Paste a column after a column - 2243 entries

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

  • Best score: 14
  • Best player score: 18
  • Position: #206 / 487
  • Number of attempts: 3
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: 27
  • Position: #4 / 110
  • Number of attempts: 4
Tabbed Table to Python Array - 643 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

  • Best score: 50
  • Best player score: 57
  • Position: #60 / 166
  • Number of attempts: 2
HS exam question - 1497 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 54
  • Position: #69 / 393
  • Number of attempts: 5
Reformat symbols in list - 1466 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 29
  • Position: #167 / 322
  • Number of attempts: 2
Many duplicates - 1251 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #193 / 410
  • Number of attempts: 3
delete swap - 1522 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #192 / 476
  • Number of attempts: 4
Generate a very basic Python constructor (fixed) - 1172 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 43
  • Position: #120 / 245
  • Number of attempts: 1
Fix the shell script! - 2328 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 39
  • Position: #361 / 539
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1574 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 11
  • Position: #155 / 523
  • Number of attempts: 4
Wikitext headings to markdown - 980 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #35 / 203
  • Number of attempts: 8
hello-world-vimgolf - 2346 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #251 / 663
  • Number of attempts: 1
Contribute to keyboard mashing - 839 entries

Speak in tongues

  • Best score: 17
  • Best player score: 19
  • Position: #142 / 256
  • Number of attempts: 2
Solve anagram with ASCII letters - 39 entries

ASCII created by TOIlet command

  • Best score: 47
  • Best player score: 84
  • Position: #11 / 16
  • Number of attempts: 1
Learn to ask for :help - 525 entries

Learn to use the help to reduce your strokes...

  • Best score: 19
  • Best player score: 32
  • Position: #70 / 121
  • Number of attempts: 3
Plotting some variables in python - 1557 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 38
  • Position: #103 / 332
  • Number of attempts: 5
simple replacements - 1657 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Position: #129 / 369
  • Number of attempts: 6
Inverting Lines - 1830 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #183 / 496
  • Number of attempts: 4
Count to 100 in word form - 106 entries

Write all the numbers from 1 to 100, using their word forms rather than the digit form. Most of the parts you will need are included in the input file. Use hyphens when appropriate.

  • Best score: 53
  • Best player score: 98
  • Position: #25 / 26
  • Number of attempts: 1
Making 3 line function a one liner. - 305 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #123 / 194
  • Number of attempts: 2
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 45
  • Position: #328 / 370
  • Number of attempts: 1
马海洋
Twitter:

entered into 21 challenges

contributed 0 challenges