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

Remove adjacent duplicates - 380 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 20
  • Position: #7 / 104
  • Number of attempts: 5
Move to corresponding lines - 182 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 18
  • Position: #6 / 45
  • Number of attempts: 3
Rearrange array to one line - 523 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 13
  • Position: #2 / 130
  • Number of attempts: 2
Copy punctuation - 419 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 25
  • Position: #19 / 106
  • Number of attempts: 5
Change LaTex itemizations formats - 103 entries

Inspired by the way my professor formats their LaTeX assignments.

  • Best score: 43
  • Best player score: 85
  • Position: #13 / 17
  • Number of attempts: 1
Column wise pasting - 143 entries

Make a table from 3 columns

  • Best score: 17
  • Best player score: 24
  • Position: #11 / 33
  • Number of attempts: 2
Deleting text - 219 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 29
  • Position: #5 / 74
  • Number of attempts: 6
Coordinate extraction - 51 entries

Get the coordinates of all "M"s from the Vim logo

  • Best score: 43
  • Best player score: 46
  • Position: #7 / 15
  • Number of attempts: 7
Replace word while reserving first letter case - 563 entries

Window -> Door window -> door Windows -> Windows windows -> windows

  • Best score: 24
  • Best player score: 24
  • Position: #4 / 113
  • Number of attempts: 5
months to html list items - 958 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #6 / 255
  • Number of attempts: 4
Instance creation in Verilog - 41 entries

Creating an instance of a module is a very frequent task in Verilog. Let's see how efficiently can it be done

  • Best score: 107
  • Best player score: 144
  • Position: #6 / 9
  • Number of attempts: 1
Quicksort - 1883 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 6
  • Position: #89 / 412
  • Number of attempts: 4
EDN reformat - 1133 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 18
  • Position: #25 / 158
  • Number of attempts: 4
Remove line numbers - 694 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 9
  • Best player score: 30
  • Position: #138 / 189
  • Number of attempts: 1
Find fix point of cos - 1365 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 15
  • Position: #145 / 397
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 540 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #117 / 301
  • Number of attempts: 2
Paste a column after a column - 2511 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #63 / 547
  • Number of attempts: 6
Filter number combinations that don't add to 11 - 401 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: 28
  • Position: #69 / 114
  • Number of attempts: 1
HS exam question - 1577 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 92
  • Position: #315 / 415
  • Number of attempts: 1
Poorly indented Python comments - 1313 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 15
  • Position: #3 / 220
  • Number of attempts: 3
Many duplicates - 1443 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #68 / 467
  • Number of attempts: 2
2 quick changes and a numbered list - 642 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 38
  • Position: #35 / 153
  • Number of attempts: 3
delete swap - 1768 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #16 / 548
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1253 entries

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

  • Best score: 29
  • Best player score: 29
  • Position: #19 / 271
  • Number of attempts: 3
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 26
  • Position: #24 / 589
  • Number of attempts: 6
Visual block training - 1069 entries

You see the input. You see the output. Go.

  • Best score: 17
  • Best player score: 18
  • Position: #20 / 203
  • Number of attempts: 4
Put a newline after every 10 lines in vim - 1656 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #130 / 555
  • Number of attempts: 3
hello-world-vimgolf - 2490 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #184 / 705
  • Number of attempts: 1
Learn to ask for :help - 587 entries

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

  • Best score: 19
  • Best player score: 21
  • Position: #17 / 130
  • Number of attempts: 5
Migrated to Postgres! - 323 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 29
  • Position: #67 / 126
  • Number of attempts: 3
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 12
  • Position: #24 / 197
  • Number of attempts: 3
Simple text editing with Vim - 12692 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1961 / 3667
  • Number of attempts: 4
Pablo Cárdenas
Twitter:

entered into 32 challenges

contributed 0 challenges