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 - 143 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: #15 / 42
  • Number of attempts: 4
Surround the 'z' character with brackets, quotes, and print as formatted string. - 560 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #261 / 313
  • Number of attempts: 1
Paste a column after a column - 2537 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 / 553
  • Number of attempts: 8
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 115
  • Position: #366 / 417
  • Number of attempts: 3
Hogwarts Email Sorting - 928 entries

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

  • Best score: 20
  • Best player score: 21
  • Position: #84 / 262
  • Number of attempts: 11
prepend * to every non-blank line - 6323 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #526 / 1542
  • Number of attempts: 2
One number per line - 18751 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 18
  • Position: #1497 / 3869
  • Number of attempts: 6
Quote modules - 1089 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 28
  • Position: #190 / 282
  • Number of attempts: 1
Unsemantic linewrapping - 928 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 / 231
  • Number of attempts: 1
SCREAMING_SNAKE_CASE to Title Case - 1214 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: #98 / 249
  • Number of attempts: 10
Add semicolons - 10876 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 13
  • Position: #2040 / 3069
  • Number of attempts: 1
Bad Copy Syntax - 2038 entries

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

  • Best score: 18
  • Best player score: 32
  • Position: #452 / 526
  • Number of attempts: 3
remove lines containing the word "reader" - 3595 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #602 / 1166
  • Number of attempts: 3
Com(m)a Trouble - 3851 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #516 / 870
  • Number of attempts: 3
Just the middle - 11473 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2822 / 4205
  • Number of attempts: 3
I forgot quotes - 16007 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1941 / 4186
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10676 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2380 / 3687
  • Number of attempts: 1
Words in parens - 12944 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2486 / 3965
  • Number of attempts: 2
Resort and deup a CSV list - 170 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: #41 / 44
  • 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