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

Generate an entry for each month - 369 entries

The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years

  • Best score: 27
  • Best player score: 37
  • Position: #28 / 91
  • Number of attempts: 4
Surround the 'z' character with brackets, quotes, and print as formatted string. - 576 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #270 / 324
  • Number of attempts: 1
Paste a column after a column - 2662 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #79 / 576
  • Number of attempts: 8
HS exam question - 1610 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 115
  • Position: #369 / 420
  • Number of attempts: 3
Hogwarts Email Sorting - 948 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 21
  • Position: #85 / 268
  • Number of attempts: 11
prepend * to every non-blank line - 6380 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #529 / 1557
  • Number of attempts: 2
One number per line - 18840 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 18
  • Position: #1503 / 3893
  • Number of attempts: 6
Quote modules - 1099 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 28
  • Position: #192 / 287
  • Number of attempts: 1
Unsemantic linewrapping - 943 entries

[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:

  • Best score: 9
  • Best player score: 9
  • Position: #8 / 235
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1269 entries

Convert strings in SCREAMING_SNAKE_CASE to Title Case. Examples: EMPLOYEE_NAME -> Employee Name REVENUE_YEAR_TO_DATE -> Revenue Year To Date SALARY -> Salary

  • Best score: 19
  • Best player score: 20
  • Position: #99 / 264
  • Number of attempts: 10
Add semicolons - 10923 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 13
  • Position: #2052 / 3087
  • Number of attempts: 1
Bad Copy Syntax - 2072 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 18
  • Best player score: 32
  • Position: #461 / 539
  • Number of attempts: 3
remove lines containing the word "reader" - 3631 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #609 / 1179
  • Number of attempts: 3
Com(m)a Trouble - 3968 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 16
  • Position: #529 / 901
  • Number of attempts: 3
Just the middle - 11555 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2831 / 4234
  • Number of attempts: 3
I forgot quotes - 16127 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1951 / 4208
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10720 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2388 / 3703
  • Number of attempts: 1
Words in parens - 13005 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2495 / 3979
  • Number of attempts: 2
Resort and deup a CSV list - 184 entries

I'm always adding items to a sorted list. There has to be a better way dedup and resort the lists. There are multiple lists with varying lengths to discourage manual sorting. Also Australia's animals are weird.

  • Best score: 44
  • Best player score: 114
  • Position: #42 / 45
  • Number of attempts: 1
Rob Pilling
Twitter:

how did this get here i am not good with computer

entered into 19 challenges

contributed 0 challenges